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 690F1C4338F for ; Sun, 15 Aug 2021 11:48:39 +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 43C9B610C9 for ; Sun, 15 Aug 2021 11:48:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 43C9B610C9 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 A927880ECB; Sun, 15 Aug 2021 13:48:35 +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="g9/4WBdQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7A0A580ECB; Sun, 15 Aug 2021 13:48:33 +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 9444780ECB for ; Sun, 15 Aug 2021 13:48:30 +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 913276103D; Sun, 15 Aug 2021 11:48:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629028108; bh=9NB3FyFa4LCdgJ+CqZMlUM63kVYHzxTthfPqZGlDpao=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g9/4WBdQH+TIh5iTXH5rlCJhquMN2DJA8aokALyuxbguEfbyA9JE1vaxdlj4jYb/m MPt3CHE6LqudZLSH5SksAMd6kaFSB9skZI7QSnb5ezryJ2QnZwXiO7DMR8Kt/Xzhsn bmfrtzgIAT+BdXLGsS8M0BEQs1dZXS0pvVXXxlUNE+y0btWTRuuomQJd71QnNwMbRF 9EtM5DA9roIJrTD5VmQt/j7MCUU/Nk2zcMSJu3om/nazuLSkHNsytPtOzpUOFUnS0g i1nrnuwe52bvnMEUfIyXGAGbr9apPulLo4YvvaMQXYRUwNvIp0nWw7xGSxLdW+V8uY 8+NFPg6JUAfhg== Received: by pali.im (Postfix) id 7A66498C; Sun, 15 Aug 2021 13:48:26 +0200 (CEST) Date: Sun, 15 Aug 2021 13:48:26 +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: <20210815114826.ccai4fddhxuqjar2@pali> References: <20210802212554.knnm6ndingwooz5k@pali> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210803014007.GP9379@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 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