u-boot-brain/test/dm
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
..
acpi.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
adc.c test: dm: adc: use the real device name 2019-07-12 21:07:58 -04:00
audio.c dm: sound: Create a uclass for audio codecs 2018-12-13 16:32:49 -07:00
axi.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
blk.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
board.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootcount.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bus.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cache.c dm: cache: Add enable and disable ops for sandbox and test 2019-09-03 09:31:03 +08:00
clk_ccf.c sandbox: clk: add clk enable/disable test code 2019-08-22 00:10:09 +02:00
clk.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
core.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cpu.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
devres.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dma.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
dsi_host.c dm: Add a dsi host uclass 2019-10-13 23:34:43 +02:00
eth.c dm: uclass: don't assign aliased seq numbers 2020-06-11 20:52:11 -06:00
fdtdec.c test: fdtdec: test fdtdec_set_carveout() 2020-04-16 08:07:58 -06:00
firmware.c dm: test: Add "/firmware" node scan test 2018-09-29 11:49:35 -06:00
gpio.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
hwspinlock.c dm: Add Hardware Spinlock class 2018-12-06 23:26:32 -05:00
i2c.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
i2s.c dm: sound: Create a uclass for i2s 2018-12-13 16:32:49 -07:00
irq.c dm: irq: Add support for requesting interrupts 2020-02-07 22:46:32 +08:00
Kconfig test: Move the unit tests to their own menu 2015-05-21 09:16:17 -04:00
led.c sandbox: led: use new function to configure default state 2018-08-10 10:27:32 -04:00
mailbox.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
Makefile dm: core: add ofnode and dev function to iterate on node property 2020-04-16 23:06:54 -04:00
mdio_mux.c test: dm: add a test for MDIO MUX DM uclass 2019-07-18 16:37:13 -05:00
mdio.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
misc.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
mmc.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
nop.c dm: Add a No-op uclass 2019-07-05 14:19:41 +02:00
ofnode.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ofread.c dm: core: add ofnode and dev function to iterate on node property 2020-04-16 23:06:54 -04:00
osd.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
p2sb.c sandbox: Add PCI driver and test for p2sb 2019-12-15 11:44:11 +08:00
panel.c panel: Expand the backlight support 2018-10-09 04:40:27 -06:00
pch.c pch: Add ioctl support 2019-02-20 15:27:08 +08:00
pci_ep.c test: pci_ep: add basic pci_ep tests 2019-07-11 10:05:15 -04:00
pci.c dm: pci: Add a function to read a PCI BAR 2019-10-08 13:57:43 +08:00
phy.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pmc.c x86: sandbox: Add a PMC emulator and test 2019-12-15 11:44:11 +08:00
pmic.c sandbox: tests: Add tests for mc34708 PMIC device 2018-05-18 08:27:26 +02:00
power-domain.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
pwm.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ram.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
regmap.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
regulator.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
remoteproc.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
reset.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rng.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rtc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
serial.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
sf.c sf: Drop spl_flash_get_sw_write_prot 2020-06-01 17:55:24 +05:30
smem.c test: smem: add basic smem test 2018-07-19 17:03:28 -04:00
sound.c sound: Add a new stop_play() method 2020-02-05 19:33:46 -07:00
spi.c spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI* 2020-06-29 13:34:43 -04:00
spmi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
syscon.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
sysreset.c sandbox: sysreset: Update to support power-on reset 2018-12-05 06:01:34 -07:00
tee.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
test-driver.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
test-fdt.c dm: uclass: don't assign aliased seq numbers 2020-06-11 20:52:11 -06:00
test-main.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
test-uclass.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
timer.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
usb.c usb: provide a device tree node to USB devices 2020-06-11 20:52:11 -06:00
video.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
virtio.c test: dm: virtio: Add test cases for virtio uclass 2018-11-14 09:16:28 -08:00
wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00