ARM: am335x: Add phyCORE AM335x R2 support
[oweals/u-boot.git] / board / freescale / mpc8308rdb / sdram.c
index 81e155a40142214c650fd602d18d58c8231d38de..317e63ea6a14f32cae9634175613c99a006c1bba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2007 Freescale Semiconductor, Inc.
  * Copyright (C) 2010 Ilya Yanok, Emcraft Systems, yanok@emcraft.com
@@ -8,8 +9,6 @@
  *
  * This files is  mostly identical to the original from
  * board\freescale\mpc8315erdb\sdram.c
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -34,7 +33,7 @@ static long fixed_sdram(void)
        u32 msize_log2 = __ilog2(msize);
 
        out_be32(&im->sysconf.ddrlaw[0].bar,
-                       CONFIG_SYS_DDR_SDRAM_BASE  & 0xfffff000);
+                       CONFIG_SYS_SDRAM_BASE  & 0xfffff000);
        out_be32(&im->sysconf.ddrlaw[0].ar, LBLAWAR_EN | (msize_log2 - 1));
        out_be32(&im->sysconf.ddrcdr, CONFIG_SYS_DDRCDR_VALUE);
 
@@ -62,7 +61,7 @@ static long fixed_sdram(void)
        setbits_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
        sync();
 
-       return get_ram_size(CONFIG_SYS_DDR_SDRAM_BASE, msize);
+       return get_ram_size(CONFIG_SYS_SDRAM_BASE, msize);
 }
 
 int dram_init(void)