From patchwork Fri Jan 12 08:23:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrice CHOTARD X-Patchwork-Id: 859576 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=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zHwlt1fKdz9ryr for ; Fri, 12 Jan 2018 19:24:57 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 74791C21F26; Fri, 12 Jan 2018 08:24:41 +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 52BD4C2211A; Fri, 12 Jan 2018 08:24:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C3C8AC2209F; Fri, 12 Jan 2018 08:24:07 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [62.209.51.94]) by lists.denx.de (Postfix) with ESMTPS id 9B473C21EA6 for ; Fri, 12 Jan 2018 08:24:03 +0000 (UTC) Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w0C8Ng7i016631; Fri, 12 Jan 2018 09:23:59 +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 2fe739d3ep-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 12 Jan 2018 09:23:59 +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 A9E5F3D; Fri, 12 Jan 2018 08:23:58 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node3.st.com [10.75.127.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 776AF1327; Fri, 12 Jan 2018 08:23:58 +0000 (GMT) Received: from localhost (10.75.127.47) by SFHDAG6NODE3.st.com (10.75.127.18) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 12 Jan 2018 09:23:58 +0100 From: To: , , , Date: Fri, 12 Jan 2018 09:23:49 +0100 Message-ID: <1515745430-13801-2-git-send-email-patrice.chotard@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515745430-13801-1-git-send-email-patrice.chotard@st.com> References: <1515745430-13801-1-git-send-email-patrice.chotard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG6NODE3.st.com (10.75.127.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-12_05:, , signatures=0 Subject: [U-Boot] [PATCH 1/2] serial: stm32: Rename serial_stm32x7.c to serial_stm32.c 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" From: Patrice Chotard Now this driver is used across stm32f4, stm32f7 and stm32h7 SoCs family, give it a generic name. Signed-off-by: Patrice Chotard Reviewed-by: Vikas Manocha --- arch/arm/mach-stm32/Kconfig | 2 +- configs/stm32f429-discovery_defconfig | 2 +- configs/stm32f469-discovery_defconfig | 2 +- configs/stm32f746-disco_defconfig | 2 +- drivers/serial/Kconfig | 2 +- drivers/serial/Makefile | 2 +- drivers/serial/{serial_stm32x7.c => serial_stm32.c} | 4 ++-- drivers/serial/{serial_stm32x7.h => serial_stm32.h} | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) rename drivers/serial/{serial_stm32x7.c => serial_stm32.c} (98%) rename drivers/serial/{serial_stm32x7.h => serial_stm32.h} (97%) diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig index b618b60..f4c93f1 100644 --- a/arch/arm/mach-stm32/Kconfig +++ b/arch/arm/mach-stm32/Kconfig @@ -38,7 +38,7 @@ config STM32H7 select STM32_SDRAM select STM32_RCC select STM32_RESET - select STM32X7_SERIAL + select STM32_SERIAL select SYSCON source "arch/arm/mach-stm32/stm32f4/Kconfig" diff --git a/configs/stm32f429-discovery_defconfig b/configs/stm32f429-discovery_defconfig index 52bd931..6f7a12f 100644 --- a/configs/stm32f429-discovery_defconfig +++ b/configs/stm32f429-discovery_defconfig @@ -31,4 +31,4 @@ CONFIG_RAM=y CONFIG_STM32_SDRAM=y CONFIG_DM_RESET=y CONFIG_STM32_RESET=y -CONFIG_STM32X7_SERIAL=y +CONFIG_STM32_SERIAL=y diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig index afffddf..5b70aa9 100644 --- a/configs/stm32f469-discovery_defconfig +++ b/configs/stm32f469-discovery_defconfig @@ -39,4 +39,4 @@ CONFIG_RAM=y CONFIG_STM32_SDRAM=y CONFIG_DM_RESET=y CONFIG_STM32_RESET=y -CONFIG_STM32X7_SERIAL=y +CONFIG_STM32_SERIAL=y diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig index 321321f..69df866 100644 --- a/configs/stm32f746-disco_defconfig +++ b/configs/stm32f746-disco_defconfig @@ -60,7 +60,7 @@ CONFIG_RAM=y CONFIG_STM32_SDRAM=y CONFIG_DM_RESET=y CONFIG_STM32_RESET=y -CONFIG_STM32X7_SERIAL=y +CONFIG_STM32_SERIAL=y CONFIG_DM_SPI=y CONFIG_STM32_QSPI=y CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 122b8e7..7b20b47 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -529,7 +529,7 @@ config STI_ASC_SERIAL on STiH410 SoC. This is a basic implementation, it supports following baudrate 9600, 19200, 38400, 57600 and 115200. -config STM32X7_SERIAL +config STM32_SERIAL bool "STMicroelectronics STM32 SoCs on-chip UART" depends on DM_SERIAL && (STM32F4 || STM32F7 || STM32H7) help diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 7adcee3..5ef603a 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -44,7 +44,7 @@ obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o obj-$(CONFIG_STI_ASC_SERIAL) += serial_sti_asc.o obj-$(CONFIG_PIC32_SERIAL) += serial_pic32.o -obj-$(CONFIG_STM32X7_SERIAL) += serial_stm32x7.o +obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o obj-$(CONFIG_BCM283X_MU_SERIAL) += serial_bcm283x_mu.o obj-$(CONFIG_MSM_SERIAL) += serial_msm.o obj-$(CONFIG_MVEBU_A3700_UART) += serial_mvebu_a3700.o diff --git a/drivers/serial/serial_stm32x7.c b/drivers/serial/serial_stm32.c similarity index 98% rename from drivers/serial/serial_stm32x7.c rename to drivers/serial/serial_stm32.c index d1580e3..286b954 100644 --- a/drivers/serial/serial_stm32x7.c +++ b/drivers/serial/serial_stm32.c @@ -11,7 +11,7 @@ #include #include #include -#include "serial_stm32x7.h" +#include "serial_stm32.h" DECLARE_GLOBAL_DATA_PTR; @@ -148,7 +148,7 @@ static const struct dm_serial_ops stm32_serial_ops = { }; U_BOOT_DRIVER(serial_stm32) = { - .name = "serial_stm32x7", + .name = "serial_stm32", .id = UCLASS_SERIAL, .of_match = of_match_ptr(stm32_serial_id), .ofdata_to_platdata = of_match_ptr(stm32_serial_ofdata_to_platdata), diff --git a/drivers/serial/serial_stm32x7.h b/drivers/serial/serial_stm32.h similarity index 97% rename from drivers/serial/serial_stm32x7.h rename to drivers/serial/serial_stm32.h index f7dca39..d08ba1f 100644 --- a/drivers/serial/serial_stm32x7.h +++ b/drivers/serial/serial_stm32.h @@ -5,8 +5,8 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#ifndef _SERIAL_STM32_X7_ -#define _SERIAL_STM32_X7_ +#ifndef _SERIAL_STM32_ +#define _SERIAL_STM32_ #define CR1_OFFSET(x) (x ? 0x0c : 0x00) #define CR3_OFFSET(x) (x ? 0x14 : 0x08) From patchwork Fri Jan 12 08:23:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrice CHOTARD X-Patchwork-Id: 859575 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=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zHwl15C43z9ryr for ; Fri, 12 Jan 2018 19:24:12 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 02F93C21F0E; Fri, 12 Jan 2018 08:24:06 +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 4C28FC21C62; Fri, 12 Jan 2018 08:24:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 826ADC21C62; Fri, 12 Jan 2018 08:24:02 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lists.denx.de (Postfix) with ESMTPS id 196A5C21C54 for ; Fri, 12 Jan 2018 08:24:02 +0000 (UTC) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w0C8NedO029783; Fri, 12 Jan 2018 09:24:00 +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 2fdmy1hv2f-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 12 Jan 2018 09:24:00 +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 6544734; Fri, 12 Jan 2018 08:23:59 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node3.st.com [10.75.127.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3ECCC1330; Fri, 12 Jan 2018 08:23:59 +0000 (GMT) Received: from localhost (10.75.127.45) by SFHDAG6NODE3.st.com (10.75.127.18) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 12 Jan 2018 09:23:58 +0100 From: To: , , , Date: Fri, 12 Jan 2018 09:23:50 +0100 Message-ID: <1515745430-13801-3-git-send-email-patrice.chotard@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515745430-13801-1-git-send-email-patrice.chotard@st.com> References: <1515745430-13801-1-git-send-email-patrice.chotard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG3NODE1.st.com (10.75.127.7) To SFHDAG6NODE3.st.com (10.75.127.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-12_05:, , signatures=0 Subject: [U-Boot] [PATCH 2/2] configs: stm32: move config flag from defconfig to Kconfig 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" From: Patrice Chotard Move system flags from defconfig to mach-stm32/Kconfig Signed-off-by: Patrice Chotard Reviewed-by: Vikas Manocha --- arch/arm/mach-stm32/Kconfig | 22 ++++++++++++++++++++++ configs/stm32f429-discovery_defconfig | 11 ----------- configs/stm32f469-discovery_defconfig | 11 ----------- configs/stm32f746-disco_defconfig | 11 ----------- 4 files changed, 22 insertions(+), 33 deletions(-) diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig index f4c93f1..5f7a2b5 100644 --- a/arch/arm/mach-stm32/Kconfig +++ b/arch/arm/mach-stm32/Kconfig @@ -2,9 +2,31 @@ if STM32 config STM32F4 bool "stm32f4 family" + select CLK + select DM_GPIO + select DM_RESET + select MISC + select PINCTRL + select PINCTRL_STM32 + select RAM + select STM32_SDRAM + select STM32_RCC + select STM32_RESET + select STM32_SERIAL config STM32F7 bool "stm32f7 family" + select CLK + select DM_GPIO + select DM_RESET + select MISC + select PINCTRL + select PINCTRL_STM32 + select RAM + select STM32_SDRAM + select STM32_RCC + select STM32_RESET + select STM32_SERIAL select SUPPORT_SPL select SPL select SPL_CLK diff --git a/configs/stm32f429-discovery_defconfig b/configs/stm32f429-discovery_defconfig index 6f7a12f..ec67aad 100644 --- a/configs/stm32f429-discovery_defconfig +++ b/configs/stm32f429-discovery_defconfig @@ -19,16 +19,5 @@ CONFIG_CMD_TIMER=y CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_IS_IN_FLASH=y -CONFIG_CLK=y -CONFIG_DM_GPIO=y -CONFIG_MISC=y -CONFIG_STM32_RCC=y # CONFIG_MMC is not set CONFIG_MTD_NOR_FLASH=y -CONFIG_PINCTRL=y -CONFIG_PINCTRL_STM32=y -CONFIG_RAM=y -CONFIG_STM32_SDRAM=y -CONFIG_DM_RESET=y -CONFIG_STM32_RESET=y -CONFIG_STM32_SERIAL=y diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig index 5b70aa9..8190b82 100644 --- a/configs/stm32f469-discovery_defconfig +++ b/configs/stm32f469-discovery_defconfig @@ -26,17 +26,6 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y # CONFIG_BLK is not set -CONFIG_CLK=y -CONFIG_DM_GPIO=y -CONFIG_MISC=y -CONFIG_STM32_RCC=y CONFIG_DM_MMC=y CONFIG_ARM_PL180_MMCI=y CONFIG_MTD_NOR_FLASH=y -CONFIG_PINCTRL=y -CONFIG_PINCTRL_STM32=y -CONFIG_RAM=y -CONFIG_STM32_SDRAM=y -CONFIG_DM_RESET=y -CONFIG_STM32_RESET=y -CONFIG_STM32_SERIAL=y diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig index 69df866..f8fa198 100644 --- a/configs/stm32f746-disco_defconfig +++ b/configs/stm32f746-disco_defconfig @@ -39,10 +39,6 @@ CONFIG_OF_CONTROL=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_NETCONSOLE=y # CONFIG_BLK is not set -CONFIG_CLK=y -CONFIG_DM_GPIO=y -CONFIG_MISC=y -CONFIG_STM32_RCC=y CONFIG_DM_MMC=y # CONFIG_SPL_DM_MMC is not set CONFIG_ARM_PL180_MMCI=y @@ -53,14 +49,7 @@ CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_DM_ETH=y CONFIG_ETH_DESIGNWARE=y -CONFIG_PINCTRL=y # CONFIG_PINCTRL_FULL is not set -CONFIG_PINCTRL_STM32=y -CONFIG_RAM=y -CONFIG_STM32_SDRAM=y -CONFIG_DM_RESET=y -CONFIG_STM32_RESET=y -CONFIG_STM32_SERIAL=y CONFIG_DM_SPI=y CONFIG_STM32_QSPI=y CONFIG_OF_LIBFDT_OVERLAY=y