diff options
Diffstat (limited to 'arch/arm/cpu/armv7/omap-common/hwinit-common.c')
-rw-r--r-- | arch/arm/cpu/armv7/omap-common/hwinit-common.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c index 2ab16bf..5cf4e2b 100644 --- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c @@ -30,7 +30,7 @@ #include <common.h> #include <asm/arch/sys_proto.h> #include <asm/sizes.h> -#include <asm/arch/emif.h> +#include <asm/emif.h> DECLARE_GLOBAL_DATA_PTR; @@ -169,19 +169,21 @@ void watchdog_init(void) u32 omap_sdram_size(void) { u32 section, i, total_size = 0, size, addr; + for (i = 0; i < 4; i++) { - section = __raw_readl(OMAP44XX_DMM_LISA_MAP_BASE + i*4); - addr = section & OMAP44XX_SYS_ADDR_MASK; + section = __raw_readl(DMM_BASE + i*4); + addr = section & EMIF_SYS_ADDR_MASK; /* See if the address is valid */ - if ((addr >= OMAP44XX_DRAM_ADDR_SPACE_START) && - (addr < OMAP44XX_DRAM_ADDR_SPACE_END)) { - size = ((section & OMAP44XX_SYS_SIZE_MASK) >> - OMAP44XX_SYS_SIZE_SHIFT); - size = 1 << size; - size *= SZ_16M; + if ((addr >= DRAM_ADDR_SPACE_START) && + (addr < DRAM_ADDR_SPACE_END)) { + size = ((section & EMIF_SYS_SIZE_MASK) >> + EMIF_SYS_SIZE_SHIFT); + size = 1 << size; + size *= SZ_16M; total_size += size; } } + return total_size; } |