summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-07-22 04:38:30 (GMT)
committerMasahiro Yamada <yamada.masahiro@socionext.com>2016-07-23 15:13:11 (GMT)
commitebab100a988e62a27ccde0372487daeeb8cb3050 (patch)
tree7bccd85bbd6aa77823c0e5d3e40a3e196a2f1257
parent4e3d84066e09c9ab6cee2102db7a2c51090962a4 (diff)
downloadu-boot-ebab100a988e62a27ccde0372487daeeb8cb3050.tar.xz
ARM: uniphier: clear notification flag before L2 operation
Clear the flag immediately before cache operation to not depend on the previous state. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--arch/arm/mach-uniphier/arm32/cache_uniphier.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-uniphier/arm32/cache_uniphier.c b/arch/arm/mach-uniphier/arm32/cache_uniphier.c
index 4398114..3d984a7 100644
--- a/arch/arm/mach-uniphier/arm32/cache_uniphier.c
+++ b/arch/arm/mach-uniphier/arm32/cache_uniphier.c
@@ -19,6 +19,9 @@ static void uniphier_cache_sync(void)
static void uniphier_cache_maint_all(u32 operation)
{
+ /* clear the complete notification flag */
+ writel(SSCOLPQS_EF, SSCOLPQS);
+
/* try until the command is successfully set */
do {
writel(SSCOQM_S_ALL | SSCOQM_CE | operation, SSCOQM);
@@ -28,9 +31,6 @@ static void uniphier_cache_maint_all(u32 operation)
while (readl(SSCOLPQS) != SSCOLPQS_EF)
;
- /* clear the complete notification flag */
- writel(SSCOLPQS_EF, SSCOLPQS);
-
uniphier_cache_sync();
}
@@ -46,6 +46,9 @@ void v7_outer_cache_inval_all(void)
static void __uniphier_cache_maint_range(u32 start, u32 size, u32 operation)
{
+ /* clear the complete notification flag */
+ writel(SSCOLPQS_EF, SSCOLPQS);
+
/* try until the command is successfully set */
do {
writel(SSCOQM_S_ADDRESS | SSCOQM_CE | operation, SSCOQM);
@@ -57,9 +60,6 @@ static void __uniphier_cache_maint_range(u32 start, u32 size, u32 operation)
/* wait until the operation is completed */
while (readl(SSCOLPQS) != SSCOLPQS_EF)
;
-
- /* clear the complete notification flag */
- writel(SSCOLPQS_EF, SSCOLPQS);
}
static void uniphier_cache_maint_range(u32 start, u32 end, u32 operation)