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

Frieder Schrempf frieder.schrempf at kontron.de
Wed Jul 14 12:32:13 CEST 2021


On 14.07.21 11:55, Jagan Teki wrote:
> On Tue, Jul 13, 2021 at 2:45 PM Frieder Schrempf <frieder at fris.de> 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>
>> ---
>>  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
> 
> Why? driver entry in Kconfig already present in if DM_SPI construct
> and it will build only if DM_SPI enabled.

In my case I have DM_SPI enabled for U-Boot proper and disabled for SPL. So CONFIG_DM_SPI is set but CONFIG_SPL_DM_SPI is not set. It seems like Kconfig only handles the dependency for DM_SPI not for SPL_DM_SPI. Without this patch the build fails as the driver is built for SPL.

If you have any suggestion for a better fix, let me know.

Thanks
Frieder


More information about the U-Boot mailing list