From patchwork Mon Dec 10 10:52:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 1010365 X-Patchwork-Delegate: jagannadh.teki@gmail.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 43D0P14KgLz9s55 for ; Mon, 10 Dec 2018 21:56:05 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 44068C2247E; Mon, 10 Dec 2018 10:54:51 +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=RCVD_IN_DNSWL_BLOCKED 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 EFFAEC224B4; Mon, 10 Dec 2018 10:54:31 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6A2B1C2249B; Mon, 10 Dec 2018 10:53:41 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [62.209.51.94]) by lists.denx.de (Postfix) with ESMTPS id F29B6C224A3 for ; Mon, 10 Dec 2018 10:53:34 +0000 (UTC) Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wBAAoxSs012660; Mon, 10 Dec 2018 11:53:34 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2p84kx9xcm-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 10 Dec 2018 11:53:34 +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 529C934; Mon, 10 Dec 2018 10:53:33 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3D1AC27D6; Mon, 10 Dec 2018 10:53:33 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.92) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 10 Dec 2018 11:53:32 +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; Mon, 10 Dec 2018 11:53:37 +0100 From: Patrick Delaunay To: Date: Mon, 10 Dec 2018 11:52:46 +0100 Message-ID: <1544439166-5749-8-git-send-email-patrick.delaunay@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544439166-5749-1-git-send-email-patrick.delaunay@st.com> References: <1544439166-5749-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=2018-12-10_03:, , signatures=0 Cc: U-Boot STM32 , Jagan Teki Subject: [U-Boot] [PATCH 7/7] spi: remove define for SPI default SPEED and MODE 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" In DM mode, the speed and mode defaults value will be taken from DT, so these defines should be never used and can be removed. Signed-off-by: Patrick Delaunay Reviewed-by: Simon Goldschmidt Reviewed-by: Petr Vorel --- include/spi_flash.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/spi_flash.h b/include/spi_flash.h index 36565bb..c9d20a5 100644 --- a/include/spi_flash.h +++ b/include/spi_flash.h @@ -12,12 +12,16 @@ #include /* Because we dereference struct udevice here */ #include +#ifndef CONFIG_DM_SPI_FLASH +/* In DM mode, speed and mode value will be taken from DT */ #ifndef CONFIG_SF_DEFAULT_SPEED # define CONFIG_SF_DEFAULT_SPEED 1000000 #endif #ifndef CONFIG_SF_DEFAULT_MODE # define CONFIG_SF_DEFAULT_MODE SPI_MODE_3 #endif +#endif + #ifndef CONFIG_SF_DEFAULT_CS # define CONFIG_SF_DEFAULT_CS 0 #endif