am33xx: Rework #ifdef's around s_init for clarity
The s_init function is only called on SPL or XIP cases, so lets only build it for them. This makes the #if logic within the function a bit clearer as to when we are or are not calling things, and makes it easier to see that for example preloader_console_init isn't ever called in the non-XIP full U-Boot case. Signed-off-by: Tom Rini <trini@ti.com>
This commit is contained in:
parent
8ee950dd27
commit
d73f38f7ba
|
@ -202,6 +202,7 @@ static void watchdog_disable(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
|
||||||
void s_init(void)
|
void s_init(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -220,22 +221,19 @@ void s_init(void)
|
||||||
#ifdef CONFIG_SPL_BUILD
|
#ifdef CONFIG_SPL_BUILD
|
||||||
save_omap_boot_params();
|
save_omap_boot_params();
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
|
|
||||||
watchdog_disable();
|
watchdog_disable();
|
||||||
timer_init();
|
timer_init();
|
||||||
set_uart_mux_conf();
|
set_uart_mux_conf();
|
||||||
setup_clocks_for_console();
|
setup_clocks_for_console();
|
||||||
uart_soft_reset();
|
uart_soft_reset();
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_NOR_BOOT
|
#ifdef CONFIG_NOR_BOOT
|
||||||
gd->baudrate = CONFIG_BAUDRATE;
|
gd->baudrate = CONFIG_BAUDRATE;
|
||||||
serial_init();
|
serial_init();
|
||||||
gd->have_console = 1;
|
gd->have_console = 1;
|
||||||
#else
|
#elif defined(CONFIG_SPL_BUILD)
|
||||||
gd = &gdata;
|
gd = &gdata;
|
||||||
preloader_console_init();
|
preloader_console_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
|
|
||||||
prcm_init();
|
prcm_init();
|
||||||
set_mux_conf_regs();
|
set_mux_conf_regs();
|
||||||
#if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
|
#if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
|
||||||
|
@ -243,8 +241,8 @@ void s_init(void)
|
||||||
rtc32k_enable();
|
rtc32k_enable();
|
||||||
#endif
|
#endif
|
||||||
sdram_init();
|
sdram_init();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SYS_DCACHE_OFF
|
#ifndef CONFIG_SYS_DCACHE_OFF
|
||||||
void enable_caches(void)
|
void enable_caches(void)
|
||||||
|
|
Loading…
Reference in New Issue