All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Tom Rini <trini@konsulko.com>
Cc: "Simon Glass" <sjg@chromium.org>, "Stefan Roese" <sr@denx.de>,
	"Masami Hiramatsu" <masami.hiramatsu@linaro.org>,
	"Frank Wunderlich" <frank-w@public-files.de>,
	"Marek Behún" <marek.behun@nic.cz>,
	"U-Boot Mailing List" <u-boot@lists.denx.de>
Subject: Re: Broken CONFIG_SPL_SATA_SUPPORT=y
Date: Sun, 15 Aug 2021 13:48:26 +0200	[thread overview]
Message-ID: <20210815114826.ccai4fddhxuqjar2@pali> (raw)
In-Reply-To: <20210803014007.GP9379@bill-the-cat>

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


  reply	other threads:[~2021-08-15 11:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01 12:25 Broken CONFIG_SPL_SATA_SUPPORT=y Pali Rohár
2021-08-02 19:21 ` Simon Glass
2021-08-02 20:16   ` Pali Rohár
2021-08-02 20:55 ` Tom Rini
2021-08-02 21:09   ` Pali Rohár
2021-08-02 21:14     ` Simon Glass
2021-08-02 21:18       ` Pali Rohár
2021-08-02 21:23         ` Simon Glass
2021-08-02 21:25           ` Pali Rohár
2021-08-02 21:30             ` Simon Glass
2021-08-02 21:41               ` Pali Rohár
2021-08-02 21:59                 ` Tom Rini
2021-08-02 21:43               ` Tom Rini
2021-08-02 21:56                 ` Pali Rohár
2021-08-02 22:11                   ` Tom Rini
2021-08-02 22:38                     ` Pali Rohár
2021-08-02 22:46                       ` Tom Rini
2021-08-02 23:33                         ` Pali Rohár
2021-08-03  1:40                           ` Tom Rini
2021-08-15 11:48                             ` Pali Rohár [this message]
2021-08-15 14:23                               ` Tom Rini
2021-08-27 15:17                                 ` Pali Rohár
2021-08-27 15:22                                   ` Tom Rini
2021-08-02 21:37             ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210815114826.ccai4fddhxuqjar2@pali \
    --to=pali@kernel.org \
    --cc=frank-w@public-files.de \
    --cc=marek.behun@nic.cz \
    --cc=masami.hiramatsu@linaro.org \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.