Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
6e94d56a
Commit
6e94d56a
authored
5 years ago
by
Alexei Fedorov
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "Tegra194: mce: fix error code signedness" into integration
parents
44abf27d
e1fcb1bf
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plat/nvidia/tegra/soc/t194/drivers/mce/nvg.c
+16
-13
plat/nvidia/tegra/soc/t194/drivers/mce/nvg.c
with
16 additions
and
13 deletions
+16
-13
plat/nvidia/tegra/soc/t194/drivers/mce/nvg.c
View file @
6e94d56a
/*
/*
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2019
-2020
, NVIDIA CORPORATION. All rights reserved.
*
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-License-Identifier: BSD-3-Clause
*/
*/
...
@@ -165,7 +165,7 @@ int32_t nvg_online_core(uint32_t core)
...
@@ -165,7 +165,7 @@ int32_t nvg_online_core(uint32_t core)
/* sanity check the core ID value */
/* sanity check the core ID value */
if
(
core
>
(
uint32_t
)
PLATFORM_CORE_COUNT
)
{
if
(
core
>
(
uint32_t
)
PLATFORM_CORE_COUNT
)
{
ERROR
(
"%s: unknown core id (%d)
\n
"
,
__func__
,
core
);
ERROR
(
"%s: unknown core id (%d)
\n
"
,
__func__
,
core
);
ret
=
EINVAL
;
ret
=
-
EINVAL
;
}
else
{
}
else
{
/* get a core online */
/* get a core online */
nvg_set_request_data
((
uint64_t
)
TEGRA_NVG_CHANNEL_ONLINE_CORE
,
nvg_set_request_data
((
uint64_t
)
TEGRA_NVG_CHANNEL_ONLINE_CORE
,
...
@@ -183,15 +183,15 @@ int32_t nvg_online_core(uint32_t core)
...
@@ -183,15 +183,15 @@ int32_t nvg_online_core(uint32_t core)
*/
*/
int32_t
nvg_update_ccplex_gsc
(
uint32_t
gsc_idx
)
int32_t
nvg_update_ccplex_gsc
(
uint32_t
gsc_idx
)
{
{
int32_t
ret
;
int32_t
ret
=
0
;
/* sanity check GSC ID */
/* sanity check GSC ID */
if
(
gsc_idx
>
(
uint32_t
)
TEGRA_NVG_CHANNEL_UPDATE_GSC_VPR
)
{
if
(
gsc_idx
>
(
uint32_t
)
TEGRA_NVG_CHANNEL_UPDATE_GSC_VPR
)
{
ERROR
(
"%s: unknown gsc_idx (%u)
\n
"
,
__func__
,
gsc_idx
);
ERROR
(
"%s: unknown gsc_idx (%u)
\n
"
,
__func__
,
gsc_idx
);
ret
=
EINVAL
;
ret
=
-
EINVAL
;
}
else
{
}
else
{
nvg_set_request_data
((
uint64_t
)
TEGRA_NVG_CHANNEL_UPDATE_CCPLEX_GSC
,
nvg_set_request_data
((
uint64_t
)
TEGRA_NVG_CHANNEL_UPDATE_CCPLEX_GSC
,
(
uint64_t
)
gsc_idx
);
(
uint64_t
)
gsc_idx
);
}
}
return
ret
;
return
ret
;
...
@@ -209,11 +209,12 @@ int32_t nvg_roc_clean_cache(void)
...
@@ -209,11 +209,12 @@ int32_t nvg_roc_clean_cache(void)
ID_AFR0_EL1_CACHE_OPS_MASK
)
==
1U
)
{
ID_AFR0_EL1_CACHE_OPS_MASK
)
==
1U
)
{
if
(
nvg_cache_clean
()
==
0U
)
{
if
(
nvg_cache_clean
()
==
0U
)
{
ERROR
(
"%s: failed
\n
"
,
__func__
);
ERROR
(
"%s: failed
\n
"
,
__func__
);
ret
=
EINVAL
;
ret
=
-
ENODEV
;
}
}
}
else
{
}
else
{
ret
=
EINVAL
;
ret
=
-
ENOTSUP
;
}
}
return
ret
;
return
ret
;
}
}
...
@@ -229,11 +230,12 @@ int32_t nvg_roc_flush_cache(void)
...
@@ -229,11 +230,12 @@ int32_t nvg_roc_flush_cache(void)
ID_AFR0_EL1_CACHE_OPS_MASK
)
==
1U
)
{
ID_AFR0_EL1_CACHE_OPS_MASK
)
==
1U
)
{
if
(
nvg_cache_clean_inval
()
==
0U
)
{
if
(
nvg_cache_clean_inval
()
==
0U
)
{
ERROR
(
"%s: failed
\n
"
,
__func__
);
ERROR
(
"%s: failed
\n
"
,
__func__
);
ret
=
EINVAL
;
ret
=
-
ENODEV
;
}
}
}
else
{
}
else
{
ret
=
EINVAL
;
ret
=
-
ENOTSUP
;
}
}
return
ret
;
return
ret
;
}
}
...
@@ -249,11 +251,12 @@ int32_t nvg_roc_clean_cache_trbits(void)
...
@@ -249,11 +251,12 @@ int32_t nvg_roc_clean_cache_trbits(void)
ID_AFR0_EL1_CACHE_OPS_MASK
)
==
1U
)
{
ID_AFR0_EL1_CACHE_OPS_MASK
)
==
1U
)
{
if
(
nvg_cache_inval_all
()
==
0U
)
{
if
(
nvg_cache_inval_all
()
==
0U
)
{
ERROR
(
"%s: failed
\n
"
,
__func__
);
ERROR
(
"%s: failed
\n
"
,
__func__
);
ret
=
EINVAL
;
ret
=
-
ENODEV
;
}
}
}
else
{
}
else
{
ret
=
EINVAL
;
ret
=
-
ENOTSUP
;
}
}
return
ret
;
return
ret
;
}
}
...
@@ -271,8 +274,8 @@ int32_t nvg_enter_cstate(uint32_t state, uint32_t wake_time)
...
@@ -271,8 +274,8 @@ int32_t nvg_enter_cstate(uint32_t state, uint32_t wake_time)
(
state
!=
(
uint32_t
)
TEGRA_NVG_CORE_C6
)
&&
(
state
!=
(
uint32_t
)
TEGRA_NVG_CORE_C6
)
&&
(
state
!=
(
uint32_t
)
TEGRA_NVG_CORE_C7
))
(
state
!=
(
uint32_t
)
TEGRA_NVG_CORE_C7
))
{
{
ERROR
(
"%s: unknown cstate (%
d
)
\n
"
,
__func__
,
state
);
ERROR
(
"%s: unknown cstate (%
u
)
\n
"
,
__func__
,
state
);
ret
=
EINVAL
;
ret
=
-
EINVAL
;
}
else
{
}
else
{
/* time (TSC ticks) until the core is expected to get a wake event */
/* time (TSC ticks) until the core is expected to get a wake event */
nvg_set_wake_time
(
wake_time
);
nvg_set_wake_time
(
wake_time
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help