u-boot/drivers
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
..
adc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ata common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
axi common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
bios_emulator common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
block common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
board common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootcount bootcount_ext: Add Ext4 build dependency 2020-06-02 17:27:04 -04:00
cache common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
clk clk: versal: Remove alt_ref_clk from clock sources 2020-06-24 13:07:57 +02:00
core dm: uclass: don't assign aliased seq numbers 2020-06-11 20:52:11 -06:00
cpu cpu: imx8: use intended cpu-thermal device when getting temp value 2020-05-22 13:27:46 +02:00
crypto drivers: crypto: mod_exp_sw: Re-add DM_FLAG_PRE_RELOC 2020-05-19 14:01:47 -04:00
ddr ddr: Rework errata A008109, A008378, 009942 workaround 2020-06-04 18:53:20 +05:30
demo common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dfu common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dma common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
fastboot common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
firmware firmware: zynqmp: Change panic logic in zynqmp_pmufw_load_config_object() 2020-06-24 13:07:57 +02:00
fpga arm64: xilinx: Print fpga error value in hex 2020-06-24 13:11:08 +02:00
gpio Convert CONFIG_AT91_GPIO to Kconfig 2020-06-26 10:29:04 -04:00
hwspinlock common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
i2c i2c: observe scl_count in i2c_deblock_gpio_loop() 2020-05-28 05:52:46 +02:00
input kconfig: mark SPL/TPL options for DM_KEYBOARD 2020-06-02 17:27:04 -04:00
led common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mailbox common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
memory SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
misc misc: add driver for the SiFive otp controller 2020-06-04 09:44:08 +08:00
mmc Convert CONFIG_ARM_PL180_MMCI to Kconfig 2020-06-26 10:29:04 -04:00
mtd spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI* 2020-06-29 13:34:43 -04:00
net spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI* 2020-06-29 13:34:43 -04:00
nvme common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pch common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci pci: Make Rockchip PCIe voltage regulators optional 2020-05-29 17:59:49 +08:00
pci_endpoint common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
phy phy: omap-usb2-phy: disable phy charger detect 2020-06-16 17:00:02 +05:30
pinctrl common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
power regulator: fix: enable gpio when requested 2020-06-15 16:37:01 -04:00
pwm common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
qe drivers: net: qe: deselect QE when DM_ETH is enabled 2020-06-03 12:14:27 +05:30
ram sifive: fu540: add ddr driver 2020-06-04 09:44:08 +08:00
remoteproc common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
reset common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
rng common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
rtc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
scsi common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
serial serial: Add missing Kconfig dependencies for debug consoles 2020-06-04 15:05:45 -04:00
smem common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
soc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
sound common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
spi spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI* 2020-06-29 13:34:43 -04:00
spmi dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
sysreset common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
tee common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
thermal thermal: imx_scu_thermal: prevent boot hang with zero pdata 2020-05-22 13:29:25 +02:00
timer common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
tpm common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ufs common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
usb Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi into next 2020-06-19 16:25:50 -04:00
video Convert CONFIG_ATMEL_HLCD to Kconfig 2020-06-26 10:29:04 -04:00
virtio virtio: VIRTIO_RNG depends on DM_RNG 2020-06-05 04:04:41 +02:00
w1 common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
w1-eeprom common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
watchdog common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig dm: rng: Add random number generator(rng) uclass 2020-01-07 18:08:21 +01:00
Makefile phy: rockchip: Add Rockchip USB2PHY driver 2020-05-29 18:13:19 +08:00