]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARMV7: OMAP3: Fix bug in get_sdr_cs_offset()
authorSteve Sakoman <steve@sakoman.com>
Fri, 1 Oct 2010 04:46:52 +0000 (21:46 -0700)
committerWolfgang Denk <wd@denx.de>
Sun, 17 Oct 2010 18:14:28 +0000 (20:14 +0200)
This patch fixes a typo in the routine to calculate the cs offset
based upon the contents of the SDRC cs_cfg register.  This function
mistakenly shifts the CS1STARTLOW field 17 bits right instead of
17 bits left.

This hasn't been an issue to date because all OMAP3 boards currently
are configured to have zeros in this field.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
arch/arm/cpu/armv7/omap3/sdrc.c

index 2719bb53a7cc343a2e677493d682fbf27905aeee..6c419f5b93dcc8dc7281c868ff600f67e8a8d118 100644 (file)
@@ -99,7 +99,7 @@ u32 get_sdr_cs_offset(u32 cs)
                return 0;
 
        offset = readl(&sdrc_base->cs_cfg);
-       offset = (offset & 15) << 27 | (offset & 0x30) >> 17;
+       offset = (offset & 15) << 27 | (offset & 0x30) << 17;
 
        return offset;
 }