about s3c2442

Juergen Beisert jbe at pengutronix.de
Thu Jan 10 03:36:36 EST 2013

Hi Yi,

Yi Qingliang wrote:
> 	I'm using barebox (based on mini2440) on my s3c2442 board,
> 1. flash barebox into nand: can't start normally, but can see early output
> on serial.
> 2. load it in sdram: can start normally into shell, and then I use it to
> boot kernel (also in sdram, also based on mini2440).
> the kernel hang, no output.
> after dig into it, I found something: add "mem=64M" into the kernel
> paramer, then the kernel can start.
> BUT:
> the barebox doesn't pass that paramert to kernel for mini2440,
> why the mini2440 kernel can start normally?
> how does the kernel on 2440 get the sdram size?

There is no autodetection possible. Take a look into 
the "arch/arm/boards/friendlyarm-mini2440/lowlevel_init.S": This is the code 
which runs immediately after reset. It calls the 
function "s3c24x0_sdram_init" from the generic part, and uses hard coded 
values from "arch/arm/boards/friendlyarm-mini2440/config.h" to setup the 
SDRAM controller according to the attached SDRAM type.
When the SDRAM is up and running, it is very easy to read back the SDRAM size 
from the SDRAM controller's registers (which is done in the 
function "s3c24xx_get_memory_size").

So you need routines which do the same job for your S3C2442 CPU.


Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

More information about the barebox mailing list