From: Steve Sakoman <steve@sakoman.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] ARMV7: OMAP3: Fix bug in get_sdr_cs_offset()
Date: Tue, 05 Oct 2010 15:57:41 -0700 [thread overview]
Message-ID: <1286319461.27830.2.camel@quadra> (raw)
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>
---
diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c
index 2719bb5..6c419f5 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;
}
next reply other threads:[~2010-10-05 22:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 22:57 Steve Sakoman [this message]
2010-10-05 23:04 ` [U-Boot] ARMV7: OMAP3: Fix bug in get_sdr_cs_offset() Steve Sakoman
-- strict thread matches above, loose matches on Subject: below --
2010-10-01 13:55 Steve Sakoman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1286319461.27830.2.camel@quadra \
--to=steve@sakoman.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox