Skip to content
GitLab
Menu
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
789a6d49
Commit
789a6d49
authored
May 11, 2016
by
danh-arm
Browse files
Merge pull request #619 from sandrine-bailleux-arm/sb/rockchip-assertions
Rockchip: Add some debug assertions in the PMU driver
parents
8fc83577
80fb66b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
plat/rockchip/rk3368/drivers/pmu/pmu.c
View file @
789a6d49
...
...
@@ -349,6 +349,7 @@ static int cores_pwr_domain_on(unsigned long mpidr, uint64_t entrypoint)
cpus_id_power_domain
(
cluster
,
cpu
,
pmu_pd_off
,
CKECK_WFEI_MSK
);
cpuon_id
=
(
cluster
*
PLATFORM_CLUSTER0_CORE_COUNT
)
+
cpu
;
assert
(
cpuon_id
<
PLATFORM_CORE_COUNT
);
assert
(
cpuson_flags
[
cpuon_id
]
==
0
);
cpuson_flags
[
cpuon_id
]
=
PMU_CPU_HOTPLUG
;
cpuson_entry_point
[
cpuon_id
]
=
entrypoint
;
...
...
plat/rockchip/rk3399/drivers/pmu/pmu.c
View file @
789a6d49
...
...
@@ -132,11 +132,13 @@ void plat_rockchip_pmusram_prepare(void)
static
inline
uint32_t
get_cpus_pwr_domain_cfg_info
(
uint32_t
cpu_id
)
{
assert
(
cpu_id
<
PLATFORM_CORE_COUNT
);
return
core_pm_cfg_info
[
cpu_id
];
}
static
inline
void
set_cpus_pwr_domain_cfg_info
(
uint32_t
cpu_id
,
uint32_t
value
)
{
assert
(
cpu_id
<
PLATFORM_CORE_COUNT
);
core_pm_cfg_info
[
cpu_id
]
=
value
;
#if !USE_COHERENT_MEM
flush_dcache_range
((
uintptr_t
)
&
core_pm_cfg_info
[
cpu_id
],
...
...
@@ -234,6 +236,7 @@ static int cores_pwr_domain_on(unsigned long mpidr, uint64_t entrypoint)
{
uint32_t
cpu_id
=
plat_core_pos_by_mpidr
(
mpidr
);
assert
(
cpu_id
<
PLATFORM_CORE_COUNT
);
assert
(
cpuson_flags
[
cpu_id
]
==
0
);
cpuson_flags
[
cpu_id
]
=
PMU_CPU_HOTPLUG
;
cpuson_entry_point
[
cpu_id
]
=
entrypoint
;
...
...
@@ -257,6 +260,7 @@ static int cores_pwr_domain_suspend(void)
{
uint32_t
cpu_id
=
plat_my_core_pos
();
assert
(
cpu_id
<
PLATFORM_CORE_COUNT
);
assert
(
cpuson_flags
[
cpu_id
]
==
0
);
cpuson_flags
[
cpu_id
]
=
PMU_CPU_AUTO_PWRDN
;
cpuson_entry_point
[
cpu_id
]
=
(
uintptr_t
)
psci_entrypoint
;
...
...
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