From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TtGCM-00055U-61 for barebox@lists.infradead.org; Thu, 10 Jan 2013 11:21:27 +0000 From: Juergen Beisert Date: Thu, 10 Jan 2013 12:20:42 +0100 References: <1974332.EjF16fPj1U@yiqingliang-pc> <201301101100.54062.jbe@pengutronix.de> <2434156.f1v0Lr0KEV@yiqingliang-pc> In-Reply-To: <2434156.f1v0Lr0KEV@yiqingliang-pc> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201301101220.42878.jbe@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: about s3c2442 To: barebox@lists.infradead.org Hi Yi, Yi Qingliang wrote: > On Thursday, January 10, 2013 11:00:53 AM Juergen Beisert wrote: > > Yi Qingliang wrote: > > > On Thursday, January 10, 2013 10:14:07 AM Juergen Beisert wrote: > > > > Yi Qingliang wrote: > > > > > On Thursday, January 10, 2013 09:36:36 AM Juergen Beisert wrote: > > > > > > 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 > > > > > > I found it, > > > but: > > > md 0x48000028 > > > 48000028: 000000b2 (represents is 128) > > > it looks like the lowlevel_init is not executed, what's the problem. > > > > Is the symbol "CONFIG_MACH_DO_LOWLEVEL_INIT" enabled in your config? > > enabled already, but when loaded in sdram, the barebox skipped the sdram > init code. am i right? Yes, you are right. It must skip the initialization, because the code itself runs already from SDRAM. When you would stop the SDRAM controller in this case it would crash your machine. You must ensure your routines can detect the case where they already run from the SDRAM area (I do not know the details how the S3C2440 and S34C2443 differ). Regards, Juergen -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox