diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2013-02-04 13:08:02 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-02-13 18:22:59 -0500 |
commit | dcd560c8587171bb22c75c41ac2a70986bbbde7f (patch) | |
tree | 697be49ca14a2bbcc2937f91a0012665ca09bfb6 /drivers/mfd/vexpress-sysreg.c | |
parent | e12379320b2e1ceffc4211ad174989bc042149d9 (diff) |
mfd: vexpress: Allow vexpress-sysreg to self-initialise
The vexpress_sysreg_init() is a core_initcall() already and it can
trigger the early initialisation if a matching node is found. This patch
allows the SoC code to avoid calling vexpress_sysreg_of_early_init()
explicitly.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/vexpress-sysreg.c')
-rw-r--r-- | drivers/mfd/vexpress-sysreg.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index 51c3ca263bf5..a4a43230abcd 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c | |||
@@ -338,14 +338,15 @@ void __init vexpress_sysreg_early_init(void __iomem *base) | |||
338 | 338 | ||
339 | void __init vexpress_sysreg_of_early_init(void) | 339 | void __init vexpress_sysreg_of_early_init(void) |
340 | { | 340 | { |
341 | struct device_node *node = of_find_compatible_node(NULL, NULL, | 341 | struct device_node *node; |
342 | "arm,vexpress-sysreg"); | ||
343 | 342 | ||
343 | if (vexpress_sysreg_base) | ||
344 | return; | ||
345 | |||
346 | node = of_find_compatible_node(NULL, NULL, "arm,vexpress-sysreg"); | ||
344 | if (node) { | 347 | if (node) { |
345 | vexpress_sysreg_base = of_iomap(node, 0); | 348 | vexpress_sysreg_base = of_iomap(node, 0); |
346 | vexpress_sysreg_setup(node); | 349 | vexpress_sysreg_setup(node); |
347 | } else { | ||
348 | pr_info("vexpress-sysreg: No Device Tree node found."); | ||
349 | } | 350 | } |
350 | } | 351 | } |
351 | 352 | ||
@@ -515,6 +516,7 @@ static struct platform_driver vexpress_sysreg_driver = { | |||
515 | 516 | ||
516 | static int __init vexpress_sysreg_init(void) | 517 | static int __init vexpress_sysreg_init(void) |
517 | { | 518 | { |
519 | vexpress_sysreg_of_early_init(); | ||
518 | return platform_driver_register(&vexpress_sysreg_driver); | 520 | return platform_driver_register(&vexpress_sysreg_driver); |
519 | } | 521 | } |
520 | core_initcall(vexpress_sysreg_init); | 522 | core_initcall(vexpress_sysreg_init); |