Merge tag 'tpm-030822' of https://source.denx.de/u-boot/custodians/u-boot-tpm
[platform/kernel/u-boot.git] / board / gdsys / mpc8308 / sdram.c
index 2a77fed..47b8804 100644 (file)
 #ifndef CONFIG_MPC83XX_SDRAM
 
 #include <common.h>
+#include <init.h>
 #include <mpc83xx.h>
 #include <spd_sdram.h>
 
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 #include <asm/processor.h>
@@ -32,7 +34,7 @@ DECLARE_GLOBAL_DATA_PTR;
 static long 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);
 
        out_be32(&im->sysconf.ddrlaw[0].bar,