From: Peng Fan Date: Tue, 13 Mar 2018 01:40:37 +0000 (+0800) Subject: MLK-17781 arm: imx8: check SC_R_LAST when power off domains X-Git-Tag: rel_imx_4.9.88_2.0.0_ga~36 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=a690fe2f3c0884b51aa5219cbd788381897b539a;p=u-boot.git MLK-17781 arm: imx8: check SC_R_LAST when power off domains To those who use power domains that take SC_R_LAST as resource id, need to check that in case those are error. Signed-off-by: Peng Fan --- diff --git a/arch/arm/cpu/armv8/imx8/cpu.c b/arch/arm/cpu/armv8/imx8/cpu.c index 178b72f112..8c4dfd16d0 100644 --- a/arch/arm/cpu/armv8/imx8/cpu.c +++ b/arch/arm/cpu/armv8/imx8/cpu.c @@ -1,5 +1,5 @@ /* - * Copyright 2017 NXP + * Copyright 2017-2018 NXP * * SPDX-License-Identifier: GPL-2.0+ * @@ -861,6 +861,7 @@ static void update_fdt_with_owned_resources(void *blob) int depth, next_depth; unsigned int rsrc_id; const fdt32_t *php; + const char *name; int rc; for (offset = fdt_next_node(blob, offset, &depth); offset > 0; @@ -898,6 +899,12 @@ static void update_fdt_with_owned_resources(void *blob) addr = fdt_node_offset_by_phandle(blob, fdt32_to_cpu(*php)); rsrc_id = fdtdec_get_uint(blob, addr, "reg", 0); + if (rsrc_id == SC_R_LAST) { + name = fdt_get_name(blob, offset, NULL); + printf("%s's power domain use SC_R_LAST\n", name); + continue; + } + debug("power-domains phandle 0x%x, addr 0x%x, resource id %u\n", fdt32_to_cpu(*php), addr, rsrc_id);