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
36e742ac
Commit
36e742ac
authored
Jul 10, 2017
by
davidcunado-arm
Committed by
GitHub
Jul 10, 2017
Browse files
Merge pull request #1012 from rockchip-linux/rk3399/l2cache
rockchip/rk3399: fixes the typo and the WARNINGS during suspend/resume
parents
0c02dc30
c3710ee7
Changes
1
Hide whitespace changes
Inline
Side-by-side
plat/rockchip/rk3399/drivers/pmu/pmu.c
View file @
36e742ac
...
@@ -362,19 +362,23 @@ static void pmu_power_domains_resume(void)
...
@@ -362,19 +362,23 @@ static void pmu_power_domains_resume(void)
clk_gate_con_restore
();
clk_gate_con_restore
();
}
}
void
rk3399_fl
a
sh_l2_b
(
void
)
void
rk3399_fl
u
sh_l2_b
(
void
)
{
{
uint32_t
wait_cnt
=
0
;
uint32_t
wait_cnt
=
0
;
mmio_setbits_32
(
PMU_BASE
+
PMU_SFT_CON
,
BIT
(
L2_FLUSH_REQ_CLUSTER_B
));
mmio_setbits_32
(
PMU_BASE
+
PMU_SFT_CON
,
BIT
(
L2_FLUSH_REQ_CLUSTER_B
));
dsb
();
dsb
();
/*
* The Big cluster flush L2 cache took ~4ms by default, give 10ms for
* the enough margin.
*/
while
(
!
(
mmio_read_32
(
PMU_BASE
+
PMU_CORE_PWR_ST
)
&
while
(
!
(
mmio_read_32
(
PMU_BASE
+
PMU_CORE_PWR_ST
)
&
BIT
(
L2_FLUSHDONE_CLUSTER_B
)))
{
BIT
(
L2_FLUSHDONE_CLUSTER_B
)))
{
wait_cnt
++
;
wait_cnt
++
;
if
(
wait_cnt
>=
MAX_WAIT_COUNT
)
udelay
(
10
);
WARN
(
"%s:reg %x,wait
\n
"
,
__func__
,
if
(
wait_cnt
==
10000
/
10
)
mmio_read_32
(
PMU_BASE
+
PMU_CORE_PWR_ST
)
);
WARN
(
"L2 cache flush on suspend took longer than 10ms
\n
"
);
}
}
mmio_clrbits_32
(
PMU_BASE
+
PMU_SFT_CON
,
BIT
(
L2_FLUSH_REQ_CLUSTER_B
));
mmio_clrbits_32
(
PMU_BASE
+
PMU_SFT_CON
,
BIT
(
L2_FLUSH_REQ_CLUSTER_B
));
...
@@ -391,7 +395,7 @@ static void pmu_scu_b_pwrdn(void)
...
@@ -391,7 +395,7 @@ static void pmu_scu_b_pwrdn(void)
return
;
return
;
}
}
rk3399_fl
a
sh_l2_b
();
rk3399_fl
u
sh_l2_b
();
mmio_setbits_32
(
PMU_BASE
+
PMU_SFT_CON
,
BIT
(
ACINACTM_CLUSTER_B_CFG
));
mmio_setbits_32
(
PMU_BASE
+
PMU_SFT_CON
,
BIT
(
ACINACTM_CLUSTER_B_CFG
));
...
...
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