Skip to content

Commit 3090bda

Browse files
committed
kboot: Add isp-heap mem region to phandle
So of_iommu can detect it. Signed-off-by: Eileen Yoon <[email protected]>
1 parent c1b0b39 commit 3090bda

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/kboot.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1841,10 +1841,15 @@ static int dt_set_isp_fwdata(void)
18411841
int mem_node = dt_get_or_add_reserved_mem("isp-heap", "apple,asc-mem", phys, size);
18421842
if (mem_node < 0)
18431843
return ret;
1844+
uint32_t mem_phandle = fdt_get_phandle(dt, mem_node);
18441845

18451846
ret = dt_device_set_reserved_mem(mem_node, "isp-heap", dev_phandle, iova, size);
18461847
if (ret < 0)
1847-
return ret;
1848+
bail("FDT: couldn't set 'isp-heap' reserved mem: %d\n", ret);
1849+
1850+
ret = dt_device_add_mem_region(fdt_path, mem_phandle, NULL);
1851+
if (ret < 0)
1852+
bail("FDT: couldn't add 'isp-heap' reserved mem: %d\n", ret);
18481853

18491854
return 0;
18501855
}

0 commit comments

Comments
 (0)