From eb5e252ce16acd80e5374a351d49e9d90cfed982 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Thu, 10 Jan 2013 15:05:22 -0800 Subject: [PATCH] exynos5250: Hacked up lowlevel_init_c This is the first lowlevel init routine that gets called in romstage. It's fugly and needs a lot of clean-up, but does the job for now. Change-Id: Id54bf4f1c3753bcbed5f6b5eeb4b48bc3b41ce93 Signed-off-by: David Hendricks Reviewed-on: http://review.coreboot.org/2133 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/cpu/samsung/exynos5250/lowlevel_init_c.c | 27 ++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/cpu/samsung/exynos5250/lowlevel_init_c.c b/src/cpu/samsung/exynos5250/lowlevel_init_c.c index 2215fb7a95..848ebee4a8 100644 --- a/src/cpu/samsung/exynos5250/lowlevel_init_c.c +++ b/src/cpu/samsung/exynos5250/lowlevel_init_c.c @@ -36,6 +36,7 @@ #include #include "setup.h" +#include void do_barriers(void); /* FIXME: make gcc shut up about "no previous prototype" */ @@ -70,14 +71,15 @@ enum { int lowlevel_init_subsystems(void) { - uint32_t reset_status; +// uint32_t reset_status; int actions = 0; - do_barriers(); +// do_barriers(); /* Setup cpu info which is needed to select correct register offsets */ cpu_info_init(); +#if 0 reset_status = power_read_reset_status(); switch (reset_status) { @@ -91,24 +93,28 @@ int lowlevel_init_subsystems(void) /* This is a normal boot (not a wake from sleep) */ actions = DO_UART | DO_CLOCKS | DO_POWER; } +#endif + actions = DO_UART | DO_CLOCKS | DO_POWER; if (actions & DO_POWER) power_init(); if (actions & DO_CLOCKS) system_clock_init(); if (actions & DO_UART) { + /* Set up serial UART so we can printf() */ -// exynos_pinmux_config(EXYNOS_UART, PINMUX_FLAG_NONE); /* FIXME(dhendrix): add a function for mapping CONFIG_CONSOLE_SERIAL_UART_ADDRESS to PERIPH_ID_UARTn */ +// exynos_pinmux_config(EXYNOS_UART, PINMUX_FLAG_NONE); exynos_pinmux_config(PERIPH_ID_UART3, PINMUX_FLAG_NONE); - /* FIXME(dhendrix): serial_init() does not seem to - actually do anything !?!? */ -// serial_init(); - init_timer(); /* FIXME(dhendrix): was timer_init() */ - } -/* FIXME(dhendrix): place this somewhere for ramstage... */ + console_init(); + while (1) { + console_tx_byte('C'); + } + } + init_timer(); /* FIXME(dhendrix): was timer_init() */ + #if 0 if (actions & DO_CLOCKS) { mem_ctrl_init(); @@ -116,5 +122,6 @@ int lowlevel_init_subsystems(void) } #endif - return actions & DO_WAKEUP; +// return actions & DO_WAKEUP; + return 0; }