summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/imx8
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2020-05-05 20:28:46 +0800
committerStefano Babic <sbabic@denx.de>2020-05-10 20:55:21 +0200
commitd52a03b130565e6b01dcbe656ebeb611d5ee1aa1 (patch)
tree444f25161d5fc187e2131e1ef3656ae894c8ffd0 /arch/arm/mach-imx/imx8
parenta6c36f15ebc5e004c5914bb55ef93bb453e640db (diff)
downloadu-boot-d52a03b130565e6b01dcbe656ebeb611d5ee1aa1.tar.gz
u-boot-d52a03b130565e6b01dcbe656ebeb611d5ee1aa1.tar.bz2
u-boot-d52a03b130565e6b01dcbe656ebeb611d5ee1aa1.zip
imx8: cpu: check resource owned after sid fail
When we create software partition, we still need let parent partition to configure sid, so move the check after sid failed. Acked-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'arch/arm/mach-imx/imx8')
-rw-r--r--arch/arm/mach-imx/imx8/fdt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/imx8/fdt.c b/arch/arm/mach-imx/imx8/fdt.c
index 5993645378..9a6822a929 100644
--- a/arch/arm/mach-imx/imx8/fdt.c
+++ b/arch/arm/mach-imx/imx8/fdt.c
@@ -106,13 +106,13 @@ static int config_smmu_resource_sid(int rsrc, int sid)
{
int err;
- if (!check_owned_resource(rsrc)) {
- printf("%s rsrc[%d] not owned\n", __func__, rsrc);
- return -1;
- }
err = sc_rm_set_master_sid(-1, rsrc, sid);
debug("set_master_sid rsrc=%d sid=0x%x err=%d\n", rsrc, sid, err);
if (err != SC_ERR_NONE) {
+ if (!check_owned_resource(rsrc)) {
+ printf("%s rsrc[%d] not owned\n", __func__, rsrc);
+ return -1;
+ }
pr_err("fail set_master_sid rsrc=%d sid=0x%x err=%d\n", rsrc, sid, err);
return -EINVAL;
}