Commit 2060a20e9f8dda2e2c13db49a18cb91d6cb05340
Committed by
Nitin Garg
1 parent
6425e84cc5
Exists in
smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga
and in
5 other branches
MLK-20135 imx8: partition: not assign resource to domu if not owned
If the resource is not owned by current partition, not assign it to DomU. Signed-off-by: Peng Fan <peng.fan@nxp.com>
Showing 1 changed file with 8 additions and 4 deletions Side-by-side Diff
arch/arm/mach-imx/imx8/partition.c
... | ... | @@ -216,15 +216,19 @@ |
216 | 216 | debug("power off resource %d, err %d\n", rsrc_data[i], err); |
217 | 217 | break; |
218 | 218 | } |
219 | - err = sc_rm_assign_resource(ipc_handle, pt, rsrc_data[i]); | |
220 | - debug("pt %d, resource %d, err %d\n", pt, rsrc_data[i], err); | |
219 | + if (sc_rm_is_resource_owned(ipc_handle, rsrc_data[i])) { | |
220 | + err = sc_rm_assign_resource(ipc_handle, pt, rsrc_data[i]); | |
221 | + debug("pt %d, resource %d, err %d\n", pt, rsrc_data[i], err); | |
222 | + } | |
221 | 223 | } |
222 | 224 | } |
223 | 225 | |
224 | 226 | if (pad_size > 0) { |
225 | 227 | for (i = 0; i < pad_size >> 2; i++) { |
226 | - err = sc_rm_assign_pad(ipc_handle, pt, pad_data[i]); | |
227 | - debug("pt %d, pad %d, err %d\n", pt, pad_data[i], err); | |
228 | + if (sc_rm_is_pad_owned(ipc_handle, pad_data[i])) { | |
229 | + err = sc_rm_assign_pad(ipc_handle, pt, pad_data[i]); | |
230 | + debug("pt %d, pad %d, err %d\n", pt, pad_data[i], err); | |
231 | + } | |
228 | 232 | } |
229 | 233 | } |
230 | 234 |