Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1EA8C432BE for ; Fri, 27 Aug 2021 15:17:40 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0284360E90 for ; Fri, 27 Aug 2021 15:17:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0284360E90 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A4F3A832AC; Fri, 27 Aug 2021 17:17:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="WJ+9Nzvb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 58064831E7; Fri, 27 Aug 2021 17:17:35 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C71E4832B8 for ; Fri, 27 Aug 2021 17:17:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 0C88B60E90; Fri, 27 Aug 2021 15:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630077448; bh=uWxt3KflBRWzMb3AjYvxFYnJVl7a8vFFoKrZ8nNhc20=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WJ+9NzvbzMHr3WkoE79TbJPSpnVNMjLLdUdDwqxBHiqnGnPrJnGOC10jijIkadjng sEAHolS3DoNXGvz0CTNSiq5PtLIapCrmHSGMlrqQuNzEzJorOg7Bj9/6SLMKy3vmiC 6tkLj06CrPGQADZXFrw0Y5kG7L5TxyQrzJPdBesjFJlqaAdXmORlS1CFKaBbOLP5+W 6kDs2CMPlE4WFkGlWh9sg1WTUxysT0khjmMMboihJJAIZkdoMhnLvjNdF0uU2bOVh+ s0/mDzhXjPV6SuQfBelo9mJynKRJXZ1V83j3K0cmu3WaO4ZCHLFG1fRcsSO9orGVo4 NyUBWEH6+Rj0Q== Received: by pali.im (Postfix) id 90D77617; Fri, 27 Aug 2021 17:17:25 +0200 (CEST) Date: Fri, 27 Aug 2021 17:17:25 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini Cc: Simon Glass , Stefan Roese , Masami Hiramatsu , Frank Wunderlich , Marek =?utf-8?B?QmVow7pu?= , U-Boot Mailing List Subject: Re: Broken CONFIG_SPL_SATA_SUPPORT=y Message-ID: <20210827151725.cjq32eh5m4snth2r@pali> References: <20210802214322.GJ9379@bill-the-cat> <20210802215658.vcdxtx6u7tfsi3od@pali> <20210802221120.GM9379@bill-the-cat> <20210802223819.2xh6i6n5d7sxispl@pali> <20210802224648.GO9379@bill-the-cat> <20210802233353.xsqwyrfdkkdju2h2@pali> <20210803014007.GP9379@bill-the-cat> <20210815114826.ccai4fddhxuqjar2@pali> <20210815142303.GJ858@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210815142303.GJ858@bill-the-cat> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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