mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox mailing list <barebox@lists.infradead.org>
Cc: Sascha Hauer <sha@pengutronix.de>
Subject: mx35-3stack 124MiByte RAM
Date: Fri, 27 Jan 2012 13:35:29 +0100	[thread overview]
Message-ID: <4F229A11.8020102@pengutronix.de> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2569 bytes --]

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@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@pengutronix.de>
>     Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@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   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2012-01-27 12:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 12:35 Marc Kleine-Budde [this message]
2012-01-27 12:38 ` Sascha Hauer
2012-01-27 12:39   ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F229A11.8020102@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox