u-boot-brain/drivers/spi
Masahiro Yamada 8613c8d897 treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr()
Use the _ptr suffixed variant instead of casting. Also, convert it to
dev_read_addr_ptr(), which is safe to CONFIG_OF_LIVE.

One curious part is an error check like follows in
drivers/watchdog/omap_wdt.c:

    priv->regs = (struct wd_timer *)devfdt_get_addr(dev);
    if (!priv->regs)
            return -EINVAL;

devfdt_get_addr() returns FDT_ADDR_T_NONE (i.e. -1) on error.
So, this code does not catch any error in DT parsing.

dev_read_addr_ptr() returns NULL on error, so this error check
will work.

I generated this commit by the following command:

 $ find . -name .git -prune -o -name '*.[ch]' -type f -print | \
   xargs sed -i -e 's/([^*)]*\*)devfdt_get_addr(/dev_read_addr_ptr(/'

I manually fixed drivers/usb/host/ehci-mx6.c

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-07-25 14:46:57 -06:00
..
altera_spi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
atcspi200_spi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
ath79_spi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
atmel_spi.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
atmel_spi.h spi: atmel: Remove nondm code 2020-06-11 15:14:04 +05:30
atmel-quadspi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
bcm63xx_hsspi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
bcm63xx_spi.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bcmstb_spi.c board: arm: Add support for Broadcom BCM7445 2018-07-10 16:55:57 -04:00
cadence_qspi_apb.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
cadence_qspi.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cadence_qspi.h spi: cadence-qspi: Add direct mode support 2020-01-27 22:27:22 +05:30
cf_spi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
davinci_spi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
designware_spi.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
exynos_spi.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
fsl_dspi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
fsl_espi.c dm: spi: Convert Freescale ESPI driver to driver model 2020-06-18 21:47:08 +05:30
fsl_qspi.c spi: fsl_qspi: Support to use full AHB space on i.MX 2020-07-16 11:19:43 +02:00
ich.c x86: spi: Rewrite logic for obtaining the SPI memory map 2020-06-02 09:16:13 +08:00
ich.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig spi: fsl_qspi: Support to use full AHB space on i.MX 2020-07-16 11:19:43 +02:00
kirkwood_spi.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
Makefile Convert CONFIG_CADENCE_QSPI to Kconfig 2020-06-29 13:34:43 -04:00
meson_spifc.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mpc8xx_spi.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mpc8xxx_spi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mscc_bb_spi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mt7621_spi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mtk_snfi_spi.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
mvebu_a3700_spi.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
mxc_spi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
mxs_spi.c core: add support for U_BOOT_DRIVER_ALIAS 2020-07-09 18:57:22 -06:00
nxp_fspi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
omap3_spi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
pic32_spi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pl022_spi.c dm: platform_data: spi: s/pl022_spi.h/spi_pl022.h 2018-11-27 21:06:46 +05:30
renesas_rpc_spi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
rk_spi.c drivers: spi: rk_spi: Add support for RK3328 2020-07-22 20:22:03 +08:00
rk_spi.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sandbox_spi.c dm: acpi: Enhance acpi_get_name() 2020-07-17 14:32:24 +08:00
sh_qspi.c spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI* 2020-06-29 13:34:43 -04:00
soft_spi.c spi: add support for all spi modes with soft spi 2020-07-09 20:58:06 +05:30
spi-emul-uclass.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spi-mem-nodm.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
spi-mem.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
spi-sifive.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
spi-sunxi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
spi-uclass.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
spi.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
stm32_qspi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
stm32_spi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
tegra_spi.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tegra20_sflash.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
tegra20_slink.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
tegra114_spi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
tegra210_qspi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ti_qspi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
uniphier_spi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
xilinx_spi.c spi: zynq_[q]spi: Convert config's to macro's 2020-06-24 13:11:08 +02:00
zynq_qspi.c spi: zynq_[q]spi: Convert config's to macro's 2020-06-24 13:11:08 +02:00
zynq_spi.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
zynqmp_gqspi.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00