Skip to content
Snippets Groups Projects
Commit ebab100a authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 4e3d8406
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,9 @@ static void uniphier_cache_sync(void) ...@@ -19,6 +19,9 @@ static void uniphier_cache_sync(void)
static void uniphier_cache_maint_all(u32 operation) static void uniphier_cache_maint_all(u32 operation)
{ {
/* clear the complete notification flag */
writel(SSCOLPQS_EF, SSCOLPQS);
/* try until the command is successfully set */ /* try until the command is successfully set */
do { do {
writel(SSCOQM_S_ALL | SSCOQM_CE | operation, SSCOQM); writel(SSCOQM_S_ALL | SSCOQM_CE | operation, SSCOQM);
...@@ -28,9 +31,6 @@ static void uniphier_cache_maint_all(u32 operation) ...@@ -28,9 +31,6 @@ static void uniphier_cache_maint_all(u32 operation)
while (readl(SSCOLPQS) != SSCOLPQS_EF) while (readl(SSCOLPQS) != SSCOLPQS_EF)
; ;
/* clear the complete notification flag */
writel(SSCOLPQS_EF, SSCOLPQS);
uniphier_cache_sync(); uniphier_cache_sync();
} }
...@@ -46,6 +46,9 @@ void v7_outer_cache_inval_all(void) ...@@ -46,6 +46,9 @@ void v7_outer_cache_inval_all(void)
static void __uniphier_cache_maint_range(u32 start, u32 size, u32 operation) 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 */ /* try until the command is successfully set */
do { do {
writel(SSCOQM_S_ADDRESS | SSCOQM_CE | operation, SSCOQM); writel(SSCOQM_S_ADDRESS | SSCOQM_CE | operation, SSCOQM);
...@@ -57,9 +60,6 @@ static void __uniphier_cache_maint_range(u32 start, u32 size, u32 operation) ...@@ -57,9 +60,6 @@ static void __uniphier_cache_maint_range(u32 start, u32 size, u32 operation)
/* wait until the operation is completed */ /* wait until the operation is completed */
while (readl(SSCOLPQS) != SSCOLPQS_EF) 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) static void uniphier_cache_maint_range(u32 start, u32 end, u32 operation)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment