summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-07-23 13:04:56 -0400
committerTom Rini <trini@konsulko.com>2022-08-04 16:18:47 -0400
commit9a56ab96aa3206001c89151eb2755479f708f084 (patch)
treef34f024e11ae18f3c902736f83094ca44789426e /board/freescale
parentb72713dc0bb76a7629dab3746694633089e51339 (diff)
powerpc: Move CONFIG_SYS_DDR_SIZE to CONFIG_SYS_SDRAM_SIZE
We have a number of CONFIG_SYS_xxx_SIZE options to describe the amount main memory available. Rework CONFIG_SYS_DDR_SIZE, which described a size in number of MiB to use CONFIG_SYS_SDRAM_SIZE which is most often used as a number of bytes. Use shifts of this option when required. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/mpc837xerdb/mpc837xerdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 84671f63c6..2650d300e3 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -97,7 +97,7 @@ int dram_init(void)
int fixed_sdram(void)
{
immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
- u32 msize = CONFIG_SYS_DDR_SIZE * 1024 * 1024;
+ u32 msize = CONFIG_SYS_SDRAM_SIZE;
u32 msize_log2 = __ilog2(msize);
im->sysconf.ddrlaw[0].bar = CONFIG_SYS_SDRAM_BASE & 0xfffff000;
@@ -127,7 +127,7 @@ int fixed_sdram(void)
im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
udelay(2000);
- return CONFIG_SYS_DDR_SIZE;
+ return CONFIG_SYS_SDRAM_SIZE >> 20;
}
#endif /*!CONFIG_SYS_SPD_EEPROM */