summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/omap3/emif4.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-12-16 23:00:53 +0100
committerWolfgang Denk <wd@denx.de>2010-12-16 23:00:53 +0100
commit006915fbb0e3c1c9927fe32c4e92cb011f8499e7 (patch)
treeb477df920f7d638a0472aa1d6bfa5ff71243448c /arch/arm/cpu/armv7/omap3/emif4.c
parent98e69567022eb2138dd99554b3a2e80522a1b153 (diff)
parentb5d58d8500bfb918c7fec56f241e6ee1078c2be0 (diff)
downloadu-boot-imx-006915fbb0e3c1c9927fe32c4e92cb011f8499e7.zip
u-boot-imx-006915fbb0e3c1c9927fe32c4e92cb011f8499e7.tar.gz
u-boot-imx-006915fbb0e3c1c9927fe32c4e92cb011f8499e7.tar.bz2
Merge branch 'master' of ../master into next
Diffstat (limited to 'arch/arm/cpu/armv7/omap3/emif4.c')
-rw-r--r--arch/arm/cpu/armv7/omap3/emif4.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/cpu/armv7/omap3/emif4.c b/arch/arm/cpu/armv7/omap3/emif4.c
index 0870857..3085637 100644
--- a/arch/arm/cpu/armv7/omap3/emif4.c
+++ b/arch/arm/cpu/armv7/omap3/emif4.c
@@ -29,6 +29,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/arch/emif4.h>
+DECLARE_GLOBAL_DATA_PTR;
extern omap3_sysinfo sysinfo;
static emif4_t *emif4_base = (emif4_t *)OMAP34XX_SDRC_BASE;
@@ -48,10 +49,11 @@ u32 is_mem_sdr(void)
*/
u32 get_sdr_cs_size(u32 cs)
{
- u32 size;
+ u32 size = 0;
/* TODO: Calculate the size based on EMIF4 configuration */
- size = CONFIG_SYS_CS0_SIZE;
+ if (cs == CS0)
+ size = CONFIG_SYS_CS0_SIZE;
return size;
}
@@ -138,7 +140,6 @@ void do_emif4_init(void)
*/
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
unsigned int size0 = 0, size1 = 0;
size0 = get_sdr_cs_size(CS0);
@@ -156,7 +157,6 @@ int dram_init(void)
void dram_init_banksize (void)
{
- DECLARE_GLOBAL_DATA_PTR;
unsigned int size0 = 0, size1 = 0;
size0 = get_sdr_cs_size(CS0);