From: Prafulla Wadaskar Date: Thu, 26 Aug 2010 09:13:55 +0000 (+0530) Subject: Kirkwood: bugfix: window size (mis)calculation X-Git-Tag: v2010.09-rc1~1^2~5^2~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f106056095049c2c748c2a2797e5353295240e04;p=oweals%2Fu-boot.git 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 c63e8641f2..82c978bd93 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; }