diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-04-28 10:41:08 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-05-29 19:49:55 -0400 |
commit | 918197be3992801054ff02fc8183bf9429bab98b (patch) | |
tree | d6ea74486c1736ab654cbcfc3a70565019549089 | |
parent | c95680e6f56d6bc345a7907c4d4bd985e875f2a7 (diff) |
ARM: l2c: prima2: convert to generic l2c OF initialisation
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>
-rw-r--r-- | arch/arm/boot/dts/marco.dtsi | 2 | ||||
-rw-r--r-- | arch/arm/boot/dts/prima2.dtsi | 2 | ||||
-rw-r--r-- | arch/arm/mach-prima2/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-prima2/common.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-prima2/l2x0.c | 30 |
5 files changed, 8 insertions, 33 deletions
diff --git a/arch/arm/boot/dts/marco.dtsi b/arch/arm/boot/dts/marco.dtsi index 0c9647d28765..fb354225740a 100644 --- a/arch/arm/boot/dts/marco.dtsi +++ b/arch/arm/boot/dts/marco.dtsi | |||
@@ -36,7 +36,7 @@ | |||
36 | ranges = <0x40000000 0x40000000 0xa0000000>; | 36 | ranges = <0x40000000 0x40000000 0xa0000000>; |
37 | 37 | ||
38 | l2-cache-controller@c0030000 { | 38 | l2-cache-controller@c0030000 { |
39 | compatible = "sirf,marco-pl310-cache", "arm,pl310-cache"; | 39 | compatible = "arm,pl310-cache"; |
40 | reg = <0xc0030000 0x1000>; | 40 | reg = <0xc0030000 0x1000>; |
41 | interrupts = <0 59 0>; | 41 | interrupts = <0 59 0>; |
42 | arm,tag-latency = <1 1 1>; | 42 | arm,tag-latency = <1 1 1>; |
diff --git a/arch/arm/boot/dts/prima2.dtsi b/arch/arm/boot/dts/prima2.dtsi index 1e82571d6823..0d6588d549bf 100644 --- a/arch/arm/boot/dts/prima2.dtsi +++ b/arch/arm/boot/dts/prima2.dtsi | |||
@@ -48,7 +48,7 @@ | |||
48 | ranges = <0x40000000 0x40000000 0x80000000>; | 48 | ranges = <0x40000000 0x40000000 0x80000000>; |
49 | 49 | ||
50 | l2-cache-controller@80040000 { | 50 | l2-cache-controller@80040000 { |
51 | compatible = "arm,pl310-cache", "sirf,prima2-pl310-cache"; | 51 | compatible = "arm,pl310-cache"; |
52 | reg = <0x80040000 0x1000>; | 52 | reg = <0x80040000 0x1000>; |
53 | interrupts = <59>; | 53 | interrupts = <59>; |
54 | arm,tag-latency = <1 1 1>; | 54 | arm,tag-latency = <1 1 1>; |
diff --git a/arch/arm/mach-prima2/Makefile b/arch/arm/mach-prima2/Makefile index 7a6b4a323125..8846e7d87ea5 100644 --- a/arch/arm/mach-prima2/Makefile +++ b/arch/arm/mach-prima2/Makefile | |||
@@ -2,7 +2,6 @@ obj-y += rstc.o | |||
2 | obj-y += common.o | 2 | obj-y += common.o |
3 | obj-y += rtciobrg.o | 3 | obj-y += rtciobrg.o |
4 | obj-$(CONFIG_DEBUG_LL) += lluart.o | 4 | obj-$(CONFIG_DEBUG_LL) += lluart.o |
5 | obj-$(CONFIG_CACHE_L2X0) += l2x0.o | ||
6 | obj-$(CONFIG_SUSPEND) += pm.o sleep.o | 5 | obj-$(CONFIG_SUSPEND) += pm.o sleep.o |
7 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 6 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
8 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 7 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c index 47c7819edb9b..a860ea27e8ae 100644 --- a/arch/arm/mach-prima2/common.c +++ b/arch/arm/mach-prima2/common.c | |||
@@ -34,6 +34,8 @@ static const char *atlas6_dt_match[] __initconst = { | |||
34 | 34 | ||
35 | DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") | 35 | DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") |
36 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | 36 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
37 | .l2c_aux_val = 0, | ||
38 | .l2c_aux_mask = ~0, | ||
37 | .map_io = sirfsoc_map_io, | 39 | .map_io = sirfsoc_map_io, |
38 | .init_late = sirfsoc_init_late, | 40 | .init_late = sirfsoc_init_late, |
39 | .dt_compat = atlas6_dt_match, | 41 | .dt_compat = atlas6_dt_match, |
@@ -48,6 +50,8 @@ static const char *prima2_dt_match[] __initconst = { | |||
48 | 50 | ||
49 | DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") | 51 | DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") |
50 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | 52 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
53 | .l2c_aux_val = 0, | ||
54 | .l2c_aux_mask = ~0, | ||
51 | .map_io = sirfsoc_map_io, | 55 | .map_io = sirfsoc_map_io, |
52 | .dma_zone_size = SZ_256M, | 56 | .dma_zone_size = SZ_256M, |
53 | .init_late = sirfsoc_init_late, | 57 | .init_late = sirfsoc_init_late, |
@@ -63,6 +67,8 @@ static const char *marco_dt_match[] __initconst = { | |||
63 | 67 | ||
64 | DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") | 68 | DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") |
65 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | 69 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
70 | .l2c_aux_val = 0, | ||
71 | .l2c_aux_mask = ~0, | ||
66 | .smp = smp_ops(sirfsoc_smp_ops), | 72 | .smp = smp_ops(sirfsoc_smp_ops), |
67 | .map_io = sirfsoc_map_io, | 73 | .map_io = sirfsoc_map_io, |
68 | .init_late = sirfsoc_init_late, | 74 | .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 index dbd837bdb7f7..000000000000 --- a/arch/arm/mach-prima2/l2x0.c +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | /* | ||
2 | * l2 cache initialization for CSR SiRFprimaII | ||
3 | * | ||
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #include <linux/init.h> | ||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/of.h> | ||
12 | #include <asm/hardware/cache-l2x0.h> | ||
13 | |||
14 | static const struct of_device_id sirf_l2x0_ids[] __initconst = { | ||
15 | { .compatible = "sirf,prima2-pl310-cache", .data = &prima2_l2x0_aux, }, | ||
16 | { .compatible = "sirf,marco-pl310-cache", .data = &marco_l2x0_aux, }, | ||
17 | {}, | ||
18 | }; | ||
19 | |||
20 | static int __init sirfsoc_l2x0_init(void) | ||
21 | { | ||
22 | struct device_node *np; | ||
23 | |||
24 | np = of_find_matching_node(NULL, sirf_l2x0_ids); | ||
25 | if (np) | ||
26 | return l2x0_of_init(0, ~0); | ||
27 | |||
28 | return 0; | ||
29 | } | ||
30 | early_initcall(sirfsoc_l2x0_init); | ||