mx35-3stack 124MiByte RAM

Marc Kleine-Budde mkl at pengutronix.de
Fri Jan 27 07:35:29 EST 2012


Hello,

I just stumbled over this patch:

git show f928efa8 arch/arm/boards/freescale-mx35-3-stack/3stack.c
> commit f928efa818adfe56a08350569a9b0f3c2fb791d2
> Author: Sascha Hauer <s.hauer at pengutronix.de>
> Date:   Tue Jul 19 09:58:32 2011 +0200
> 
>     add a add_mem_device function
>     
>     Add a helper function for boards to register their memory
>     devices. This makes the board code smaller and also helps
>     getting rid of map_base and struct memory_platform_data.
>     
>     And switch all of the memory to it
>     
>     Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
>     Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> 
> diff --git a/arch/arm/boards/freescale-mx35-3-stack/3stack.c b/arch/arm/boards/freescale-mx35-3-stack/3stack.c
> index 0c54337..b3a03cc 100644
> --- a/arch/arm/boards/freescale-mx35-3-stack/3stack.c
> +++ b/arch/arm/boards/freescale-mx35-3-stack/3stack.c
> @@ -71,19 +71,6 @@ static struct fec_platform_data fec_info = {
>  	.phy_addr	= 0x1F,
>  };
>  
> -static struct memory_platform_data sdram_pdata = {
> -	.name	= "ram0",
> -	.flags	= IORESOURCE_MEM_WRITEABLE,
> -};
> -
> -static struct device_d sdram_dev = {
> -	.id		= -1,
> -	.name		= "mem",
> -	.map_base	= IMX_SDRAM_CS0,
> -	.size		= 128 * 1024 * 1024,
                          ^^^
> -	.platform_data	= &sdram_pdata,
> -};
> -
>  struct imx_nand_platform_data nand_info = {
>  	.hw_ecc		= 1,
>  	.flash_bbt	= 1,
> @@ -165,6 +152,7 @@ static void set_board_rev(int rev)
>  static int f3s_devices_init(void)
>  {
>  	uint32_t reg;
> +	struct device_d *sdram_dev;
>  
>  	/* CS0: Nor Flash */
>  	writel(0x0000cf03, CSCR_U(0));
> @@ -209,10 +197,11 @@ static int f3s_devices_init(void)
>  
>  	imx35_add_mmc0(NULL);
>  
> -	register_device(&sdram_dev);
> +	sdram_dev = add_mem_device("ram0", IMX_SDRAM_CS0, 124 * 1024 * 1024,
                                                          ^^^

What happened to the upper 4 MiByte?

> +				   IORESOURCE_MEM_WRITEABLE);
> +	armlinux_add_dram(sdram_dev);
>  	imx35_add_fb(&ipu_fb_data);
>  
> -	armlinux_add_dram(&sdram_dev);
>  	armlinux_set_bootparams((void *)0x80000100);
>  	armlinux_set_architecture(MACH_TYPE_MX35_3DS);
>  

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20120127/647c1e68/attachment-0001.sig>


More information about the barebox mailing list