Broken CONFIG_SPL_SATA_SUPPORT=y

Pali Rohár pali at kernel.org
Fri Aug 27 17:17:25 CEST 2021


On Sunday 15 August 2021 10:23:03 Tom Rini wrote:
> On Sun, Aug 15, 2021 at 01:48:26PM +0200, Pali Rohár wrote:
> > On Monday 02 August 2021 21:40:07 Tom Rini wrote:
> > > OK, thanks.  Then the right fix is to introduce whatever SPL_xxx symbols
> > > you need so that you can turn off what you don't want in SPL but leave
> > > it enabled in full U-Boot, and update the code to use
> > > CONFIG_IS_ENABLED(xxx).  If you can do that part, I can iterate over
> > > converting everyone else that assumes what we have today is what it
> > > wants in SPL and non-SPL.
> > 
> > Hello Tom! Below is patch which adds SPL_AHCI_PCI symbol. I'm not sure
> > if this is correct approach but it looks like that it fixed that issue.
> > With this patch I can compile U-Boot with and also without enabling of
> > CONFIG_SPL_SATA_SUPPORT option.
> > 
> > 
> > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> > index 0c1490a9f900..96c7c30375bd 100644
> > --- a/drivers/ata/Kconfig
> > +++ b/drivers/ata/Kconfig
> > @@ -41,6 +41,12 @@ config AHCI_PCI
> >  	help
> >  	  Enables support for the PCI-based AHCI controller.
> >  
> > +config SPL_AHCI_PCI
> > +	bool "Support for PCI-based AHCI controller for SPL"
> > +	depends on SPL
> > +	depends on SPL_PCI
> > +	depends on SPL_SATA_SUPPORT && DM_SCSI
> > +
> >  config SATA_CEVA
> >  	bool "Ceva Sata controller"
> >  	depends on AHCI
> > diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
> > index 4811b2f82c4e..cd88131dcd13 100644
> > --- a/drivers/ata/Makefile
> > +++ b/drivers/ata/Makefile
> > @@ -5,7 +5,7 @@
> >  
> >  obj-$(CONFIG_DWC_AHCI) += dwc_ahci.o
> >  obj-$(CONFIG_AHCI) += ahci-uclass.o
> > -obj-$(CONFIG_AHCI_PCI) += ahci-pci.o
> > +obj-$(CONFIG_$(SPL_)AHCI_PCI) += ahci-pci.o
> >  obj-$(CONFIG_SCSI_AHCI) += ahci.o
> >  obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
> >  obj-$(CONFIG_FSL_SATA) += fsl_sata.o
> 
> Looks right to me, please submit it as a proper patch, thanks!

Patches are already waiting here:
https://patchwork.ozlabs.org/project/uboot/list/?series=258094


More information about the U-Boot mailing list