[U-Boot] [PATCH] Reduce OneNAND IPL common code (v3)

Scott Wood scottwood at freescale.com
Wed Mar 4 00:12:15 CET 2009


On Tue, Mar 03, 2009 at 09:05:53AM +0900, Kyungmin Park wrote:
> OneNAND IPL has common codes for RAM init, load data, and jump to 2nd
> bootloader, but it's common code used about 300~400 bytes. So board
> specific codes, such as lowlevel_init, can't has enough code. It make
> a difficult to implement OneNAND IPL.
> 
> his patch make this common code as small as possible. and give
> lowlevel_init can have more codes.
> 
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>

Applied generic bits to u-boot-nand-flash/next (minus the complete
removal of hang(), which is pending the ARM change).  The ARM part should
go through the ARM maintainer, and I still think you can have the
exceptions hang with a branch-to-self without needing external code;
something like this (apologies if it's been too long since I've done ARM
ASM):

_start:
	b	reset
#ifdef CONFIG_ONENAND_IPL
	sub	pc, pc, #4
	sub	pc, pc, #4
	sub	pc, pc, #4
	sub	pc, pc, #4
	sub	pc, pc, #4
	sub	pc, pc, #4
	sub	pc, pc, #4

	. = _start + 64
#else
	...
#endif

This would make it easier to see what happened with a JTAG, and prevent
any possibility of it getting stuck in a loop that keeps banging on the
flash chip.

-Scott


More information about the U-Boot mailing list