Commit 83841fe1 authored by Russell King's avatar Russell King

ARM: l2c: rename cache_wait_way()

cache_wait_way() is actually used to wait for a particular mask to
report clear; it's not really got much to do with cache ways at all.
Indeed, it gets used to wait for the C bit to clear on older caches.
Rename this with a more generic function name which better reflects
its purpose: l2c_wait_mask().
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent df5dd4c6
...@@ -53,7 +53,7 @@ static bool of_init = false; ...@@ -53,7 +53,7 @@ static bool of_init = false;
/* /*
* Common code for all cache controllers. * Common code for all cache controllers.
*/ */
static inline void cache_wait_way(void __iomem *reg, unsigned long mask) static inline void l2c_wait_mask(void __iomem *reg, unsigned long mask)
{ {
/* wait for cache operation by line or way to complete */ /* wait for cache operation by line or way to complete */
while (readl_relaxed(reg) & mask) while (readl_relaxed(reg) & mask)
...@@ -73,7 +73,7 @@ static inline void l2c_set_debug(void __iomem *base, unsigned long val) ...@@ -73,7 +73,7 @@ static inline void l2c_set_debug(void __iomem *base, unsigned long val)
static void __l2c_op_way(void __iomem *reg) static void __l2c_op_way(void __iomem *reg)
{ {
writel_relaxed(l2x0_way_mask, reg); writel_relaxed(l2x0_way_mask, reg);
cache_wait_way(reg, l2x0_way_mask); l2c_wait_mask(reg, l2x0_way_mask);
} }
static inline void l2c_unlock(void __iomem *base, unsigned num) static inline void l2c_unlock(void __iomem *base, unsigned num)
...@@ -94,7 +94,7 @@ static inline void cache_wait(void __iomem *reg, unsigned long mask) ...@@ -94,7 +94,7 @@ static inline void cache_wait(void __iomem *reg, unsigned long mask)
/* cache operations by line are atomic on PL310 */ /* cache operations by line are atomic on PL310 */
} }
#else #else
#define cache_wait cache_wait_way #define cache_wait l2c_wait_mask
#endif #endif
static inline void cache_sync(void) static inline void cache_sync(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment