ARM: l2c: prima2: convert to generic l2c OF initialisation
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 28 Apr 2014 14:41:08 +0000 (15:41 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 29 May 2014 23:49:55 +0000 (00:49 +0100)
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.  Along with this change, we can delete l2x0.c
from prima2.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/boot/dts/marco.dtsi
arch/arm/boot/dts/prima2.dtsi
arch/arm/mach-prima2/Makefile
arch/arm/mach-prima2/common.c
arch/arm/mach-prima2/l2x0.c [deleted file]

index 0c9647d28765469cb1b0ba87bc6c6d85c9565acf..fb354225740a94efdce15581cf006b275229dac4 100644 (file)
@@ -36,7 +36,7 @@
                ranges = <0x40000000 0x40000000 0xa0000000>;
 
                l2-cache-controller@c0030000 {
-                       compatible = "sirf,marco-pl310-cache", "arm,pl310-cache";
+                       compatible = "arm,pl310-cache";
                        reg = <0xc0030000 0x1000>;
                        interrupts = <0 59 0>;
                        arm,tag-latency = <1 1 1>;
index 1e82571d6823ef55169af9827efab952189e952c..0d6588d549bf7162941370d549be439ae1f2ad6d 100644 (file)
@@ -48,7 +48,7 @@
                ranges = <0x40000000 0x40000000 0x80000000>;
 
                l2-cache-controller@80040000 {
-                       compatible = "arm,pl310-cache", "sirf,prima2-pl310-cache";
+                       compatible = "arm,pl310-cache";
                        reg = <0x80040000 0x1000>;
                        interrupts = <59>;
                        arm,tag-latency = <1 1 1>;
index 7a6b4a32312575197180a2ab7f66e1b6fb1b31a7..8846e7d87ea58cbd953b264a36370c9307c71832 100644 (file)
@@ -2,7 +2,6 @@ obj-y += rstc.o
 obj-y += common.o
 obj-y += rtciobrg.o
 obj-$(CONFIG_DEBUG_LL) += lluart.o
-obj-$(CONFIG_CACHE_L2X0) += l2x0.o
 obj-$(CONFIG_SUSPEND) += pm.o sleep.o
 obj-$(CONFIG_SMP) += platsmp.o headsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)  += hotplug.o
index 47c7819edb9bbd56c291ab6f0902c047214aedbf..a860ea27e8ae645027791f4a070a15bfe0c720d1 100644 (file)
@@ -34,6 +34,8 @@ static const char *atlas6_dt_match[] __initconst = {
 
 DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
        /* Maintainer: Barry Song <baohua.song@csr.com> */
+       .l2c_aux_val    = 0,
+       .l2c_aux_mask   = ~0,
        .map_io         = sirfsoc_map_io,
        .init_late      = sirfsoc_init_late,
        .dt_compat      = atlas6_dt_match,
@@ -48,6 +50,8 @@ static const char *prima2_dt_match[] __initconst = {
 
 DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
        /* Maintainer: Barry Song <baohua.song@csr.com> */
+       .l2c_aux_val    = 0,
+       .l2c_aux_mask   = ~0,
        .map_io         = sirfsoc_map_io,
        .dma_zone_size  = SZ_256M,
        .init_late      = sirfsoc_init_late,
@@ -63,6 +67,8 @@ static const char *marco_dt_match[] __initconst = {
 
 DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
        /* Maintainer: Barry Song <baohua.song@csr.com> */
+       .l2c_aux_val    = 0,
+       .l2c_aux_mask   = ~0,
        .smp            = smp_ops(sirfsoc_smp_ops),
        .map_io         = sirfsoc_map_io,
        .init_late      = sirfsoc_init_late,
diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-prima2/l2x0.c
deleted file mode 100644 (file)
index dbd837b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * l2 cache initialization for CSR SiRFprimaII
- *
- * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
- *
- * Licensed under GPLv2 or later.
- */
-
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/of.h>
-#include <asm/hardware/cache-l2x0.h>
-
-static const struct of_device_id sirf_l2x0_ids[] __initconst = {
-       { .compatible = "sirf,prima2-pl310-cache", .data = &prima2_l2x0_aux, },
-       { .compatible = "sirf,marco-pl310-cache", .data = &marco_l2x0_aux, },
-       {},
-};
-
-static int __init sirfsoc_l2x0_init(void)
-{
-       struct device_node *np;
-
-       np = of_find_matching_node(NULL, sirf_l2x0_ids);
-       if (np)
-               return l2x0_of_init(0, ~0);
-
-       return 0;
-}
-early_initcall(sirfsoc_l2x0_init);