Commit af02924d authored by Sergei Poselenov's avatar Sergei Poselenov

RM 1286. Support 64MB SDRAM on STM32f7-SOM as stm32f7-som-64_config

	 and stm32f7-som-64-ext-bsb_config.
parent c808f9f0
...@@ -3246,6 +3246,8 @@ stm-som-1a_config : unconfig ...@@ -3246,6 +3246,8 @@ stm-som-1a_config : unconfig
} }
@$(MKCONFIG) -a stm-som arm arm_cortexm3 stm-som emcraft stm32 @$(MKCONFIG) -a stm-som arm arm_cortexm3 stm-som emcraft stm32
stm32f7-som-64_config \
stm32f7-som-64-ext-bsb_config \
stm32f7-som_config \ stm32f7-som_config \
stm32f7-som-ext-bsb_config: unconfig stm32f7-som-ext-bsb_config: unconfig
@if [ "$(findstring ext-bsb, $@)" ] ; then \ @if [ "$(findstring ext-bsb, $@)" ] ; then \
...@@ -3254,6 +3256,11 @@ stm32f7-som-ext-bsb_config: unconfig ...@@ -3254,6 +3256,11 @@ stm32f7-som-ext-bsb_config: unconfig
echo "#define CONFIG_SYS_BOARD_UCL_BSB" >>$(obj)include/config.h ; \ echo "#define CONFIG_SYS_BOARD_UCL_BSB" >>$(obj)include/config.h ; \
echo "...for UCL-BSB" ; \ echo "...for UCL-BSB" ; \
fi; fi;
@if [ "$(findstring 64, $@)" ] ; then \
echo "...for 64MB SDRAM variant" ; \
echo "#define CONFIG_SYS_RAM_SIZE (64 * 1024 * 1024)" >> \
$(obj)include/config.h ; \
fi;
@$(MKCONFIG) -a stm32f7-som arm arm_cortexm3 stm32f7-som emcraft stm32 @$(MKCONFIG) -a stm32f7-som arm arm_cortexm3 stm32f7-som emcraft stm32
stm32f429-discovery_config : unconfig stm32f429-discovery_config : unconfig
......
...@@ -580,7 +580,12 @@ static inline u32 _ns2clk(u32 ns, u32 freq) ...@@ -580,7 +580,12 @@ static inline u32 _ns2clk(u32 ns, u32 freq)
#define SDRAM_MWID 1 /* 16 bit memory */ #define SDRAM_MWID 1 /* 16 bit memory */
#define SDRAM_NR 0x2 /* 13-bit row */ #define SDRAM_NR 0x2 /* 13-bit row */
#if (CONFIG_SYS_RAM_SIZE == (32 * 1024 * 1024))
#define SDRAM_NC 0x1 /* 9-bit col */ #define SDRAM_NC 0x1 /* 9-bit col */
#endif
#if (CONFIG_SYS_RAM_SIZE == (64 * 1024 * 1024))
#define SDRAM_NC 0x2 /* 10-bit col */
#endif
#define SDRAM_TRRD NS2CLK(12) #define SDRAM_TRRD NS2CLK(12)
#define SDRAM_TRCD NS2CLK(18) #define SDRAM_TRCD NS2CLK(18)
......
...@@ -180,7 +180,7 @@ static void stm32f7_mpu_config(void) ...@@ -180,7 +180,7 @@ static void stm32f7_mpu_config(void)
0 << 8 | 31 << 1 | 1 << 0); 0 << 8 | 31 << 1 | 1 << 0);
/* /*
* Configure 32MB SDRAM region as Normal memory with the appropriate * Configure 64MB SDRAM region as Normal memory with the appropriate
* cacheability attributes * cacheability attributes
*/ */
cortex_m3_mpu_set_region(MPU_RGN_SDRAM_CA, cortex_m3_mpu_set_region(MPU_RGN_SDRAM_CA,
...@@ -193,7 +193,7 @@ static void stm32f7_mpu_config(void) ...@@ -193,7 +193,7 @@ static void stm32f7_mpu_config(void)
/* Non-cacheable */ /* Non-cacheable */
1 << 19 | 0 << 18 | 0 << 17 | 0 << 16 | 1 << 19 | 0 << 18 | 0 << 17 | 0 << 16 |
#endif #endif
0 << 8 | 24 << 1 | 1 << 0); 0 << 8 | 25 << 1 | 1 << 0);
#if defined(CONFIG_STM32F7_DCACHE_ON) || defined(CONFIG_STM32F7_ICACHE_ON) #if defined(CONFIG_STM32F7_DCACHE_ON) || defined(CONFIG_STM32F7_ICACHE_ON)
stm32f7_envm_mpu_cfg(0, 0); stm32f7_envm_mpu_cfg(0, 0);
......
...@@ -160,7 +160,9 @@ ...@@ -160,7 +160,9 @@
* Configuration of the external SDRAM memory * Configuration of the external SDRAM memory
*/ */
#define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_NR_DRAM_BANKS 1
#ifndef CONFIG_SYS_RAM_SIZE
#define CONFIG_SYS_RAM_SIZE (32 * 1024 * 1024) #define CONFIG_SYS_RAM_SIZE (32 * 1024 * 1024)
#endif
#define CONFIG_SYS_RAM_FREQ_DIV 2 #define CONFIG_SYS_RAM_FREQ_DIV 2
#define CONFIG_SYS_RAM_BASE 0xC0000000 #define CONFIG_SYS_RAM_BASE 0xC0000000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment