[PATCH v2 2/5] spi: fsl_qspi: Build driver only if DM_SPI is available

Stefan Roese sr at denx.de
Tue Jul 13 14:44:30 CEST 2021


On 13.07.21 11:14, Frieder Schrempf wrote:
> From: Frieder Schrempf <frieder.schrempf at kontron.de>
> 
> The driver depends on DM_SPI and if it's not available (e. g. in SPL),
> then we should not try to build it as this will fail.
> 
> Signed-off-by: Frieder Schrempf <frieder.schrempf at kontron.de>

Looks good, but you could also add a "depends on DM_SPI" to the Kconfig
entry of this driver.

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   drivers/spi/Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
> index f70851e4bc..216e72c60f 100644
> --- a/drivers/spi/Makefile
> +++ b/drivers/spi/Makefile
> @@ -11,6 +11,7 @@ obj-$(CONFIG_SANDBOX) += spi-emul-uclass.o
>   obj-$(CONFIG_SOFT_SPI) += soft_spi.o
>   obj-$(CONFIG_SPI_MEM) += spi-mem.o
>   obj-$(CONFIG_TI_QSPI) += ti_qspi.o
> +obj-$(CONFIG_FSL_QSPI) += fsl_qspi.o
>   else
>   obj-y += spi.o
>   obj-$(CONFIG_SPI_MEM) += spi-mem-nodm.o
> @@ -30,7 +31,6 @@ obj-$(CONFIG_DESIGNWARE_SPI) += designware_spi.o
>   obj-$(CONFIG_EXYNOS_SPI) += exynos_spi.o
>   obj-$(CONFIG_FSL_DSPI) += fsl_dspi.o
>   obj-$(CONFIG_FSL_ESPI) += fsl_espi.o
> -obj-$(CONFIG_FSL_QSPI) += fsl_qspi.o
>   obj-$(CONFIG_SYNQUACER_SPI) += spi-synquacer.o
>   obj-$(CONFIG_ICH_SPI) +=  ich.o
>   obj-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list