u-boot-brain/drivers/net
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
..
fm spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI* 2020-06-29 13:34:43 -04:00
fsl-mc Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq 2020-05-20 08:46:56 -04:00
ldpaa_eth common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mscc_eswitch common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pfe_eth common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
phy Xilinx changes for v2020.10 2020-06-25 09:33:39 -04:00
ti net: cpsw: Add __maybe_unused to generated inlines 2020-06-16 17:00:02 +05:30
8390.h drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
ag7xxx.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
altera_tse.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
altera_tse.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
armada100_fec.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
armada100_fec.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
at91_emac.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ax88180.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ax88180.h AX88180: use standard I/O accessors 2010-07-12 00:14:29 -07:00
ax88796.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ax88796.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bcm-sf2-eth-gmac.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
bcm-sf2-eth-gmac.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bcm-sf2-eth.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
bcm-sf2-eth.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bcm6348-eth.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bcm6368-eth.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
bcmgenet.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
calxedaxgmac.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
cs8900.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
cs8900.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dc2114x.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
designware.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
designware.h common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
dm9000x.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
dm9000x.h dm9000 remove dead external phy support, gpio fix 2008-08-26 23:08:19 -07:00
dnet.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
dnet.h dnet: driver for Dave DNET ethernet controller 2009-02-10 00:16:27 +01:00
dwc_eth_qos.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
dwmac_socfpga.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
e1000_spi.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
e1000.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
e1000.h command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
eepro100.c net: eepro100: Add DM support 2020-06-18 19:34:40 +02:00
ep93xx_eth.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
ep93xx_eth.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
eth-phy-uclass.c net: Add eth phy generic driver for shared MDIO 2020-05-10 13:24:48 +02:00
ethoc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fec_mxc.c net: fec: Allow the PHY node to be retrieved 2020-06-22 17:40:49 +02:00
fec_mxc.h net: fec: Allow the PHY node to be retrieved 2020-06-22 17:40:49 +02:00
fsl_enetc_mdio.c drivers: net: fsl_enetc_mdio: return with time-out if HW is stuck 2019-12-09 09:47:43 -06:00
fsl_enetc.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
fsl_enetc.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
fsl_ls_mdio.c drivers: net: add Layerscape mEMAC MDIO driver 2020-04-29 10:49:20 +05:30
fsl_mcdmafec.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
fsl_mdio.c net: tsec: fsl_mdio: add DM MDIO support 2020-06-04 18:53:14 +05:30
ftgmac100.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ftgmac100.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ftmac100.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ftmac100.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ftmac110.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ftmac110.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gmac_rockchip.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
higmacv300.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig net: pcnet: Add Kconfig entries 2020-06-18 19:34:41 +02:00
ks8851_mll.c net: ks8851: Add DM support 2020-05-22 19:46:45 +02:00
ks8851_mll.h net: ks8851_mll: add ethernet support 2013-06-24 19:11:14 -05:00
lan91c96.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
lan91c96.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lpc32xx_eth.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
macb.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
macb.h net: macb: add support for faster clk rates 2019-07-25 13:13:30 -05:00
Makefile net: Add eth phy generic driver for shared MDIO 2020-05-10 13:24:48 +02:00
mcffec.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mcfmii.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mdio_mux_i2creg.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
mdio_mux_sandbox.c test: dm: add a test for MDIO MUX DM uclass 2019-07-18 16:37:13 -05:00
mdio_sandbox.c test: dm_mdio: avoid out of bounds access 2019-09-04 11:37:19 -05:00
mpc8xx_fec.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mt7628-eth.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mtk_eth.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mtk_eth.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mvgbe.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mvgbe.h net: mvgbe: convert to DM 2018-07-26 14:08:21 -05:00
mvmdio.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mvneta.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mvpp2.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
natsemi.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ne2000_base.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ne2000_base.h common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ne2000.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ne2000.h NE2000: Fix regresssion introduced by e710185aae on non AX88796 2008-04-28 22:26:36 -07:00
netconsole.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ns8382x.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pch_gbe.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pch_gbe.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pcnet.c net: pcnet: Add DM support 2020-06-18 19:34:41 +02:00
pic32_eth.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pic32_eth.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pic32_mdio.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ravb.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
rtl8139.c net: rtl8139: Add DM support 2020-06-12 13:17:23 -04:00
rtl8169.c net: rt8169: WAR for DHCP not getting IP after kernel boot/reboot 2020-06-12 13:17:23 -04:00
sandbox-raw-bus.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
sandbox-raw.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
sandbox.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
sh_eth.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
sh_eth.h net: sh_eth: Fix 64bit build warnings 2019-08-09 23:15:01 +02:00
smc911x.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
smc911x.h common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
smc91111.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
smc91111.h common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
sni_ave.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
sun8i_emac.c net: sun8i_emac: Add support for the H6 variant 2020-06-01 22:38:37 +05:30
sunxi_emac.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
tsec.c net: tsec: Access TBI PHY through the corresponding MII 2020-06-04 18:53:20 +05:30
uli526x.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
vsc7385.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
vsc9953.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
xilinx_axi_emac.c net: xilinx: axi_emac: Fix endless loop when no PHYs are connected 2020-06-24 13:11:08 +02:00
xilinx_emaclite.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
zynq_gem.c net: gem: Disable PCS autonegotiation in case of fixed-link 2020-06-24 13:11:06 +02:00