summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorLeonard Crestez <leonard.crestez@nxp.com>2019-02-27 21:50:44 +0200
committerLeonard Crestez <leonard.crestez@nxp.com>2019-03-11 13:33:20 +0200
commitf573dbd5ce119740ad30b663e3599cb75e6f67ed (patch)
treea2566866aac1db9a8a21d697c603c85e508a1568 /drivers/soc
parent0a5c751a39c4a79f209df199a13b7095e35c1f09 (diff)
MLK-20958-2 imx8: Replace SC_R_LAST with SC_R_NONE in DTB
We are currently using SC_R_LAST as a marker for imx8 power domain tree nodes without a resource attached. This value is compiled into dtb as part of the linux build and used by uboot. The SC_R_LAST constant changes frequently as SCFW resources are added (by design) and every time we need to update linux and uboot headers together or boot can fail. Fix this by replacing SC_R_LAST usage with a new constant SC_R_NONE defined to be 0xFFF0. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/imx/pm-domains.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/soc/imx/pm-domains.c b/drivers/soc/imx/pm-domains.c
index 3c7f7250caed..a585fa1f802f 100644
--- a/drivers/soc/imx/pm-domains.c
+++ b/drivers/soc/imx/pm-domains.c
@@ -68,7 +68,7 @@ static int imx8_pd_power(struct generic_pm_domain *domain, bool power_on)
pd = container_of(domain, struct imx8_pm_domain, pd);
- if (pd->rsrc_id == SC_R_LAST)
+ if (pd->rsrc_id == SC_R_NONE)
return 0;
/* keep uart console power on for no_console_suspend */
@@ -364,7 +364,7 @@ static int __init imx8_add_pm_domains(struct device_node *parent,
if (!of_property_read_u32(np, "reg", &rsrc_id))
imx8_pd->rsrc_id = rsrc_id;
- if (imx8_pd->rsrc_id != SC_R_LAST) {
+ if (imx8_pd->rsrc_id != SC_R_NONE) {
imx8_pd_setup(imx8_pd);
if (of_property_read_bool(np, "early_power_on")
@@ -422,7 +422,7 @@ static int __init imx8_init_pm_domains(void)
if (!of_property_read_u32(np, "reg", &rsrc_id))
imx8_pd->rsrc_id = rsrc_id;
- if (imx8_pd->rsrc_id != SC_R_LAST)
+ if (imx8_pd->rsrc_id != SC_R_NONE)
imx8_pd_setup(imx8_pd);
INIT_LIST_HEAD(&imx8_pd->clks);