1 --- a/arch/arm/mach-cns3xxx/core.c
2 +++ b/arch/arm/mach-cns3xxx/core.c
3 @@ -284,11 +284,24 @@ struct sys_timer cns3xxx_timer = {
5 #ifdef CONFIG_CACHE_L2X0
7 +static int cns3xxx_l2x0_enable = 1;
9 +static int __init cns3xxx_l2x0_disable(char *s)
11 + cns3xxx_l2x0_enable = 0;
14 +__setup("nol2x0", cns3xxx_l2x0_disable);
16 void __init cns3xxx_l2x0_init(void)
18 - void __iomem *base = ioremap(CNS3XXX_L2C_BASE, SZ_4K);
22 + if (!cns3xxx_l2x0_enable)
25 + base = ioremap(CNS3XXX_L2C_BASE, SZ_4K);
29 @@ -321,6 +334,7 @@ void __init cns3xxx_l2x0_init(void)
30 /* 32 KiB, 8-way, parity disable */
31 l2x0_init(base, 0x00540000, 0xfe000fff);
33 +arch_initcall(cns3xxx_l2x0_init);
35 #endif /* CONFIG_CACHE_L2X0 */
37 --- a/arch/arm/mach-cns3xxx/cns3420vb.c
38 +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
39 @@ -193,8 +193,6 @@ static struct platform_device *cns3420_p
41 static void __init cns3420_init(void)
43 - cns3xxx_l2x0_init();
45 platform_add_devices(cns3420_pdevs, ARRAY_SIZE(cns3420_pdevs));