From patchwork Sun May 3 14:33:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 244924 List-Id: U-Boot discussion From: peng.fan at nxp.com (Peng Fan) Date: Sun, 3 May 2020 22:33:22 +0800 Subject: [PATCH 4/5] power: imx8: Check owned resource in power on In-Reply-To: <20200503143323.17334-1-peng.fan@nxp.com> References: <20200503143323.17334-1-peng.fan@nxp.com> Message-ID: <20200503143323.17334-4-peng.fan@nxp.com> From: Ye Li When fspi is assigned to M4, we have to let the fspi probe failed when its power domain is failed to power up. Because not all devices have power domain (for example, external devices on the board). Current checking resource owner in power domain probe is not good, change to check it in power on. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/power/domain/imx8-power-domain-legacy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c index b68be40766..a5f2f8a445 100644 --- a/drivers/power/domain/imx8-power-domain-legacy.c +++ b/drivers/power/domain/imx8-power-domain-legacy.c @@ -91,6 +91,9 @@ static int imx8_power_domain_on(struct power_domain *power_domain) return 0; if (pdata->resource_id != SC_R_LAST) { + if (!sc_rm_is_resource_owned(-1, pdata->resource_id)) + printf("%s [%d] not owned by curr partition\n", dev->name, pdata->resource_id); + ret = sc_pm_set_resource_power_mode(-1, pdata->resource_id, SC_PM_PW_MODE_ON); if (ret) {