mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* mx35-3stack 124MiByte RAM
@ 2012-01-27 12:35 Marc Kleine-Budde
  2012-01-27 12:38 ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Kleine-Budde @ 2012-01-27 12:35 UTC (permalink / raw)
  To: barebox mailing list; +Cc: Sascha Hauer


[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mx35-3stack 124MiByte RAM
  2012-01-27 12:35 mx35-3stack 124MiByte RAM Marc Kleine-Budde
@ 2012-01-27 12:38 ` Sascha Hauer
  2012-01-27 12:39   ` Marc Kleine-Budde
  0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2012-01-27 12:38 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox mailing list

On Fri, Jan 27, 2012 at 01:35:29PM +0100, Marc Kleine-Budde wrote:
> >  
> > -	register_device(&sdram_dev);
> > +	sdram_dev = add_mem_device("ram0", IMX_SDRAM_CS0, 124 * 1024 * 1024,
>                                                           ^^^
> 
> What happened to the upper 4 MiByte?

This was changed in a unrelated patch. Probably a type. This is fixed in
-next since:

commit fc3a2cdcabbbd57c5b1aa018368efd1905256dc1
Author: Roman Fietze <roman.fietze@telemotive.de>
Date:   Wed Apr 27 10:38:46 2011 +0200

    ARM i.MX freescale-mx35-3-stack: support 256 MiB RAM
    
    Extend DCD table and low level init routines. Add barebox SDRAM
    device. Also, fix the memory size for bank 0 to 128MB. It was
    accidently changed to 124MB here:
    
    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: Roman Fietze <roman.fietze@telemotive.de>
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mx35-3stack 124MiByte RAM
  2012-01-27 12:38 ` Sascha Hauer
@ 2012-01-27 12:39   ` Marc Kleine-Budde
  0 siblings, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2012-01-27 12:39 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox mailing list


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

On 01/27/2012 01:38 PM, Sascha Hauer wrote:
> On Fri, Jan 27, 2012 at 01:35:29PM +0100, Marc Kleine-Budde wrote:
>>>  
>>> -	register_device(&sdram_dev);
>>> +	sdram_dev = add_mem_device("ram0", IMX_SDRAM_CS0, 124 * 1024 * 1024,
>>                                                           ^^^
>>
>> What happened to the upper 4 MiByte?
> 
> This was changed in a unrelated patch. Probably a type. This is fixed in
> -next since:

Thanks...

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-27 12:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-27 12:35 mx35-3stack 124MiByte RAM Marc Kleine-Budde
2012-01-27 12:38 ` Sascha Hauer
2012-01-27 12:39   ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox