[PATCH v8 05/05] drivers: sh: Handle PM_GENERIC_DOMAINS_OF=n with r8a7795 MSSR

Magnus Damm
2015-10-01T14:38:07Z

From: Geert Uytterhoeven <geert+renesas@glider.be>

If the new CPG/MSSR device node is present, but
CONFIG_PM_GENERIC_DOMAINS_OF=n, the legacy clock domain should be
enabled. Else the module clocks are not properly enabled when needed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

Changes since V7: (Magnus Damm <damm+renesas@opensource.se>)
- New patch, based on local r8a7791 patch from Geert
"drivers: sh: Handle CONFIG_PM_GENERIC_DOMAINS_OF=n with new CPG/MSSR"
- Modified to match on r8a7795

drivers/sh/pm_runtime.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

--- 0001/drivers/sh/pm_runtime.c
+++ work/drivers/sh/pm_runtime.c 2015-10-01 18:51:47.280513000 +0900
@@ -36,7 +36,10 @@ static int __init sh_pm_runtime_init(voi
{
if (IS_ENABLED(CONFIG_ARCH_SHMOBILE)) {
if (!of_find_compatible_node(NULL, NULL,
- "renesas,cpg-mstp-clocks"))
+ "renesas,cpg-mstp-clocks") &&
+ (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS_OF) ||
+ !of_find_compatible_node(NULL, NULL,
+ "renesas,r8a7795-cpg-mssr")))
return 0;
if (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS_OF) &&
of_find_node_with_property(NULL, "#power-domain-cells"))