Re: Configure RAM size on iMX53 board

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Nov 03, 2016 at 09:30:03PM +0100, Jose Luis Zabalza wrote:
> Hello everybody
> 
> I have two iMX53 custom boards. They are the same board but 512MB vs
> 1GB RAM version.  Both boards are working with the same Uboot binary
> but I would like use Barebox.
> 
> I have to be able to run Barebox on 1GB version but the same Barebox
> binary don't work on 512MB version.
> 
> I use imx-usb-loader to put Barebox on the board. On 1GB version
> Barebox are working OK and load Linux kernel successfully. On 512MB
> Barebox are loaded successfully but don't work. lsusb tell me the
> board is working on Serial Download mode yet. No message is printed on
> the console.
> 
> Do I have to set Barebox for work with different RAM size?

Just like Andrey already said, barebox detects the RAM size by reading
back the values from the SDRAM controller to determine its memory
layout, so the configured values must be correct. In your case they can
only be correct for the 1GB version.

What you can do in this case is:

- in your boards lowlevel.c detect your actual RAM size by testing for
  mirrors in the SDRAM Address space.
- Instead of imx53_barebox_entry() call barebox_arm_entry() with the
  actual RAM size.

This should already bring you through the lowlevel setup succesfully.

Then in your board file add this:

#include <mach/esdctl.h>

static int myboard_init(void)
{
	imx_esdctl_disable();

	arm_add_mem_device("ram0", MX53_CSD0_BASE_ADDR, size);

	return 0;
}
core_initcall(myboard_init);

Note you can't use a variable to safe the calculated SDRAM size from
lowlevel.c to your board file. It's probably best to do the same test
again.

Sascha

-- 
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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux