]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
stm32f746-disco: enable flash support
authorVikas Manocha <vikas.manocha@st.com>
Wed, 9 Mar 2016 23:18:14 +0000 (15:18 -0800)
committerTom Rini <trini@konsulko.com>
Sat, 26 Mar 2016 22:49:28 +0000 (18:49 -0400)
This patch enables embedded flash for stm32f746 discovery board.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
arch/arm/include/asm/arch-stm32f7/stm32.h
include/configs/stm32f746-disco.h

index 713eb2e8cf7b64c0165313573bc01759577caff1..68bdab069d480752a7c99e6bbde255a0442dd319 100644 (file)
 
 #define SDRAM_FMC_BASE         (AHB3_PERIPH_BASE + 0x4A0000140)
 
+static const u32 sect_sz_kb[CONFIG_SYS_MAX_FLASH_SECT] = {
+       [0 ... 3] =     32 * 1024,
+       [4] =           128 * 1024,
+       [5 ... 7] =     256 * 1024
+};
+
 enum clock {
        CLOCK_CORE,
        CLOCK_AHB,
index e1b8bcb084db91fbc56b834ffc4ed9c12afa7cc0..807ab6574eb5144b38ee10e79833caa5ae5f7f56 100644 (file)
@@ -9,7 +9,7 @@
 #define __CONFIG_H
 
 #define CONFIG_SYS_THUMB_BUILD
-#define CONFIG_SYS_NO_FLASH
+/*#define CONFIG_SYS_NO_FLASH*/
 
 #define CONFIG_OF_LIBFDT
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_SYS_LOAD_ADDR           0x20000000
 #define CONFIG_LOADADDR                        0x20000000
 
-#define CONFIG_SYS_MAX_FLASH_SECT      12
-#define CONFIG_SYS_MAX_FLASH_BANKS     2
+#define CONFIG_SYS_MAX_FLASH_SECT      8
+#define CONFIG_SYS_MAX_FLASH_BANKS     1
 
-#ifndef CONFIG_SYS_NO_FLASH
-#define CONFIG_ENV_IS_IN_FLASH
-#else
 #define CONFIG_ENV_IS_NOWHERE
-#endif
 #define CONFIG_ENV_SIZE                        (8 << 10)
 
 #define CONFIG_STM32_GPIO
+#define CONFIG_STM32_FLASH
 #define CONFIG_STM32X7_SERIAL
 
 #define CONFIG_SYS_CLK_FREQ            16*1000*1000 /* 180 MHz */