From mboxrd@z Thu Jan 1 00:00:00 1970 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=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 120F4C4338F for ; Sun, 15 Aug 2021 14:30:27 +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 33ED561131 for ; Sun, 15 Aug 2021 14:30:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 33ED561131 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 876CC8200B; Sun, 15 Aug 2021 16:30:16 +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="LcYhlbZw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2F99B821F0; Sun, 15 Aug 2021 16:30:10 +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 7F51B80F2E for ; Sun, 15 Aug 2021 16:30:02 +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 CC9746112E; Sun, 15 Aug 2021 14:30:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629037800; bh=q+P4gjZeZUD4aF+R4+xINK8LCcSEQ51AsRgjvo+URSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LcYhlbZwPjJEUYI6kq5ZteOSCbThISPqfzEJlTBZuIgAivNtlccNVqxYi4wziX87k po0syOfMtm22OnQAbdhWLCe/JTMcTK4aAZYlFhL/XXoem8NObF9uHBCmGSLzJSl949 4xIEJBCNXFH5+Pa9BkbUBuxJ5LwdhRYjY2KZpUYU2E4AYK6HrWrXk8B2Vm4uHJAM0z 1CFg4TfsxZMj3jNkndPI8Tw13YFSDkhE6Zxm7zY9W87ShLrp/HPhrWQF7YEQyn/gF3 MoKN77ZFH0OeiH7mpyaRCdBdYhHBUXfrIeMZoUFkrMT7kwhdaDAaF3WZkhpOI69vaf 7dSW8fxVnZukw== Received: by pali.im (Postfix) id 123A6280D; Sun, 15 Aug 2021 16:29:59 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Tom Rini , Stefan Roese , Frank Wunderlich Cc: Masami Hiramatsu , Simon Glass , =?UTF-8?q?Marek=20Beh=C3=BAn?= , u-boot@lists.denx.de Subject: [PATCH 2/2] ata: ahci-pci: Add new option CONFIG_SPL_AHCI_PCI Date: Sun, 15 Aug 2021 16:27:37 +0200 Message-Id: <20210815142737.16992-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210815142737.16992-1-pali@kernel.org> References: <20210815142737.16992-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 This new option allows to disable ahci-pci driver in SPL. Disabling it is needed when SPL_PCI is not enabled as ahci-pci depends on PCI. This change fixes following compile error when CONFIG_SPL_SATA_SUPPORT is enabled and SPL_PCI is disabled. LD spl/u-boot-spl arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.o: in function `ahci_probe_scsi_pci': drivers/ata/ahci.c:1205: undefined reference to `dm_pci_map_bar' arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.c:1215: undefined reference to `dm_pci_read_config16' arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.c:1216: undefined reference to `dm_pci_read_config16' arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.c:1220: undefined reference to `dm_pci_map_bar' make[1]: *** [scripts/Makefile.spl:512: spl/u-boot-spl] Error 1 make: *** [Makefile:1977: spl/u-boot-spl] Error 2 LD spl/u-boot-spl arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci-pci.o: in function `ahci_pci_probe': drivers/ata/ahci-pci.c:21: undefined reference to `ahci_probe_scsi_pci' make[1]: *** [scripts/Makefile.spl:512: spl/u-boot-spl] Error 1 make: *** [Makefile:1977: spl/u-boot-spl] Error 2 Signed-off-by: Pali Rohár --- drivers/ata/Kconfig | 6 ++++++ drivers/ata/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- 2.20.1