ARM: stm32: prepare stm32 family to welcome armv7 architecture

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 <ludovic.barre@st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
This commit is contained in:
Ludovic Barre 2018-02-27 09:05:18 +01:00 committed by Alexandre Torgue
parent 40fed8d0e3
commit 3ed71f8ad9
3 changed files with 24 additions and 21 deletions

View file

@ -5,16 +5,17 @@ STM32 ARM Linux Overview
Introduction Introduction
------------ ------------
The STMicroelectronics family of Cortex-M based MCUs are supported by the The STMicroelectronics STM32 family of Cortex-A microprocessors (MPUs) and
'STM32' platform of ARM Linux. Currently only the STM32F429 (Cortex-M4) Cortex-M microcontrollers (MCUs) are supported by the 'STM32' platform of
and STM32F746 (Cortex-M7) are supported. ARM Linux.
Configuration Configuration
------------- -------------
A generic configuration is provided for STM32 family, and can be used as the For MCUs, use the provided default configuration:
default by
make stm32_defconfig make stm32_defconfig
For MPUs, use multi_v7 configuration:
make multi_v7_defconfig
Layout Layout
------ ------
@ -28,4 +29,6 @@ Device Trees.
:Authors: :Authors:
Maxime Coquelin <mcoquelin.stm32@gmail.com> - Maxime Coquelin <mcoquelin.stm32@gmail.com>
- Ludovic Barre <ludovic.barre@st.com>
- Gerald Baeza <gerald.baeza@st.com>

View file

@ -1,8 +1,7 @@
config ARCH_STM32 menuconfig ARCH_STM32
bool "STMicrolectronics STM32" bool "STMicroelectronics STM32 family" if ARM_SINGLE_ARMV7M || ARCH_MULTI_V7
depends on ARM_SINGLE_ARMV7M select ARMV7M_SYSTICK if ARM_SINGLE_ARMV7M
select ARCH_HAS_RESET_CONTROLLER select ARCH_HAS_RESET_CONTROLLER
select ARMV7M_SYSTICK
select CLKSRC_STM32 select CLKSRC_STM32
select PINCTRL select PINCTRL
select RESET_CONTROLLER select RESET_CONTROLLER
@ -10,27 +9,30 @@ config ARCH_STM32
help help
Support for STMicroelectronics STM32 processors. Support for STMicroelectronics STM32 processors.
if ARCH_STM32
if ARM_SINGLE_ARMV7M
config MACH_STM32F429 config MACH_STM32F429
bool "STMicrolectronics STM32F429" bool "STMicroelectronics STM32F429"
depends on ARCH_STM32
default y default y
config MACH_STM32F469 config MACH_STM32F469
bool "STMicrolectronics STM32F469" bool "STMicroelectronics STM32F469"
depends on ARCH_STM32
default y default y
config MACH_STM32F746 config MACH_STM32F746
bool "STMicrolectronics STM32F746" bool "STMicroelectronics STM32F746"
depends on ARCH_STM32
default y default y
config MACH_STM32F769 config MACH_STM32F769
bool "STMicroelectronics STM32F769" bool "STMicroelectronics STM32F769"
depends on ARCH_STM32
default y default y
config MACH_STM32H743 config MACH_STM32H743
bool "STMicrolectronics STM32H743" bool "STMicroelectronics STM32H743"
depends on ARCH_STM32
default y default y
endif # ARMv7-M
endif

View file

@ -6,7 +6,6 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <asm/v7m.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
static const char *const stm32_compat[] __initconst = { static const char *const stm32_compat[] __initconst = {
@ -20,5 +19,4 @@ static const char *const stm32_compat[] __initconst = {
DT_MACHINE_START(STM32DT, "STM32 (Device Tree Support)") DT_MACHINE_START(STM32DT, "STM32 (Device Tree Support)")
.dt_compat = stm32_compat, .dt_compat = stm32_compat,
.restart = armv7m_restart,
MACHINE_END MACHINE_END