Commit 7b800eb12b6501b9f8d78e492720c584d2cb4c31

Authored by Peng Fan
1 parent 27d6b4cf3d

MLK-20010 imx8: ignore power off domu resources when domu-init-ignore-poweroff yes

When domu-init-ignore-poweroff set to yes, initially not power off
resources owned by DomU.

When supporting M4 + Android Auto, M4 and Android Auto shared display,
but currently no partition created in M4 for display, so
scu_rm will power off the display and cause android auto error.
Let ignore power off first.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>

Showing 1 changed file with 10 additions and 0 deletions Side-by-side Diff

arch/arm/mach-imx/imx8/partition.c
... ... @@ -122,10 +122,18 @@
122 122 int i, ret;
123 123 u32 *rsrc_data = NULL, *pad_data = NULL;
124 124 const struct fdt_property *prop;
  125 + bool init_ignore_domu_power = false;
  126 + char *tmp;
125 127 void *fdt;
126 128  
127 129 ipc_handle = gd->arch.ipc_channel_handle;
128 130  
  131 + tmp = env_get("domu-init-ignore-poweroff");
  132 + if (tmp && !strncmp(tmp, "yes", 3)) {
  133 + init_ignore_domu_power = true;
  134 + printf("ignore init power off domu power\n");
  135 + }
  136 +
129 137 if (argc)
130 138 fdt = (void *)simple_strtoul(argv[0], NULL, 16);
131 139 else
... ... @@ -201,6 +209,8 @@
201 209 debug("power on resource %d, err %d\n", rsrc_data[i], err);
202 210 break;
203 211 default:
  212 + if (init_ignore_domu_power)
  213 + break;
204 214 err = sc_pm_set_resource_power_mode(ipc_handle, rsrc_data[i], SC_PM_PW_MODE_OFF);
205 215 if (err)
206 216 debug("power off resource %d, err %d\n", rsrc_data[i], err);