drivers: memc: stm32: initial support for stm32 FMC

This commit adds a new driver category for memory controller
peripherals. There is no API involved for now, as it has not been found
necessary for first implementation.

STM32 Flexible Memory Controller (FMC) is the only controller supported
for now. This peripheral allows to access multiple types of external
memories, e.g. SDRAM, NAND, NOR Flash...

The initial implementation adds support for the SDRAM controller only.
The HAL API is used, so the implementation should be portable to other
STM32 series. It has only been tested on H7 series, so for now it can
only be enabled when working on H7.

Linker facilities have also been added in order to allow applications to
easily define a variable in SDRAM.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
Gerard Marull-Paretas 2020-11-01 20:48:15 +01:00 committed by Carles Cufí
commit e671d363b8
16 changed files with 574 additions and 0 deletions

View file

@ -30,6 +30,8 @@
#define __imx_boot_data_section Z_GENERIC_SECTION(_IMX_BOOT_DATA_SECTION_NAME)
#define __imx_boot_ivt_section Z_GENERIC_SECTION(_IMX_BOOT_IVT_SECTION_NAME)
#define __imx_boot_dcd_section Z_GENERIC_SECTION(_IMX_BOOT_DCD_SECTION_NAME)
#define __stm32_sdram1_section Z_GENERIC_SECTION(_STM32_SDRAM1_SECTION_NAME)
#define __stm32_sdram2_section Z_GENERIC_SECTION(_STM32_SDRAM2_SECTION_NAME)
#endif /* CONFIG_ARM */
#if defined(CONFIG_NOCACHE_MEMORY)

View file

@ -53,6 +53,9 @@
#define _IMX_BOOT_IVT_SECTION_NAME .boot_hdr.ivt
#define _IMX_BOOT_DCD_SECTION_NAME .boot_hdr.dcd_data
#define _STM32_SDRAM1_SECTION_NAME .stm32_sdram1
#define _STM32_SDRAM2_SECTION_NAME .stm32_sdram2
#ifdef CONFIG_NOCACHE_MEMORY
#define _NOCACHE_SECTION_NAME nocache
#endif