]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
power: imx8: Check owned resource in power on
authorYe Li <ye.li@nxp.com>
Mon, 4 May 2020 13:16:53 +0000 (21:16 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 10 May 2020 18:55:20 +0000 (20:55 +0200)
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>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/power/domain/imx8-power-domain-legacy.c

index b68be40766de5363252ecaff7546556a33666710..a5f2f8a4457fa1d7ab59c052a9100925df069a76 100644 (file)
@@ -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) {