From 2fb72440b697e1f2cb12790873df159160c22bcf Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 5 Feb 2021 14:21:41 +0100 Subject: [PATCH 1/2] soc: renesas: rmobile-sysc: Remove unneeded platform includes As of commit b587288001f05c0e ("ARM: shmobile: R-Mobile: Remove legacy PM Domain code"), the R-Mobile System Controller driver no longer handles the adding of platform devices to PM Domains, but delegates that to the PM Domain core code. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210205132141.1920137-1-geert+renesas@glider.be --- drivers/soc/renesas/rmobile-sysc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/soc/renesas/rmobile-sysc.c b/drivers/soc/renesas/rmobile-sysc.c index 9046b8c933cb..bf64d052f924 100644 --- a/drivers/soc/renesas/rmobile-sysc.c +++ b/drivers/soc/renesas/rmobile-sysc.c @@ -14,8 +14,6 @@ #include #include #include -#include -#include #include #include #include From 1d9ffbc6b185561c65a5a599562dbb6c5d66e7d1 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 16 Feb 2021 13:39:58 +0100 Subject: [PATCH 2/2] soc: renesas: rmobile-sysc: Mark fwnode when PM domain is added Currently, there are two drivers binding to the R-Mobile System Controller (SYSC): - The rmobile-sysc driver registers PM domains from a core_initcall(), and does not use a platform driver, - The optional rmobile-reset driver registers a reset handler, and does use a platform driver. As fw_devlink only considers devices, commit bab2d712eeaf9d60 ("PM: domains: Mark fwnodes when their powerdomain is added/removed") works only for PM Domain drivers where the DT node is a real device node, and not for PM Domain drivers using a hierarchical representation inside a subnode. Hence if fw_devlink is enabled, probing of on-chip devices that are part of the SYSC PM domain is deferred until the optional rmobile-reset driver has been bound. If the rmobile-reset driver is not available, this will never happen, and thus lead to complete system boot failures. Fix this by explicitly marking the fwnode initialized. Suggested-by: Saravana Kannan Signed-off-by: Geert Uytterhoeven Acked-by: Saravana Kannan Link: https://lore.kernel.org/r/20210216123958.3180014-1-geert+renesas@glider.be --- drivers/soc/renesas/rmobile-sysc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soc/renesas/rmobile-sysc.c b/drivers/soc/renesas/rmobile-sysc.c index bf64d052f924..204e6135180b 100644 --- a/drivers/soc/renesas/rmobile-sysc.c +++ b/drivers/soc/renesas/rmobile-sysc.c @@ -342,6 +342,8 @@ static int __init rmobile_init_pm_domains(void) of_node_put(np); break; } + + fwnode_dev_initialized(&np->fwnode, true); } put_special_pds();