From patchwork Tue Jan 2 15:01:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic BARRE X-Patchwork-Id: 10140769 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 0BFBC601A1 for ; Tue, 2 Jan 2018 15:04:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B69028BEF for ; Tue, 2 Jan 2018 15:04:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1020828BF6; Tue, 2 Jan 2018 15:04:15 +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 3AB0F28BF3 for ; Tue, 2 Jan 2018 15:04:14 +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=grt8JmdzZEdcix/Uhz0TC5NTCslbs4CY46nfcmPqsZY=; b=ip8elnogCpbUyo 63M7kUspOcsBgGv3pKet2XEEb/cOH2ZkYyKH5CQo7MGghuXnu+cc4Aw5KLsDWgmicy0l400j4ixL5 jx7ksX59TfxwFiSDRVCmdjl4am3V2uKSni28ad6n+492c5YYeTNgbFVj//FGYN6Q9E3eLW2Vteg+E FXkKqhBfXHKEoLslaLSgQyHDpbWAwBqHVPS1TCdbB3MGcMgqz61HL/Kn/j+ymeqcEjcC8lk3S/gqn pBYmzOCTiz3wc1ojzVlqMHJfENgGUXm1oWF1ME9VrSp8+uac6hWqqPbrTCo47ufgAGl8Yg3wVo6m0 hfKw9QvJA2u2hjOAqb2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eWO6t-0005GX-32; Tue, 02 Jan 2018 15:04:11 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eWO5P-0003is-Gp for linux-arm-kernel@lists.infradead.org; Tue, 02 Jan 2018 15:04:06 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w02EwiWt010276; Tue, 2 Jan 2018 16:01:58 +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 2f7nru3pa6-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 02 Jan 2018 16:01:58 +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 73F8B38; Tue, 2 Jan 2018 15:01:57 +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 4E7965659; Tue, 2 Jan 2018 15:01:57 +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.352.0; Tue, 2 Jan 2018 16:01:57 +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; Tue, 2 Jan 2018 16:01:56 +0100 From: Ludovic Barre To: Russell King , Rob Herring , Linus Walleij , Arnd Bergmann Subject: [PATCH v3 2/7] ARM: stm32: prepare stm32 family to welcome armv7 architecture Date: Tue, 2 Jan 2018 16:01:46 +0100 Message-ID: <1514905311-12925-3-git-send-email-ludovic.Barre@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514905311-12925-1-git-send-email-ludovic.Barre@st.com> References: <1514905311-12925-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=2018-01-02_11:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180102_070240_748045_51A9E054 X-CRM114-Status: GOOD ( 12.23 ) 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 , Gerald Baeza , 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 ARM_SINGLE_ARMV7M or ARCH_MULTI_V7 flag. Signed-off-by: Ludovic Barre --- Documentation/arm/stm32/overview.rst | 15 +++++++++------ arch/arm/mach-stm32/Kconfig | 27 +++++++++++++++------------ arch/arm/mach-stm32/board-dt.c | 4 +--- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/Documentation/arm/stm32/overview.rst b/Documentation/arm/stm32/overview.rst index 6be6059..85cfc84 100644 --- a/Documentation/arm/stm32/overview.rst +++ b/Documentation/arm/stm32/overview.rst @@ -5,16 +5,17 @@ STM32 ARM Linux Overview 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 ------ @@ -28,4 +29,6 @@ Device Trees. :Authors: -Maxime Coquelin +- Maxime Coquelin +- Ludovic Barre +- Gerald Baeza diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig index 0d1889b..fb4b8b8 100644 --- a/arch/arm/mach-stm32/Kconfig +++ b/arch/arm/mach-stm32/Kconfig @@ -1,8 +1,7 @@ -config ARCH_STM32 - bool "STMicrolectronics STM32" - depends on ARM_SINGLE_ARMV7M +menuconfig ARCH_STM32 + bool "STMicroelectronics STM32 family" if ARM_SINGLE_ARMV7M || ARCH_MULTI_V7 + select ARMV7M_SYSTICK if ARM_SINGLE_ARMV7M select ARCH_HAS_RESET_CONTROLLER - select ARMV7M_SYSTICK select CLKSRC_STM32 select PINCTRL select RESET_CONTROLLER @@ -10,22 +9,26 @@ config ARCH_STM32 help Support for STMicroelectronics STM32 processors. +if ARCH_STM32 + +if ARM_SINGLE_ARMV7M + config MACH_STM32F429 - bool "STMicrolectronics STM32F429" - depends on ARCH_STM32 + bool "STMicroelectronics STM32F429" default y config MACH_STM32F469 - bool "STMicrolectronics STM32F469" - depends on ARCH_STM32 + bool "STMicroelectronics STM32F469" default y config MACH_STM32F746 - bool "STMicrolectronics STM32F746" - depends on ARCH_STM32 + bool "STMicroelectronics STM32F746" default y config MACH_STM32H743 - bool "STMicrolectronics STM32H743" - depends on ARCH_STM32 + bool "STMicroelectronics STM32H743" default y + +endif # ARMv7-M + +endif diff --git a/arch/arm/mach-stm32/board-dt.c b/arch/arm/mach-stm32/board-dt.c index e918686..4a258eb 100644 --- a/arch/arm/mach-stm32/board-dt.c +++ b/arch/arm/mach-stm32/board-dt.c @@ -1,11 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) Maxime Coquelin 2015 * Author: Maxime Coquelin - * License terms: GNU General Public License (GPL), version 2 */ #include -#include #include static const char *const stm32_compat[] __initconst = { @@ -18,5 +17,4 @@ static const char *const stm32_compat[] __initconst = { DT_MACHINE_START(STM32DT, "STM32 (Device Tree Support)") .dt_compat = stm32_compat, - .restart = armv7m_restart, MACHINE_END