u-boot-brain/arch/arm
Lukasz Majewski 56c4046038 spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI*
This change allows more fine tuning of driver model based SPI support in
SPL and TPL. It is now possible to explicitly enable/disable the DM_SPI
support in SPL and TPL via Kconfig option.

Before this change it was necessary to use:
    /* SPI Flash Configs */
    #if defined(CONFIG_SPL_BUILD)
    #undef CONFIG_DM_SPI
    #undef CONFIG_DM_SPI_FLASH
    #undef CONFIG_SPI_FLASH_MTD
    #endif

in the ./include/configs/<board>.h, which is error prone and shall be
avoided when we strive to switch to Kconfig.

The goal of this patch:

Provide distinction for DM_SPI support in both U-Boot proper and SPL (TPL).
Valid use case is when U-Boot proper wants to use DM_SPI, but SPL must
still support non DM driver.

Another use case is the conversion of non DM/DTS SPI driver to support
DM/DTS. When such driver needs to work in both SPL and U-Boot proper, the
distinction is needed in Kconfig (also if SPL version of the driver
supports OF_PLATDATA).

In the end of the day one would have to support following use cases (in
single driver file - e.g. mxs_spi.c):

- U-Boot proper driver supporting DT/DTS
- U-Boot proper driver without DT/DTS support (deprecated)
- SPL driver without DT/DTS support
- SPL (and TPL) driver with DT/DTS (when the SoC has enough resources to
  run full blown DT/DTS)
- SPL driver with DT/DTS and SPL_OF_PLATDATA (when one have constrained
  environment with no fitImage and OF_LIBFDT support).

Some boards do require SPI support (with DM) in SPL (TPL) and some only
have DM_SPI{_FLASH} defined to allow compiling SPL.

This patch converts #ifdef CONFIG_DM_SPI* to #if CONFIG_IS_ENABLED(DM_SPI)
and provides corresponding defines in Kconfig.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Adam Ford <aford173@gmail.com> #da850-evm
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[trini: Fixup a few platforms]
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-06-29 13:34:43 -04:00
..
cpu armv8: cache_v8: fix mmu_set_region_dcache_behaviour 2020-05-25 11:54:53 -04:00
dts Xilinx changes for v2020.10 2020-06-25 09:33:39 -04:00
include ARM: imx: ddr: Fill in missing DDRC ZQCTLx on i.MX7 2020-06-22 17:44:06 +02:00
lib bdinfo: arm: Move ARM-specific info into its own file 2020-06-25 13:24:12 -04:00
mach-aspeed common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
mach-at91 Convert CONFIG_AT91_GPIO to Kconfig 2020-06-26 10:29:04 -04:00
mach-bcm283x common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
mach-bcmstb
mach-cortina board: presidio-asic: Add basic G3 engr. development board support 2020-02-07 16:16:01 -05:00
mach-davinci mmc: davinci_mmc: Cleanup to use dt in U-boot and static platdata in SPL 2020-06-13 23:12:17 +05:30
mach-exynos common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mach-highbank common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
mach-imx arm: imx: Finish migration of CONFIG_CSF_SIZE to Kconfig 2020-06-26 10:29:06 -04:00
mach-integrator
mach-k3 Merge tag 'ti-v2020.07-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti 2020-05-25 14:09:42 -04:00
mach-keystone common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mach-kirkwood common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
mach-lpc32xx common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mach-mediatek common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mach-meson common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mach-mvebu arm: mvebu: Convert CRS305-1G-4S board to CRS3xx-98DX3236 2020-05-27 07:03:17 +02:00
mach-omap2 arm: Remove omap3_pandora_defconfig board 2020-06-11 15:14:04 +05:30
mach-orion5x common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mach-owl common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
mach-qemu qemu: don't allow to select 32- and 64-bit 2020-04-24 10:51:32 -04:00
mach-rmobile common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mach-rockchip rockchip: spl: do full dram_init instead of only probing 2020-05-31 22:22:07 +08:00
mach-s5pc1xx common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
mach-snapdragon common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mach-socfpga common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mach-sti
mach-stm32 common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
mach-stm32mp board: stm32mp1: fix handling of DT OP-TEE reserved memory nodes 2020-06-16 10:38:09 +02:00
mach-sunxi sunxi: Silence warning about non-static inline function 2020-06-01 22:38:08 +05:30
mach-tegra video: extend stdout video console work-around for 'vga' 2020-06-18 19:30:14 +02:00
mach-u8500 common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
mach-uniphier ARM: uniphier: remove board_eth_init() 2020-05-22 11:21:06 +09:00
mach-versal common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mach-versatile
mach-zynq common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
mach-zynqmp common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mach-zynqmp-r5 common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
thumb1/include/asm/proc-armv
Kconfig spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI* 2020-06-29 13:34:43 -04:00
Kconfig.debug
Makefile rename symbol: CONFIG_STM32 -> CONFIG_ARCH_STM32 2020-05-15 14:47:35 -04:00
config.mk