[U-Boot] [PATCH] Kirkwood: bugfix: window size (mis)calculation

Prafulla Wadaskar prafulla at marvell.com
Thu Aug 26 07:02:40 CEST 2010


 

> -----Original Message-----
> From: Prafulla Wadaskar [mailto:prafulla at marvell.com] 
> Sent: Thursday, August 26, 2010 2:45 PM
> To: u-boot at lists.denx.de
> Cc: Prabhanjan Sarnaik; Ashish Karkare; Prafulla Wadaskar
> Subject: [PATCH] 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 <prafulla at marvell.com>
> ---
>  arch/arm/cpu/arm926ejs/kirkwood/cpu.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> 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;
>  	}

Applied to u-boot-marvell.git master branch
Regards..
Prafulla . .


More information about the U-Boot mailing list