From 4e4479a8922833025a8aac4f33fff9fa1e294ac9 Mon Sep 17 00:00:00 2001 From: Albert Aribaud <[albert.aribaud@free.fr]> Date: Thu, 26 Aug 2010 14:05:19 +0530 Subject: Orion5x: bugfix: window size (mis)calculation 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 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; } -- cgit v0.10.2 From f106056095049c2c748c2a2797e5353295240e04 Mon Sep 17 00:00:00 2001 From: Prafulla Wadaskar Date: Thu, 26 Aug 2010 14:43:55 +0530 Subject: Kirkwood: bugfix: window size (mis)calculation Fixed kw_winctrl_calcsize() off-by-1 bug which caused mapping windows size to be cut by half. This corrected all windows address configuration Signed-off-by: Prafulla Wadaskar diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c index c63e864..82c978b 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c @@ -81,7 +81,7 @@ unsigned int kw_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; } -- cgit v0.10.2 From 438c37e1b3493c800fd50924d0b492f96d5c66bb Mon Sep 17 00:00:00 2001 From: Albert Aribaud <[albert.aribaud@free.fr]> Date: Fri, 27 Aug 2010 21:41:48 +0530 Subject: orion5x: fix comment-in-comment typo in cpu.h Signed-off-by: Albert Aribaud diff --git a/arch/arm/include/asm/arch-orion5x/cpu.h b/arch/arm/include/asm/arch-orion5x/cpu.h index 80717f8..6ce02a9 100644 --- a/arch/arm/include/asm/arch-orion5x/cpu.h +++ b/arch/arm/include/asm/arch-orion5x/cpu.h @@ -76,7 +76,7 @@ enum orion5x_cpu_attrib { /* * Device Address MAP BAR values -/* + * * All addresses and sizes not defined by board code * will be given default values here. */ -- cgit v0.10.2