u-boot/drivers
Mario Six e8d5291824 core: ofnode: Fix translation for #size-cells == 0
Commit 286ede6 ("drivers: core: Add translation in live tree case") made
dev_get_addr always use proper bus translations for addresses read from
the device tree. But this leads to problems with certain busses, e.g.
I2C busses, which run into an error during translation, and hence stop
working.

It turns out that of_translate_address() and fdt_translate_address()
stop the address translation with an error when they're asked to
translate addresses for busses where #size-cells == 0 (comment from
drivers/core/of_addr.c):

 * Note: We consider that crossing any level with #size-cells == 0 to mean
 * that translation is impossible (that is we are not dealing with a value
 * that can be mapped to a cpu physical address). This is not really specified
 * that way, but this is traditionally the way IBM at least do things

To fix this case, we check in both the live-tree and non-live tree-case,
whether the bus of the device whose address is about to be translated
has size-cell size zero. If this is the case, we just read the address
as a plain integer and return it, and only apply bus translations if the
size-cell size if greater than zero.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
Reported-by: Martin Fuzzey <mfuzzey@parkeon.com>
Fixes: 286ede6 ("drivers: core: Add translation in live tree case")
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-04-01 22:19:10 +08:00
..
adc treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
ata Move most CONFIG_HAVE_BLOCK_DEVICE to Kconfig 2018-02-08 19:09:03 -05:00
bios_emulator printk: collect printk stuff into <linux/printk.h> with loglevel support 2017-10-04 10:31:17 -04:00
block SystemACE: Remove 2018-02-13 23:24:22 -05:00
bootcount bootcount: Migrate CONFIG_SYS_BOOTCOUNT_ADDR 2018-02-25 13:41:54 -05:00
clk arm64: zynqmp: Print the value of pl clocks and wdt clock using clk dump 2018-03-23 09:34:44 +01:00
core core: ofnode: Fix translation for #size-cells == 0 2018-04-01 22:19:10 +08:00
cpu dm: cpu: bmips: add BCM6362 support 2018-03-21 23:23:13 +01:00
crypto libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
ddr Revert "drivers/ddr/fsl: Dual-license DDR driver" 2018-02-14 21:34:05 -05:00
demo sandbox: Add 64-bit sandbox 2018-02-18 15:53:48 -07:00
dfu dfu: tftp: Fix arm64 build warnings 2018-02-21 20:28:15 +01:00
dma Convert CONFIG_APBH_DMA et al to Kconfig 2018-02-08 12:48:11 -05:00
firmware libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
fpga fpga: Simplify error path in fpga_add 2018-03-23 09:34:42 +01:00
gpio gpio: omap_gpio: Add DM_FLAG_PRE_RELOC flag 2018-03-22 16:32:30 -04:00
i2c i2c: lpi2c: remove superfluous assignments 2018-03-23 08:28:49 +01:00
input input: indicate that code page 437 is used 2018-03-05 10:06:05 -05:00
led dm: core: Update device_bind_driver_to_node() to use ofnode 2017-06-01 07:03:08 -06:00
mailbox dm: mailbox: Update uclass to support livetree 2017-06-01 07:03:15 -06:00
memory memory: Move TI_AEMIF config to KCONFIG 2016-04-18 17:11:43 -04:00
misc libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
mmc Merge git://git.denx.de/u-boot-sunxi 2018-03-14 13:27:14 -04:00
mtd Merge git://git.denx.de/u-boot-ubi 2018-03-25 12:02:13 -04:00
net net: zynq_gem: Dont run any phy detection logic for GMII case 2018-03-23 09:34:42 +01:00
nvme Move most CONFIG_HAVE_BLOCK_DEVICE to Kconfig 2018-02-08 19:09:03 -05:00
pch dm: Use dm_scan_fdt_dev() directly where possible 2016-07-27 14:15:54 -06:00
pci libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
pcmcia Kconfig; Drop CONFIG_IDE_TI_CARDBUS and associated driver 2017-08-11 15:41:51 -04:00
phy phy: add support for bcm6318 usbh phy 2018-03-21 23:23:13 +01:00
pinctrl pinctrl-uclass: convert to use live dt 2018-03-31 15:59:59 +08:00
power Merge git://git.denx.de/u-boot-sunxi 2018-03-19 18:39:14 -04:00
pwm rockchip: pwm: convert to use live dt 2018-03-13 18:12:35 +01:00
qe libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
ram ram: stm32mp1: add driver 2018-03-19 16:14:21 -04:00
remoteproc dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
reset reset: stm32: adapt driver for stm32mp1 2018-03-19 16:14:22 -04:00
rtc rtc: adding RX8010SJ rtc driver 2018-02-04 12:00:58 +01:00
scsi Move most CONFIG_HAVE_BLOCK_DEVICE to Kconfig 2018-02-08 19:09:03 -05:00
serial arm: stm32: add new architecture for STM32MP family 2018-03-19 16:14:21 -04:00
soc Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
sound libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
spi omap3: spi: Correct ti, pindir-d0-out-d1-in parsing 2018-03-23 23:03:29 +05:30
spmi spmi: msm: display the PMIC Arb version (debug) 2018-01-15 11:35:37 -05:00
sysreset db410c: replace reset driver with psci 2018-01-15 16:29:03 -05:00
thermal thermal: ti-bandgap: Add support for temperature sensor 2017-11-21 08:03:38 -05:00
timer timer: stm32: Add timer support for STM32 SoCs family 2018-03-13 21:45:37 -04:00
tpm treewide: Fix gdsys mail addresses 2018-03-09 09:23:10 -05:00
usb lan7xxx: Require phylib 2018-03-22 15:05:31 -05:00
video video: stm32: stm32_ltdc: set the blending factor 2018-03-19 10:52:30 +01:00
watchdog watchdog: Add Cadence watchdog driver 2018-03-23 09:34:43 +01:00
Kconfig bootcount: add support for bootcounter on EXT filesystem 2017-11-20 09:58:31 +01:00
Makefile spl: add SPL_RESET_SUPPORT 2018-03-19 16:14:20 -04:00