Skip to content

Commit dcd560c

Browse files
ctmarinasSamuel Ortiz
authored andcommitted
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>
1 parent e123793 commit dcd560c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎drivers/mfd/vexpress-sysreg.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,15 @@ void __init vexpress_sysreg_early_init(void __iomem *base)
338338

339339
void __init vexpress_sysreg_of_early_init(void)
340340
{
341-
struct device_node *node = of_find_compatible_node(NULL, NULL,
342-
"arm,vexpress-sysreg");
341+
struct device_node *node;
343342

343+
if (vexpress_sysreg_base)
344+
return;
345+
346+
node = of_find_compatible_node(NULL, NULL, "arm,vexpress-sysreg");
344347
if (node) {
345348
vexpress_sysreg_base = of_iomap(node, 0);
346349
vexpress_sysreg_setup(node);
347-
} else {
348-
pr_info("vexpress-sysreg: No Device Tree node found.");
349350
}
350351
}
351352

@@ -515,6 +516,7 @@ static struct platform_driver vexpress_sysreg_driver = {
515516

516517
static int __init vexpress_sysreg_init(void)
517518
{
519+
vexpress_sysreg_of_early_init();
518520
return platform_driver_register(&vexpress_sysreg_driver);
519521
}
520522
core_initcall(vexpress_sysreg_init);

0 commit comments

Comments
 (0)