board: stm32: use bi_dram[0].start instead of hardcoded value
authorPatrice Chotard <patrice.chotard@st.com>
Fri, 3 Aug 2018 09:46:11 +0000 (11:46 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 13 Aug 2018 18:03:57 +0000 (14:03 -0400)
Use gd->bd->bi_dram[0].start initialized from DT instead of using
hardcoded CONFIG_SYS_SDRAM_BASE from config file.

Remove unused CONFIG_SYS_RAM_BASE and CONFIG_SYS_SDRAM_BASE defines.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
board/st/stm32f429-discovery/stm32f429-discovery.c
board/st/stm32f429-evaluation/stm32f429-evaluation.c
board/st/stm32f469-discovery/stm32f469-discovery.c
include/configs/stm32f429-discovery.h
include/configs/stm32f429-evaluation.h
include/configs/stm32f469-discovery.h
include/configs/stm32h743-disco.h
include/configs/stm32h743-eval.h

index e800d70f763b537c05c7e6f9fd20507f3751883a..500dc5fe3a6bede3915c68186a85edb90fa2e110 100644 (file)
@@ -54,7 +54,7 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
-       gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+       gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
 
        return 0;
 }
index fd2109b27c0f801d79d95da98c92b2fc87754394..8ab2fa5d59abc763839b5212f9605b362e7a20dc 100644 (file)
@@ -48,7 +48,7 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
-       gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+       gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
 
        return 0;
 }
index a457f9095276e97d81fa70955f4e9ecde76a9edc..70d23d90f4ca7d181ecb2ea7971a8091a1f80aa6 100644 (file)
@@ -48,7 +48,7 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
-       gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+       gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
 
        return 0;
 }
index 46eda1d51829297fb8d73b092c8a46325e844040..458d433a6aca2bc19af202f22de08561aa4fa48f 100644 (file)
@@ -22,8 +22,6 @@
 #define CONFIG_NR_DRAM_BANKS           1
 #define CONFIG_SYS_RAM_CS              1
 #define CONFIG_SYS_RAM_FREQ_DIV                2
-#define CONFIG_SYS_RAM_BASE            0x90000000
-#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_RAM_BASE
 #define CONFIG_SYS_LOAD_ADDR           0x90400000
 #define CONFIG_LOADADDR                        0x90400000
 
index 67cb584165fee190a493122474affcf2e544d20c..881cb2dedcbbd292f0a63b5edc47492548b5e6fa 100644 (file)
@@ -21,8 +21,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS           1
 #define CONFIG_SYS_RAM_FREQ_DIV                2
-#define CONFIG_SYS_RAM_BASE            0x00000000
-#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_RAM_BASE
 #define CONFIG_SYS_LOAD_ADDR           0x00400000
 #define CONFIG_LOADADDR                        0x00400000
 
index b5259ee214574b6a366b4f198d15c30f79570f00..3d628cc71d750ad39d4932f1974a9d5784429b20 100644 (file)
@@ -21,8 +21,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS           1
 #define CONFIG_SYS_RAM_FREQ_DIV                2
-#define CONFIG_SYS_RAM_BASE            0x00000000
-#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_RAM_BASE
 #define CONFIG_SYS_LOAD_ADDR           0x00400000
 #define CONFIG_LOADADDR                        0x00400000
 
index 5b6ee76e7c6b562a1e4c89592b9ca99762380b5c..a8dcfe3b7a550c0a1d6c797bae16363ca06f0725 100644 (file)
@@ -16,8 +16,6 @@
  * Configuration of the external SDRAM memory
  */
 #define CONFIG_NR_DRAM_BANKS           1
-#define CONFIG_SYS_RAM_BASE            0xD0000000
-#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_RAM_BASE
 #define CONFIG_SYS_LOAD_ADDR           0xD0400000
 #define CONFIG_LOADADDR                        0xD0400000
 
index 5b6ee76e7c6b562a1e4c89592b9ca99762380b5c..a8dcfe3b7a550c0a1d6c797bae16363ca06f0725 100644 (file)
@@ -16,8 +16,6 @@
  * Configuration of the external SDRAM memory
  */
 #define CONFIG_NR_DRAM_BANKS           1
-#define CONFIG_SYS_RAM_BASE            0xD0000000
-#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_RAM_BASE
 #define CONFIG_SYS_LOAD_ADDR           0xD0400000
 #define CONFIG_LOADADDR                        0xD0400000