[U-Boot] SPL: branching out of start.S

jonsmirl at gmail.com jonsmirl at gmail.com
Wed Nov 23 13:40:24 CET 2011


On Wed, Nov 23, 2011 at 7:13 AM, Marek Vasut <marek.vasut at gmail.com> wrote:
>> Is it possible to merge things further and get rid of this special case?

I'd rather stick with the common code and not proliferate start.S
versions. The main bug right now is that r9 is not zero'd for the SPL
case causing a random offset to be added.

But more consolidation is possible:

	ldr	r0, _board_init_r_ofs	ldr	r1, _TEXT_BASE	add	lr, r0, r1	add	lr,
lr, r9	/* setup parameters for board_init_r */	mov	r0, r5		/* gd_t
*/	mov	r1, r6		/* dest_addr */	/* jump to it ... */	mov	pc, lr
_board_init_r_ofs:#ifdef CONFIG_NAND_SPL
	.word nand_boot - _start
#else
	.word board_init_r - _start#endif

Even more if nand_boot is wrapped and renamed board_init_r().

-- 
Jon Smirl
jonsmirl at gmail.com


More information about the U-Boot mailing list