u-boot/drivers/net/mscc_eswitch
Patrick Delaunay feb7ac457c 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.

Fixes: a44810123f ("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>
2021-04-29 03:23:39 -07:00
..
felix_switch.c drivers: net: Add Felix DSA switch driver 2021-02-16 12:38:36 -05:00
jr2_switch.c dm: core: Add address translation in fdt_get_resource 2021-04-29 03:23:39 -07:00
Kconfig drivers: net: Add Felix DSA switch driver 2021-02-16 12:38:36 -05:00
luton_switch.c dm: treewide: Rename dev_get_platdata() to dev_get_plat() 2020-12-13 16:51:09 -07:00
Makefile drivers: net: Add Felix DSA switch driver 2021-02-16 12:38:36 -05:00
mscc_mac_table.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mscc_mac_table.h net: mscc: Move mac_table_add function into different file. 2019-02-01 14:13:36 +01:00
mscc_miim.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mscc_miim.h net: mscc: refactor mscc_miim 2019-07-15 13:32:25 -05:00
mscc_xfer.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mscc_xfer.h net: mscc: Move ocelot_send and ocelot_recv in a different file. 2019-02-01 14:13:36 +01:00
ocelot_switch.c dm: core: Add address translation in fdt_get_resource 2021-04-29 03:23:39 -07:00
serval_switch.c dm: core: Add address translation in fdt_get_resource 2021-04-29 03:23:39 -07:00
servalt_switch.c dm: core: Add address translation in fdt_get_resource 2021-04-29 03:23:39 -07:00