All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Orion5x: bugfix: window size (mis)calculation
@ 2010-08-24 13:27 Albert Aribaud
  2010-08-26  4:55 ` Prafulla Wadaskar
  2010-08-27  5:00 ` Chris Moore
  0 siblings, 2 replies; 6+ messages in thread
From: Albert Aribaud @ 2010-08-24 13:27 UTC (permalink / raw)
  To: u-boot

Fix orion5x_winctrl_calcsize() off-by-1 bug which caused mapping
windows to be cut by half. This afected all windows including NOR
flash (causing half the flash to be unaccessible) but DRAM was and
still is fine as its size is determined otherwise.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
---
 arch/arm/cpu/arm926ejs/orion5x/cpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/orion5x/cpu.c b/arch/arm/cpu/arm926ejs/orion5x/cpu.c
index 3740e33..260f88b 100644
--- a/arch/arm/cpu/arm926ejs/orion5x/cpu.c
+++ b/arch/arm/cpu/arm926ejs/orion5x/cpu.c
@@ -61,7 +61,7 @@ unsigned int orion5x_winctrl_calcsize(unsigned int sizeval)
 	unsigned int j = 0;
 	u32 val = sizeval >> 1;
 
-	for (i = 0; val > 0x10000; i++) {
+	for (i = 0; val >= 0x10000; i++) {
 		j |= (1 << i);
 		val = val >> 1;
 	}
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-28  5:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-24 13:27 [U-Boot] [PATCH] Orion5x: bugfix: window size (mis)calculation Albert Aribaud
2010-08-26  4:55 ` Prafulla Wadaskar
2010-08-27  5:00 ` Chris Moore
2010-08-27  5:37   ` Albert ARIBAUD
2010-08-27  5:41     ` Albert ARIBAUD
2010-08-28  5:32     ` Chris Moore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.