]> git.baikalelectronics.ru Git - kernel.git/commit
soc: renesas: rcar-sysc: Make PM domain initialization more robust
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 5 Jun 2018 15:05:15 +0000 (17:05 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 8 Jun 2018 08:04:25 +0000 (10:04 +0200)
commit76796611bd028404cd6d02b127ae2794275578c5
treea7d412f6ad63fb6e5f36f27ff1d070cade182012
parent3b1c87c6231bd90b7c855a1ec301df54c75c0f2a
soc: renesas: rcar-sysc: Make PM domain initialization more robust

The quirk for R-Car E3 ES1.0 added in commit 3b1c87c6231bd90b ("soc:
renesas: r8a77990-sysc: Add workaround for 3DG-{A,B}") makes the 3DG-A
PM domain a subdomain of the 3DG-B PM domain.  However, registering
3DG-A with its parent fails silently, as the 3DG-B PM domain hasn't been
registered yet, and such failures are never reported.

Fix this by:
  1. Splitting PM Domain initialization in two steps, so all PM domains
     are registered before any child-parent links are established,
  2. Reporting any failures in establishing child-parent relations.

Check for and report pm_genpd_init() failures, too, as that function
gained a return value in commit 8fa337f36839a2cb ("PM / Domains: Convert
pm_genpd_init() to return an error code").

Fixes: 3b1c87c6231bd90b ("soc: renesas: r8a77990-sysc: Add workaround for 3DG-{A,B}")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/soc/renesas/rcar-sysc.c