summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm926ejs/orion5x/cpu.c
diff options
context:
space:
mode:
authorAlbert Aribaud <[albert.aribaud@free.fr]>2010-08-26 14:05:19 +0530
committerPrafulla Wadaskar <prafulla@marvell.com>2010-08-26 14:05:19 +0530
commit4e4479a8922833025a8aac4f33fff9fa1e294ac9 (patch)
tree3f2b7e4ce5640162fa9f6ae47028bdbfec2ef4f0 /arch/arm/cpu/arm926ejs/orion5x/cpu.c
parent5549d22b656550d36b2cc46743c7220ab0e9dcc4 (diff)
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 <albert.aribaud@free.fr>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/orion5x/cpu.c')
-rw-r--r--arch/arm/cpu/arm926ejs/orion5x/cpu.c2
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 3740e33e9d..260f88b46e 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;
}