Searched hist:"486 ce4e44537b7688d6223e5acc09fd93d89904b" (Results 1 – 2 of 2) sorted by relevance
| /rk3399_rockchip-uboot/drivers/firmware/scmi/ |
| H A D | smt.c | 486ce4e44537b7688d6223e5acc09fd93d89904b Thu Sep 12 08:30:51 UTC 2024 Xuhui Lin <xuhui.lin@rock-chips.com> UPSTREAM: dm: core: Add address translation in fdt_get_resource
Today of_address_to_resource() is called only in ofnode_read_resource() for livetree support and fdt_get_resource() is called when livetree is not supported.
The fdt_get_resource() doesn't do the address translation so when it is required, but the address translation is done by ofnode_read_resource() caller, for example in drivers/firmware/scmi/smt.c::scmi_dt_get_smt_buffer() { ... ret = ofnode_read_resource(args.node, 0, &resource); if (ret) return ret;
faddr = cpu_to_fdt32(resource.start); paddr = ofnode_translate_address(args.node, &faddr); ...
The both behavior should be aligned and the address translation must be called in fdt_get_resource() and removed for each caller.
Change-Id: Ic4a3a19fe7401fc21e446793f453bbc1a8ab4001 Fixes: a44810123f9e ("dm: core: Add dev_read_resource() to read device resources") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>
|
| /rk3399_rockchip-uboot/lib/ |
| H A D | fdtdec.c | 486ce4e44537b7688d6223e5acc09fd93d89904b Thu Sep 12 08:30:51 UTC 2024 Xuhui Lin <xuhui.lin@rock-chips.com> UPSTREAM: dm: core: Add address translation in fdt_get_resource
Today of_address_to_resource() is called only in ofnode_read_resource() for livetree support and fdt_get_resource() is called when livetree is not supported.
The fdt_get_resource() doesn't do the address translation so when it is required, but the address translation is done by ofnode_read_resource() caller, for example in drivers/firmware/scmi/smt.c::scmi_dt_get_smt_buffer() { ... ret = ofnode_read_resource(args.node, 0, &resource); if (ret) return ret;
faddr = cpu_to_fdt32(resource.start); paddr = ofnode_translate_address(args.node, &faddr); ...
The both behavior should be aligned and the address translation must be called in fdt_get_resource() and removed for each caller.
Change-Id: Ic4a3a19fe7401fc21e446793f453bbc1a8ab4001 Fixes: a44810123f9e ("dm: core: Add dev_read_resource() to read device resources") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>
|