extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask);
extern void l2x0_shutdown(void);
extern void l2x0_restart(void);
+extern bool l2x0_disabled;
#endif
#endif
int i;
#ifdef CONFIG_CACHE_L2X0
- if (core_tile_pbxa9mp()) {
+ if (!l2x0_disabled && core_tile_pbxa9mp()) {
void __iomem *l2x0_base =
__io_address(REALVIEW_PBX_TILE_L220_BASE);
static void __iomem *l2x0_base;
static uint32_t l2x0_way_mask; /* Bitmask of active ways */
+bool l2x0_disabled;
static inline void cache_wait_always(void __iomem *reg, unsigned long mask)
{
{
unsigned long flags;
+ if (l2x0_disabled)
+ return;
+
BUG_ON(num_online_cpus() > 1);
local_irq_save(flags);
int ways;
const char *type;
+ if (l2x0_disabled)
+ return;
+
cache_id = readl_relaxed(l2x0_base + L2X0_CACHE_ID);
aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
{
+ if (l2x0_disabled) {
+ pr_info(L2CC_TYPE " cache controller disabled\n");
+ return;
+ }
+
l2x0_base = base;
l2x0_enable(aux_val, aux_mask);
outer_cache.flush_range = l2x0_flush_range;
outer_cache.sync = l2x0_cache_sync;
}
+
+static int __init l2x0_disable(char *unused)
+{
+ l2x0_disabled = 1;
+ return 0;
+}
+early_param("nol2x0", l2x0_disable);