
commit: dm: core: Enable optional use of fdt_translate_address()
enables device's bus/child address translation method, depending on bus 'ranges' property and including child 'reg' property. This change makes impossible to decode the 'reg' for node with '#size-cells' equal to 0.
Such case is possible by the specification and is also used in U-Boot, e.g. by I2C uclass or S5P GPIO - the last one is broken at present.
For this purpose this patch set introduces new core function: fdt_addr_t dev_get_reg(struct udevice *dev) which returns the 'reg' value in the same way as previously dev_get_addr().
This fixes s5p gpio driver and booting issue on few Exynos based boards: - Trats2 - Odroid U3/X2
As an example of use, this patch set also modifies i2c uclass driver by using the new function for getting chip address.
Przemyslaw Marczak (3): dm: core: extend API by new function: dev_get_reg() gpio: s5p: use dev_get_reg() instead of dev_get_addr() dm: i2c: get chip address with dev_get_reg()
drivers/core/device.c | 17 +++++++++++++---- drivers/gpio/s5p_gpio.c | 2 +- drivers/i2c/i2c-uclass.c | 17 ++++++++--------- include/dm/device.h | 23 +++++++++++++++++++++++ include/i2c.h | 11 ++++------- 5 files changed, 49 insertions(+), 21 deletions(-)