Commit 678ea28b authored by Russell King's avatar Russell King

ARM: l2c: remove old .set_debug method

We no longer need or require the .set_debug method; we handle everything
it used to do via the .write_sec method instead.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 851d6d71
...@@ -35,7 +35,6 @@ struct outer_cache_fns { ...@@ -35,7 +35,6 @@ struct outer_cache_fns {
void (*resume)(void); void (*resume)(void);
/* This is an ARM L2C thing */ /* This is an ARM L2C thing */
void (*set_debug)(unsigned long);
void (*write_sec)(unsigned long, unsigned); void (*write_sec)(unsigned long, unsigned);
}; };
......
...@@ -81,10 +81,7 @@ static void l2c_write_sec(unsigned long val, void __iomem *base, unsigned reg) ...@@ -81,10 +81,7 @@ static void l2c_write_sec(unsigned long val, void __iomem *base, unsigned reg)
*/ */
static inline void l2c_set_debug(void __iomem *base, unsigned long val) static inline void l2c_set_debug(void __iomem *base, unsigned long val)
{ {
if (outer_cache.set_debug) l2c_write_sec(val, base, L2X0_DEBUG_CTRL);
outer_cache.set_debug(val);
else
l2c_write_sec(val, base, L2X0_DEBUG_CTRL);
} }
static void __l2c_op_way(void __iomem *reg) static void __l2c_op_way(void __iomem *reg)
...@@ -155,8 +152,7 @@ static inline void cache_sync(void) ...@@ -155,8 +152,7 @@ static inline void cache_sync(void)
#if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915) #if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915)
static inline void debug_writel(unsigned long val) static inline void debug_writel(unsigned long val)
{ {
if (outer_cache.set_debug || outer_cache.write_sec) l2c_set_debug(l2x0_base, val);
l2c_set_debug(l2x0_base, val);
} }
#else #else
/* Optimised out for non-errata case */ /* Optimised out for non-errata case */
...@@ -514,11 +510,6 @@ static const struct l2c_init_data l2c220_data = { ...@@ -514,11 +510,6 @@ static const struct l2c_init_data l2c220_data = {
* Affects: store buffer * Affects: store buffer
* store buffer is not automatically drained. * store buffer is not automatically drained.
*/ */
static void l2c310_set_debug(unsigned long val)
{
writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL);
}
static void l2c310_inv_range_erratum(unsigned long start, unsigned long end) static void l2c310_inv_range_erratum(unsigned long start, unsigned long end)
{ {
void __iomem *base = l2x0_base; void __iomem *base = l2x0_base;
...@@ -695,10 +686,6 @@ static void __init l2c310_fixup(void __iomem *base, u32 cache_id, ...@@ -695,10 +686,6 @@ static void __init l2c310_fixup(void __iomem *base, u32 cache_id,
const char *errata[8]; const char *errata[8];
unsigned n = 0; unsigned n = 0;
/* For compatibility */
if (revision <= L310_CACHE_ID_RTL_R3P0)
fns->set_debug = l2c310_set_debug;
if (IS_ENABLED(CONFIG_PL310_ERRATA_588369) && if (IS_ENABLED(CONFIG_PL310_ERRATA_588369) &&
revision < L310_CACHE_ID_RTL_R2P0 && revision < L310_CACHE_ID_RTL_R2P0 &&
/* For bcm compatibility */ /* For bcm compatibility */
...@@ -759,7 +746,6 @@ static const struct l2c_init_data l2c310_init_fns __initconst = { ...@@ -759,7 +746,6 @@ static const struct l2c_init_data l2c310_init_fns __initconst = {
.flush_all = l2c210_flush_all, .flush_all = l2c210_flush_all,
.disable = l2c_disable, .disable = l2c_disable,
.sync = l2c210_sync, .sync = l2c210_sync,
.set_debug = l2c310_set_debug,
.resume = l2c310_resume, .resume = l2c310_resume,
}, },
}; };
...@@ -819,8 +805,6 @@ static void __init __l2c_init(const struct l2c_init_data *data, ...@@ -819,8 +805,6 @@ static void __init __l2c_init(const struct l2c_init_data *data,
fns.write_sec = outer_cache.write_sec; fns.write_sec = outer_cache.write_sec;
if (data->fixup) if (data->fixup)
data->fixup(l2x0_base, cache_id, &fns); data->fixup(l2x0_base, cache_id, &fns);
if (fns.write_sec)
fns.set_debug = NULL;
/* /*
* Check if l2x0 controller is already enabled. If we are booting * Check if l2x0 controller is already enabled. If we are booting
...@@ -1000,7 +984,6 @@ static const struct l2c_init_data of_l2c310_data __initconst = { ...@@ -1000,7 +984,6 @@ static const struct l2c_init_data of_l2c310_data __initconst = {
.flush_all = l2c210_flush_all, .flush_all = l2c210_flush_all,
.disable = l2c_disable, .disable = l2c_disable,
.sync = l2c210_sync, .sync = l2c210_sync,
.set_debug = l2c310_set_debug,
.resume = l2c310_resume, .resume = l2c310_resume,
}, },
}; };
......
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