From 095aea293b70114dda0d958788a8acc15e3cd665 Mon Sep 17 00:00:00 2001 From: Aneesh V Date: Thu, 21 Jul 2011 09:10:12 -0400 Subject: 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 Signed-off-by: Sandeep Paulraj --- arch/arm/include/asm/arch-omap4/emif.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm/include/asm/arch-omap4/emif.h') diff --git a/arch/arm/include/asm/arch-omap4/emif.h b/arch/arm/include/asm/arch-omap4/emif.h index 09e9baa..a167508 100644 --- a/arch/arm/include/asm/arch-omap4/emif.h +++ b/arch/arm/include/asm/arch-omap4/emif.h @@ -1019,7 +1019,16 @@ struct emif_regs { #define emif_assert(c) ({ if (0) hang(); }) #endif +#ifdef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs); void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs); +#else +void emif_get_device_details(u32 emif_nr, + struct lpddr2_device_details *cs0_device_details, + struct lpddr2_device_details *cs1_device_details); +void emif_get_device_timings(u32 emif_nr, + const struct lpddr2_device_timings **cs0_device_timings, + const struct lpddr2_device_timings **cs1_device_timings); +#endif #endif -- cgit v1.1