* [U-Boot] ARMV7: OMAP3: Fix bug in get_sdr_cs_offset()
@ 2010-10-01 13:55 Steve Sakoman
0 siblings, 0 replies; 3+ messages in thread
From: Steve Sakoman @ 2010-10-01 13:55 UTC (permalink / raw)
To: u-boot
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.com>
---
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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] ARMV7: OMAP3: Fix bug in get_sdr_cs_offset()
@ 2010-10-05 22:57 Steve Sakoman
2010-10-05 23:04 ` Steve Sakoman
0 siblings, 1 reply; 3+ messages in thread
From: Steve Sakoman @ 2010-10-05 22:57 UTC (permalink / raw)
To: u-boot
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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] ARMV7: OMAP3: Fix bug in get_sdr_cs_offset()
2010-10-05 22:57 [U-Boot] ARMV7: OMAP3: Fix bug in get_sdr_cs_offset() Steve Sakoman
@ 2010-10-05 23:04 ` Steve Sakoman
0 siblings, 0 replies; 3+ messages in thread
From: Steve Sakoman @ 2010-10-05 23:04 UTC (permalink / raw)
To: u-boot
On Tue, Oct 5, 2010 at 3:57 PM, Steve Sakoman <steve@sakoman.com> wrote:
> ARMV7: OMAP3: Fix bug in get_sdr_cs_offset()
Sorry! Sent this one out again by mistake. You can ignore.
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-05 23:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05 22:57 [U-Boot] ARMV7: OMAP3: Fix bug in get_sdr_cs_offset() Steve Sakoman
2010-10-05 23:04 ` Steve Sakoman
-- strict thread matches above, loose matches on Subject: below --
2010-10-01 13:55 Steve Sakoman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox