MLK-20945-1 imx8-power-domain: Check owned resource in power on
authorYe Li <ye.li@nxp.com>
Tue, 19 Feb 2019 07:34:52 +0000 (23:34 -0800)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 11:28:18 +0000 (04:28 -0700)
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 <ye.li@nxp.com>
(cherry picked from commit b62b82ad595a744f07306db4b88d644ae024872a)

drivers/power/domain/imx8-power-domain.c

index bce38d5..113e916 100644 (file)
@@ -62,6 +62,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) {