[PATCH 08/12] ARM: rpi_b: drop RAM size to 128M

Naren (Narendra) Sankar nsankar at broadcom.com
Tue Jul 3 22:09:09 EDT 2012


This should not be hard-coded.

The current board has 256MB but still allows the VC to use different RAM configuration splits. So the u-boot/Linux partition can get more than 128MB.

And it is possible to support up to 1GB of DRAM on this platform.




Naren Sankar
Broadcom Corporation | (O) +886 (2) 2656 5004 | (M) +886 (9) 7535 5267

          



> -----Original Message-----
> From: linux-rpi-kernel-bounces at lists.infradead.org [mailto:linux-rpi-kernel-
> bounces at lists.infradead.org] On Behalf Of Stephen Warren
> Sent: Wednesday, July 04, 2012 10:03 AM
> To: albert.u.boot at aribaud.net
> Cc: u-boot at lists.denx.de; linux-rpi-kernel at lists.infradead.org
> Subject: [PATCH 08/12] ARM: rpi_b: drop RAM size to 128M
> 
> The board really has 256M. However, the VC (VideoCore co-processor)
> shares
> the RAM, and uses a configurable portion at the top. We tell U-Boot that a
> smaller amount of RAM is present in order to avoid stomping on the area
> the VC uses.
> 
> Extracted from work by Oleksandr Tymoshenko <gonzo at bluezbox.com>.
> 
> Signed-off-by: Stephen Warren <swarren at wwwdotorg.org>
> ---
>  board/raspberrypi/rpi_b/rpi_b.c |    2 +-
>  include/configs/rpi_b.h         |    7 +++++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/board/raspberrypi/rpi_b/rpi_b.c
> b/board/raspberrypi/rpi_b/rpi_b.c
> index 26df74b..688b0aa 100644
> --- a/board/raspberrypi/rpi_b/rpi_b.c
> +++ b/board/raspberrypi/rpi_b/rpi_b.c
> @@ -21,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR;
> 
>  int dram_init(void)
>  {
> -	gd->ram_size = SZ_256M;
> +	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
> 
>  	return 0;
>  }
> diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h
> index b9595f9..9f74731 100644
> --- a/include/configs/rpi_b.h
> +++ b/include/configs/rpi_b.h
> @@ -36,6 +36,13 @@
>  #define CONFIG_NR_DRAM_BANKS		1
>  #define CONFIG_SYS_TEXT_BASE		0x00008000
>  #define CONFIG_SYS_SDRAM_BASE		0x00000000
> +/*
> + * The board really has 256M. However, the VC (VideoCore co-processor)
> shares
> + * the RAM, and uses a configurable portion at the top. We tell U-Boot that
> a
> + * smaller amount of RAM is present in order to avoid stomping on the area
> + * the VC uses.
> + */
> +#define CONFIG_SYS_SDRAM_SIZE		SZ_128M
>  #define CONFIG_SYS_UBOOT_BASE		CONFIG_SYS_TEXT_BASE
>  #define CONFIG_SYS_INIT_RAM_SIZE	SZ_4K
>  #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE
> + \
> --
> 1.7.9.5
> 
> 
> _______________________________________________
> linux-rpi-kernel mailing list
> linux-rpi-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel





More information about the linux-rpi-kernel mailing list