u-boot-brain/drivers/mtd
Andre Przywara 492b9917c6 cfi_flash: Fix devicetree address determination
The cfi-flash driver uses an open-coded version of the generic
algorithm to decode and translate multiple frames of a "reg" property.

This starts off the wrong foot by using the address-cells and size-cells
properties of *this* very node, and not of the parent. This somewhat
happened to work back when we were using a wrong default size of 2,
but broke about a year ago with commit 0ba41ce1b7 ("libfdt: return
correct value if #size-cells property is not present").

Instead of fixing the reinvented wheel, just use the generic function
that does all of this properly.

This fixes U-Boot on QEMU (-arm64), which was crashing due to decoding
a wrong flash base address:
DRAM:  1 GiB
Flash: "Synchronous Abort" handler, esr 0x96000044
elr: 00000000000211dc lr : 00000000000211b0 (reloc)
elr: 000000007ff5e1dc lr : 000000007ff5e1b0
x0 : 00000000000000f0 x1 : 000000007ff5e1d8
x2 : 000000007edfbc48 x3 : 0000000000000000
x4 : 0000000000000000 x5 : 00000000000000f0
x6 : 000000007edfbc2c x7 : 0000000000000000
x8 : 000000007ffd8d70 x9 : 000000000000000c
x10: 0400000000000003 x11: 0000000000000055
     ^^^^^^^^^^^^^^^^

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-10-08 09:04:41 +02:00
..
nand nand: vybrid: Re-introduce vf610_nfc.dev 2020-09-30 08:53:01 -04:00
onenand common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
spi Merge branch 'next' 2020-10-05 14:10:59 -04:00
ubi common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
ubispl common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
altera_qspi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
cfi_flash.c cfi_flash: Fix devicetree address determination 2020-10-08 09:04:41 +02:00
cfi_mtd.c mtd: cfi_mtd: Use DMA for reads 2020-10-08 09:04:41 +02:00
hbmc-am654.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
jedec_flash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig mtd: fix typos in drivers/mtd/Kconfig, drivers/mtd/renesas_rpc_hf.c 2020-09-29 13:18:31 -04:00
Makefile mtd: Makefile: deep cleanup 2019-12-04 17:10:51 -05:00
mtd_uboot.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
mtd-uclass.c mtd: uclass: add probe function 2018-10-02 22:12:31 +05:30
mtdconcat.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
mtdcore.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mtdcore.h mtd: move definitions to enlarge their range 2018-09-20 20:10:49 +05:30
mtdpart.c mtd: mtdpart: use uint64_t instead of int for cur_off 2020-07-17 10:47:19 -04:00
mw_eeprom.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pic32_flash.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
renesas_rpc_hf.c mtd: fix typos in drivers/mtd/Kconfig, drivers/mtd/renesas_rpc_hf.c 2020-09-29 13:18:31 -04:00
st_smi.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
stm32_flash.c common: Drop flash.h from common header 2020-05-18 14:53:28 -04:00
stm32_flash.h stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00