Skip to content
Snippets Groups Projects
Commit 73feefdc authored by Tom Rini's avatar Tom Rini
Browse files

am33xx: Stop using PHYS_DRAM_1 define


We defined PHYS_DRAM_1 to 0x80000000 (start of DRAM) and then used this
for CONFIG_SYS_SDRAM_BASE.  But then we kept on referencing PHYS_DRAM_1
in other places.  Change to directly setting CONFIG_SYS_DRAM_BASE and
then using that name in code.

Signed-off-by: default avatarTom Rini <trini@ti.com>
parent dd5729a0
No related branches found
No related tags found
No related merge requests found
...@@ -96,7 +96,7 @@ void sdram_init(void) ...@@ -96,7 +96,7 @@ void sdram_init(void)
*/ */
int board_init(void) int board_init(void)
{ {
gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100; gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
gpmc_init(); gpmc_init();
......
...@@ -112,7 +112,7 @@ int board_init(void) ...@@ -112,7 +112,7 @@ int board_init(void)
{ {
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100; gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
return 0; return 0;
} }
......
...@@ -343,7 +343,7 @@ int board_init(void) ...@@ -343,7 +343,7 @@ int board_init(void)
STNOR_GPMC_CONFIG5, STNOR_GPMC_CONFIG6, STNOR_GPMC_CONFIG7 }; STNOR_GPMC_CONFIG5, STNOR_GPMC_CONFIG6, STNOR_GPMC_CONFIG7 };
#endif #endif
gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100; gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
gpmc_init(); gpmc_init();
......
...@@ -112,7 +112,7 @@ void sdram_init(void) ...@@ -112,7 +112,7 @@ void sdram_init(void)
*/ */
int board_init(void) int board_init(void)
{ {
gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100; gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
return 0; return 0;
} }
......
...@@ -136,10 +136,9 @@ ...@@ -136,10 +136,9 @@
/* Physical Memory Map */ /* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */ #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
#define PHYS_DRAM_1 0x80000000 /* DRAM Bank #1 */
#define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */ #define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */
#define CONFIG_SYS_SDRAM_BASE PHYS_DRAM_1 #define CONFIG_SYS_SDRAM_BASE 0x80000000
#define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \ #define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \
GENERATED_GBL_DATA_SIZE) GENERATED_GBL_DATA_SIZE)
/* Platform/Board specific defs */ /* Platform/Board specific defs */
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
* memtest works on 8 MB in DRAM after skipping 32MB from * memtest works on 8 MB in DRAM after skipping 32MB from
* start addr of ram disk * start addr of ram disk
*/ */
#define CONFIG_SYS_MEMTEST_START (PHYS_DRAM_1 + (64 * 1024 * 1024)) #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + (64 << 20))
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \ #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \
+ (8 * 1024 * 1024)) + (8 * 1024 * 1024))
...@@ -147,10 +147,9 @@ ...@@ -147,10 +147,9 @@
/* Physical Memory Map */ /* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */ #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
#define PHYS_DRAM_1 0x80000000 /* DRAM Bank #1 */
#define CONFIG_MAX_RAM_BANK_SIZE (1024 << 19) /* 512MiB */ #define CONFIG_MAX_RAM_BANK_SIZE (1024 << 19) /* 512MiB */
#define CONFIG_SYS_SDRAM_BASE PHYS_DRAM_1 #define CONFIG_SYS_SDRAM_BASE 0x80000000
#define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \ #define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \
GENERATED_GBL_DATA_SIZE) GENERATED_GBL_DATA_SIZE)
/* Platform/Board specific defs */ /* Platform/Board specific defs */
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
/* Boot Argument Buffer Size */ /* Boot Argument Buffer Size */
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
#define CONFIG_SYS_MEMTEST_START PHYS_DRAM_1 #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \ #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \
+ PHYS_DRAM_1_SIZE - (8 << 12)) + PHYS_DRAM_1_SIZE - (8 << 12))
...@@ -137,11 +137,10 @@ ...@@ -137,11 +137,10 @@
* Physical Memory Map * Physical Memory Map
*/ */
#define CONFIG_NR_DRAM_BANKS 1 /* 1 banks of DRAM */ #define CONFIG_NR_DRAM_BANKS 1 /* 1 banks of DRAM */
#define PHYS_DRAM_1 0x80000000 /* DRAM Bank #1 */
#define PHYS_DRAM_1_SIZE 0x20000000 /* 512MB */ #define PHYS_DRAM_1_SIZE 0x20000000 /* 512MB */
#define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1024MB */ #define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1024MB */
#define CONFIG_SYS_SDRAM_BASE PHYS_DRAM_1 #define CONFIG_SYS_SDRAM_BASE 0x80000000
#define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \ #define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \
GENERATED_GBL_DATA_SIZE) GENERATED_GBL_DATA_SIZE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment