From patchwork Wed Feb 27 14:20:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 1048908 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=st.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 448dC81BQFz9s5c for ; Thu, 28 Feb 2019 01:21:06 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 99D67C21E13; Wed, 27 Feb 2019 14:20:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4F428C21C2F; Wed, 27 Feb 2019 14:20:54 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C0923C21C2F; Wed, 27 Feb 2019 14:20:52 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lists.denx.de (Postfix) with ESMTPS id 6B023C21BE5 for ; Wed, 27 Feb 2019 14:20:52 +0000 (UTC) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1REDwku014714; Wed, 27 Feb 2019 15:20:51 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2qtv6cyhk3-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 27 Feb 2019 15:20:51 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1F6FD3F; Wed, 27 Feb 2019 14:20:51 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 00D5757FD; Wed, 27 Feb 2019 14:20:50 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 27 Feb 2019 15:20:50 +0100 Received: from localhost (10.201.23.85) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 27 Feb 2019 15:20:50 +0100 From: Patrick Delaunay To: Date: Wed, 27 Feb 2019 15:20:35 +0100 Message-ID: <1551277238-604-5-git-send-email-patrick.delaunay@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1551277238-604-1-git-send-email-patrick.delaunay@st.com> References: <1551277238-604-1-git-send-email-patrick.delaunay@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.85] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-02-27_09:, , signatures=0 Cc: U-Boot STM32 , Markus Niebel Subject: [U-Boot] [PATCH 4/7] tqma6s_wru4_mmc: manage board_spi_cs_gpio correctly X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Define the function board_spi_cs_gpio only when needed, only called in drivers/spi/mxc_spi.c. That avoid compilation issue for tqma6s_wru4_mmc_defconfig when CONFIG_SF_DEFAULT_BUS and CONFIG_SF_DEFAULT_CS are not defined (CMD_SF not defined) after migration in KConfig. Signed-off-by: Patrick Delaunay --- board/tqc/tqma6/tqma6.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 816672e..372a17c 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -155,11 +155,13 @@ __weak void tqma6_iomuxc_spi(void) ARRAY_SIZE(tqma6_ecspi1_pads)); } +#if defined(CONFIG_SF_DEFAULT_BUS) && defined(CONFIG_SF_DEFAULT_CS) int board_spi_cs_gpio(unsigned bus, unsigned cs) { return ((bus == CONFIG_SF_DEFAULT_BUS) && (cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1; } +#endif static struct i2c_pads_info tqma6_i2c3_pads = { /* I2C3: on board LM75, M24C64, */