summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLeonard Crestez <leonard.crestez@nxp.com>2019-02-27 21:51:26 +0200
committerLeonard Crestez <leonard.crestez@nxp.com>2019-03-11 13:34:38 +0200
commit93f302a6642adedfdd6336b22d08f32284539e35 (patch)
tree77588c809f9f376221da975c2bd5e725ec1ba944 /drivers
parentcc76365cb15dc9d4ba3983ec93094c6017e12d83 (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')
-rw-r--r--drivers/power/domain/imx8-power-domain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/power/domain/imx8-power-domain.c b/drivers/power/domain/imx8-power-domain.c
index 2fa90fb99d..5f3769d766 100644
--- a/drivers/power/domain/imx8-power-domain.c
+++ b/drivers/power/domain/imx8-power-domain.c
@@ -59,7 +59,7 @@ static int imx8_power_domain_on(struct power_domain *power_domain)
if (ppriv->state_on)
return 0;
- if (pdata->resource_id != SC_R_LAST) {
+ if (pdata->resource_id != SC_R_NONE) {
if (!sc_rm_is_resource_owned(ipcHndl, pdata->resource_id))
printf("%s [%d] not owned by curr partition\n", dev->name, pdata->resource_id);
@@ -107,7 +107,7 @@ static int imx8_power_domain_off_node(struct power_domain *power_domain)
}
}
- if (pdata->resource_id != SC_R_LAST) {
+ if (pdata->resource_id != SC_R_NONE) {
ret = sc_pm_set_resource_power_mode(ipcHndl, pdata->resource_id, SC_PM_PW_MODE_OFF);
if (ret) {
if (!sc_rm_is_resource_owned(ipcHndl, pdata->resource_id)) {
@@ -163,7 +163,7 @@ static int imx8_power_domain_off_parentnodes(struct power_domain *power_domain)
}
/* power off parent */
- if (pdata->resource_id != SC_R_LAST) {
+ if (pdata->resource_id != SC_R_NONE) {
ret = sc_pm_set_resource_power_mode(ipcHndl, pdata->resource_id, SC_PM_PW_MODE_OFF);
if (ret) {
printf("Error: %s Power off failed! (error = %d)\n", parent->name, ret);