[U-Boot] [PATCH v2 2/2] km_arm: enable SDRAM window size fixup

Prafulla Wadaskar prafulla at marvell.com
Fri Jul 20 08:30:59 CEST 2012



> -----Original Message-----
> From: u-boot-bounces at lists.denx.de [mailto:u-boot-
> bounces at lists.denx.de] On Behalf Of Gerlando Falauto
> Sent: 06 July 2012 17:20
> To: u-boot at lists.denx.de
> Cc: Valentin Longchamp; Holger Brunck; Gerlando Falauto
> Subject: [U-Boot] [PATCH v2 2/2] km_arm: enable SDRAM window size
> fixup
> 
> Size of the SDRAM chips might differ between any two (otherwise
> identical) instances of the same board.
> 
> So change board_early_init_f() to use km_sdram_bs_set(), in order to
> fixup the window size register at runtime, according to the detected
> SDRAM size.
> 
> Signed-off-by: Gerlando Falauto <gerlando.falauto at keymile.com>
> Cc: Valentin Longchamp <valentin.longchamp at keymile.com>
> Cc: Holger Brunck <holger.brunck at keymile.com>
> ---
> changes for v2:
> - rebase to current u-boot-marvell.git master branch
> 
>  board/keymile/km_arm/km_arm.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/board/keymile/km_arm/km_arm.c
> b/board/keymile/km_arm/km_arm.c
> index 2b2ca39..24cf6c7 100644
> --- a/board/keymile/km_arm/km_arm.c
> +++ b/board/keymile/km_arm/km_arm.c
> @@ -241,6 +241,17 @@ int misc_init_r(void)
>  	return 0;
>  }
> 
> +static void dram_size_fixup(void)

The name "fixup" doesn't sound good.

> +{
> +	u32 size;
> +
> +	/* probe currently equipped RAM size */
> +	size = get_ram_size((void *)kw_sdram_bar(0), kw_sdram_bs(0));
> +
> +	/* fixup SDRAM window size accordingly */
> +	kw_sdram_bs_set(0, size);
> +}
> +

This is useful API for other boards too.
I would like to suggest to add this change in dram_init(), the window size can be corrected right after sdram size detection. And that will be applicable for all supported bank.

So may you please push in to dram.c?

Regards...
Prafulla . . .


More information about the U-Boot mailing list