]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Kirkwood: bugfix: window size (mis)calculation
authorPrafulla Wadaskar <prafulla@marvell.com>
Thu, 26 Aug 2010 09:13:55 +0000 (14:43 +0530)
committerPrafulla Wadaskar <prafulla@marvell.com>
Thu, 26 Aug 2010 09:13:55 +0000 (14:43 +0530)
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 <prafulla@marvell.com>
arch/arm/cpu/arm926ejs/kirkwood/cpu.c

index c63e8641f2146e0606c14a2499d1a8a4f2391570..82c978bd93edb308dfb16000d1b9769ff970842d 100644 (file)
@@ -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;
        }