Message ID | 4EBA6F81.2060400@denx.de |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Hello Heiko, On Wed, Nov 9, 2011 at 1:18 PM, Heiko Schocher <hs@denx.de> wrote: > Christian Riesch wrote: >> 332 lpsc_on(DAVINCI_LPSC_UART2); >> 333 NS16550_init((NS16550_t)(CONFIG_SYS_NS16550_COM1), >> 334 CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE); >> 335 >> 336 /* >> 337 * Fix Power and Emulation Management Register >> 338 * see sprufw3a.pdf page 37 Table 24 >> 339 */ >> 340 writel(readl((CONFIG_SYS_NS16550_COM1 + 0x30)) | 0x00006001, >> 341 (CONFIG_SYS_NS16550_COM1 + 0x30)); >> >> I guess this is only needed for debugging the SPL? > > This must be done before using the uart as a console, and I think > this should be done in common code as early as possible. Yes, but it will also be done later in serial_init() called from board_init_f(), right? So this is only a hack to allow debug messages at this stage before it is done properly in serial_init(). Am I missing something here? Regards, Christian
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index 339c5ed..73ceb30 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -353,7 +353,6 @@ _dynsym_start_ofs: * ************************************************************************* */ -#ifndef CONFIG_SKIP_LOWLEVEL_INIT cpu_init_crit: /* * flush v4 I/D caches @@ -372,14 +371,15 @@ cpu_init_crit: orr r0, r0, #0x00001000 /* set bit 12 (I) I-Cache */ mcr p15, 0, r0, c1, c0, 0 +#ifndef CONFIG_SKIP_LOWLEVEL_INIT /* * Go setup Memory and board specific bits prior to relocation. */ mov ip, lr /* perserve link reg across call */ bl lowlevel_init /* go setup pll,mux,memory */ mov lr, ip /* restore link */ - mov pc, lr /* back to my caller */ #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ + mov pc, lr /* back to my caller */ #ifndef CONFIG_SPL_BUILD /*