From patchwork Fri Dec 8 14:11:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic BARRE X-Patchwork-Id: 10102587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F394B60360 for ; Fri, 8 Dec 2017 14:12:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E39C428CE5 for ; Fri, 8 Dec 2017 14:12:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D840C28CE8; Fri, 8 Dec 2017 14:12:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4B56028CE5 for ; Fri, 8 Dec 2017 14:12:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fm5+196+YqZ4GL76NNnowSXqKy5pQsbnA90rAW+j4D0=; b=LKOPhoGh63ILNt 0/eGhTzPfiylCueZufQy3LJ9Z04snBJDGxfVRY3D9rOzM5/4ZH+HA1eFQA5GINRBKOF7NQZ0H4F2H RdoPLLt8NxXsY6uNc3xjViiEmMYDfkIKfHh9/kfDNg88+CfeqjUw3UxaUMPUJJY5tugIFhHGecw5I bVlr3+xfhzVhVoKvtTRLYiTk5/xd5UNdWcQzsCd7Tpk+hVo0pJt+QSg8DguyZrkh+CkUs5B7QfSLH 3PVRTqj0v2lWP/XjqNtRdHgbhIoDBNIJ2pJkRxGoIYT6m7pi62kTdfy18PYnkiPbDECNGMU7V70oX 4tewaIQLF3lrhQCWqLdw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eNJO7-0005fO-Ed; Fri, 08 Dec 2017 14:12:27 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eNJNl-0005JV-Mj for linux-arm-kernel@lists.infradead.org; Fri, 08 Dec 2017 14:12:08 +0000 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 vB8E91RY026466; Fri, 8 Dec 2017 15:11:23 +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 2equhu06re-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 08 Dec 2017 15:11:23 +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 95E5634; Fri, 8 Dec 2017 14:11:22 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 749745042; Fri, 8 Dec 2017 14:11:22 +0000 (GMT) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.352.0; Fri, 8 Dec 2017 15:11:22 +0100 Received: from lmecxl0923.lme.st.com (10.48.0.237) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.352.0; Fri, 8 Dec 2017 15:11:22 +0100 From: Ludovic Barre To: Russell King , Rob Herring , Linus Walleij , Arnd Bergmann Subject: [PATCH 1/6] ARM: stm32: prepare stm32 family to welcome armv7 architecture Date: Fri, 8 Dec 2017 15:11:12 +0100 Message-ID: <1512742277-28205-2-git-send-email-ludovic.Barre@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512742277-28205-1-git-send-email-ludovic.Barre@st.com> References: <1512742277-28205-1-git-send-email-ludovic.Barre@st.com> MIME-Version: 1.0 X-Originating-IP: [10.48.0.237] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-12-08_08:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171208_061206_102310_A58A519F X-CRM114-Status: GOOD ( 13.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Alexandre Torgue , linux-kernel@vger.kernel.org, Ludovic Barre , Maxime Coquelin , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ludovic Barre This patch prepares the STM32 machine for the integration of Cortex-A based microprocessor (MPU), on top of the existing Cortex-M microcontroller family (MCU). Since both MCUs and MPUs are sharing common hardware blocks we can keep using ARCH_STM32 flag for most of them. If a hardware block is specific to one family we can use either ARCH_STM32_MCU or ARCH_STM32_MPU flag. Signed-off-by: Ludovic Barre --- Documentation/arm/stm32/overview.txt | 21 +++++++-------- arch/arm/mach-stm32/Kconfig | 30 +++++++++++++++------- arch/arm/mach-stm32/Makefile | 2 +- arch/arm/mach-stm32/{board-dt.c => board-mcu-dt.c} | 0 4 files changed, 33 insertions(+), 20 deletions(-) rename arch/arm/mach-stm32/{board-dt.c => board-mcu-dt.c} (100%) diff --git a/Documentation/arm/stm32/overview.txt b/Documentation/arm/stm32/overview.txt index a03b035..384cc7f 100644 --- a/Documentation/arm/stm32/overview.txt +++ b/Documentation/arm/stm32/overview.txt @@ -4,17 +4,17 @@ Introduction ------------ - The STMicroelectronics family of Cortex-M based MCUs are supported by the - 'STM32' platform of ARM Linux. Currently only the STM32F429 (Cortex-M4) - and STM32F746 (Cortex-M7) are supported. - + The STMicroelectronics STM32 family of Cortex-A microprocessors (MPUs) and + Cortex-M microcontrollers (MCUs) are supported by the 'STM32' platform of + ARM Linux. Configuration ------------- - A generic configuration is provided for STM32 family, and can be used as the - default by + For MCUs, use the provided default configuration: make stm32_defconfig + For MPUs, use multi_v7 configuration: + make multi_v7_defconfig Layout ------ @@ -22,12 +22,13 @@ Layout All the files for multiple machine families are located in the platform code contained in arch/arm/mach-stm32 - There is a generic board board-dt.c in the mach folder which support - Flattened Device Tree, which means, it works with any compatible board with - Device Trees. - + There are generic boards board-mcu-dt.c and board-mpu-dt.c files in the mach + folder which support Flattened Device Tree, which means, they work with any + compatible board with Device Trees. Document Author --------------- Maxime Coquelin + Ludovic Barre + Gerald Baeza diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig index 0d1889b..c8059ea 100644 --- a/arch/arm/mach-stm32/Kconfig +++ b/arch/arm/mach-stm32/Kconfig @@ -1,31 +1,43 @@ -config ARCH_STM32 - bool "STMicrolectronics STM32" - depends on ARM_SINGLE_ARMV7M +menuconfig ARCH_STM32 + bool "STMicrolectronics STM32 family" if ARM_SINGLE_ARMV7M select ARCH_HAS_RESET_CONTROLLER - select ARMV7M_SYSTICK select CLKSRC_STM32 select PINCTRL select RESET_CONTROLLER select STM32_EXTI help - Support for STMicroelectronics STM32 processors. + Support for STMicroelectronics STM32 MCU family + +if ARCH_STM32 + +if ARM_SINGLE_ARMV7M + +config ARCH_STM32_MCU + bool "STMicrolectronics STM32 MCU" + select ARMV7M_SYSTICK + help + Support for STMicroelectronics STM32 Microcontrollers. config MACH_STM32F429 bool "STMicrolectronics STM32F429" - depends on ARCH_STM32 + depends on ARCH_STM32_MCU default y config MACH_STM32F469 bool "STMicrolectronics STM32F469" - depends on ARCH_STM32 + depends on ARCH_STM32_MCU default y config MACH_STM32F746 bool "STMicrolectronics STM32F746" - depends on ARCH_STM32 + depends on ARCH_STM32_MCU default y config MACH_STM32H743 bool "STMicrolectronics STM32H743" - depends on ARCH_STM32 + depends on ARCH_STM32_MCU default y + +endif + +endif diff --git a/arch/arm/mach-stm32/Makefile b/arch/arm/mach-stm32/Makefile index bd0b7b5..90c1b71 100644 --- a/arch/arm/mach-stm32/Makefile +++ b/arch/arm/mach-stm32/Makefile @@ -1 +1 @@ -obj-y += board-dt.o +obj-$(CONFIG_ARCH_STM32_MCU) += board-mcu-dt.o diff --git a/arch/arm/mach-stm32/board-dt.c b/arch/arm/mach-stm32/board-mcu-dt.c similarity index 100% rename from arch/arm/mach-stm32/board-dt.c rename to arch/arm/mach-stm32/board-mcu-dt.c