aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv8/fsl-layerscape/icid.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/armv8/fsl-layerscape/icid.c')
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/icid.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/icid.c b/arch/arm/cpu/armv8/fsl-layerscape/icid.c
index 82c5a8b..25cd82f 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/icid.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/icid.c
@@ -116,8 +116,7 @@ void fdt_fixup_fman_port_icid_by_compat(void *blob, int smmu_ph,
int noff, len, icid;
const u32 *prop;
- noff = fdt_node_offset_by_compatible(blob, -1, compat);
- while (noff > 0) {
+ fdt_for_each_node_by_compatible(noff, blob, -1, compat) {
prop = fdt_getprop(blob, noff, "cell-index", &len);
if (!prop) {
printf("WARNING missing cell-index for fman port\n");
@@ -137,8 +136,6 @@ void fdt_fixup_fman_port_icid_by_compat(void *blob, int smmu_ph,
}
fdt_set_iommu_prop(blob, noff, smmu_ph, (u32 *)&icid, 1);
-
- noff = fdt_node_offset_by_compatible(blob, noff, compat);
}
}