summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSteve Sakoman <steve@sakoman.com>2010-09-30 21:46:52 -0700
committerWolfgang Denk <wd@denx.de>2010-10-17 20:14:28 +0200
commit136c69ad7917f23d401c3a794cd0f5a4ab2230de (patch)
tree708e60521d653e80d6a01263cbc399e803843c92 /arch
parent68b0fbf08574ac2314919ce8fad9a1965041cc44 (diff)
ARMV7: OMAP3: Fix bug in get_sdr_cs_offset()
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/omap3/sdrc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c
index 2719bb53a7..6c419f5b93 100644
--- a/arch/arm/cpu/armv7/omap3/sdrc.c
+++ b/arch/arm/cpu/armv7/omap3/sdrc.c
@@ -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;
}