diff options
author | Aneesh V <aneesh@ti.com> | 2011-07-21 09:10:12 -0400 |
---|---|---|
committer | U-Boot <uboot@aari01-12.(none)> | 2011-08-03 12:49:19 +0200 |
commit | 095aea293b70114dda0d958788a8acc15e3cd665 (patch) | |
tree | 7b8aac0828ca5a801aac25bb0e2c7ac8c3626189 /arch/arm/cpu/armv7/omap4/board.c | |
parent | 2ae610f030c376323515321280352b3fe6278a0f (diff) | |
download | u-boot-imx-095aea293b70114dda0d958788a8acc15e3cd665.zip u-boot-imx-095aea293b70114dda0d958788a8acc15e3cd665.tar.gz u-boot-imx-095aea293b70114dda0d958788a8acc15e3cd665.tar.bz2 |
omap4: calculate EMIF register values
Calculate EMIF register values based on AC timing parameters
from the SDRAM datasheet and the DDR frequency rather than
using the hard-coded values.
For a new board the user doen't have to go through the tedious
process of calculating the register values. Instead, just
provide the AC timings from the device data sheet as input
and the driver will automatically calculate the register values.
Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7/omap4/board.c')
-rw-r--r-- | arch/arm/cpu/armv7/omap4/board.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/cpu/armv7/omap4/board.c b/arch/arm/cpu/armv7/omap4/board.c index ca107f7..786c239 100644 --- a/arch/arm/cpu/armv7/omap4/board.c +++ b/arch/arm/cpu/armv7/omap4/board.c @@ -32,6 +32,7 @@ #include <asm/arch/cpu.h> #include <asm/arch/sys_proto.h> #include <asm/sizes.h> +#include <asm/arch/emif.h> #include "omap4_mux_data.h" DECLARE_GLOBAL_DATA_PTR; @@ -193,13 +194,13 @@ u32 omap4_sdram_size(void) { u32 section, i, total_size = 0, size, addr; for (i = 0; i < 4; i++) { - section = __raw_readl(DMM_LISA_MAP_BASE + i*4); - addr = section & DMM_LISA_MAP_SYS_ADDR_MASK; + section = __raw_readl(OMAP44XX_DMM_LISA_MAP_BASE + i*4); + addr = section & OMAP44XX_SYS_ADDR_MASK; /* See if the address is valid */ if ((addr >= OMAP44XX_DRAM_ADDR_SPACE_START) && (addr < OMAP44XX_DRAM_ADDR_SPACE_END)) { - size = ((section & DMM_LISA_MAP_SYS_SIZE_MASK) >> - DMM_LISA_MAP_SYS_SIZE_SHIFT); + size = ((section & OMAP44XX_SYS_SIZE_MASK) >> + OMAP44XX_SYS_SIZE_SHIFT); size = 1 << size; size *= SZ_16M; total_size += size; |