aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-10-10 12:24:58 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-10-16 08:10:14 -0400
commitdf36680f1a71eef97685c30eb9eaf55a6813b6cd (patch)
tree6bf34e2c07d101dab4f93c7863dfb80b23cd8afd /arch
parent99d14a1d9b876c9847608983606fa1928f5bf8f3 (diff)
ARM: integrator: core module registers from compatible strings
This augments the core machine code for the Integrator platforms to get their references to the core module device nodes by using compatible strings instead of predefined node names and rename the CP syscon node to be simply "syscon". Reported-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/integratorap.dts2
-rw-r--r--arch/arm/boot/dts/integratorcp.dts4
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c8
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c8
4 files changed, 17 insertions, 5 deletions
diff --git a/arch/arm/boot/dts/integratorap.dts b/arch/arm/boot/dts/integratorap.dts
index 453ab0ea4d2b..e6be9315ff0a 100644
--- a/arch/arm/boot/dts/integratorap.dts
+++ b/arch/arm/boot/dts/integratorap.dts
@@ -19,7 +19,7 @@
19 }; 19 };
20 20
21 syscon { 21 syscon {
22 /* AP system controller registers */ 22 compatible = "arm,integrator-ap-syscon";
23 reg = <0x11000000 0x100>; 23 reg = <0x11000000 0x100>;
24 interrupt-parent = <&pic>; 24 interrupt-parent = <&pic>;
25 /* These are the logical module IRQs */ 25 /* These are the logical module IRQs */
diff --git a/arch/arm/boot/dts/integratorcp.dts b/arch/arm/boot/dts/integratorcp.dts
index ff1aea0ee043..a3a06b893237 100644
--- a/arch/arm/boot/dts/integratorcp.dts
+++ b/arch/arm/boot/dts/integratorcp.dts
@@ -18,8 +18,8 @@
18 bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk"; 18 bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk";
19 }; 19 };
20 20
21 cpcon { 21 syscon {
22 /* CP controller registers */ 22 compatible = "arm,integrator-cp-syscon";
23 reg = <0xcb000000 0x100>; 23 reg = <0xcb000000 0x100>;
24 }; 24 };
25 25
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index ece47556afe6..d50dc2dbfd89 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -470,6 +470,11 @@ static struct of_dev_auxdata ap_auxdata_lookup[] __initdata = {
470 { /* sentinel */ }, 470 { /* sentinel */ },
471}; 471};
472 472
473static const struct of_device_id ap_syscon_match[] = {
474 { .compatible = "arm,integrator-ap-syscon"},
475 { },
476};
477
473static void __init ap_init_of(void) 478static void __init ap_init_of(void)
474{ 479{
475 unsigned long sc_dec; 480 unsigned long sc_dec;
@@ -486,7 +491,8 @@ static void __init ap_init_of(void)
486 root = of_find_node_by_path("/"); 491 root = of_find_node_by_path("/");
487 if (!root) 492 if (!root)
488 return; 493 return;
489 syscon = of_find_node_by_path("/syscon"); 494
495 syscon = of_find_matching_node(root, ap_syscon_match);
490 if (!syscon) 496 if (!syscon)
491 return; 497 return;
492 498
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 422c3f9b4163..1df6e7602cad 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -286,6 +286,11 @@ static struct of_dev_auxdata intcp_auxdata_lookup[] __initdata = {
286 { /* sentinel */ }, 286 { /* sentinel */ },
287}; 287};
288 288
289static const struct of_device_id intcp_syscon_match[] = {
290 { .compatible = "arm,integrator-cp-syscon"},
291 { },
292};
293
289static void __init intcp_init_of(void) 294static void __init intcp_init_of(void)
290{ 295{
291 struct device_node *root; 296 struct device_node *root;
@@ -300,7 +305,8 @@ static void __init intcp_init_of(void)
300 root = of_find_node_by_path("/"); 305 root = of_find_node_by_path("/");
301 if (!root) 306 if (!root)
302 return; 307 return;
303 cpcon = of_find_node_by_path("/cpcon"); 308
309 cpcon = of_find_matching_node(root, intcp_syscon_match);
304 if (!cpcon) 310 if (!cpcon)
305 return; 311 return;
306 312