diff options
author | Hung-Te Lin <hungte@chromium.org> | 2013-02-07 21:38:41 +0800 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-02-08 03:24:53 +0100 |
commit | 87d6550c1f2a902592be6604921a7f557c264168 (patch) | |
tree | a5d8b84cc425a10d0a56242eb94a5334b44e3dce /src/mainboard/google/snow/romstage.c | |
parent | b868d40830787ba5a92721d131c38165285b7795 (diff) |
armv7/snow: Move clock initialization from bootblock to romstage.
Exynos system clock can be initialized before RAM init, not necessary to be in
the very beginning (boot block). This helps reducing bootblock dependency.
Verified to boot on armv7/snow.
Note: this patch was originally introduced in 2308, but there were
some ordering issues so it was reverted.
Change-Id: Ibc91c0e26ea8881751fc088754f5c6161d011b68
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/2320
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/google/snow/romstage.c')
-rw-r--r-- | src/mainboard/google/snow/romstage.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c index b8e5116b22..c0bb6f4be0 100644 --- a/src/mainboard/google/snow/romstage.c +++ b/src/mainboard/google/snow/romstage.c @@ -26,6 +26,7 @@ #include <cpu/samsung/exynos5250/dmc.h> #include <cpu/samsung/exynos5250/setup.h> +#include <cpu/samsung/exynos5250/clock_init.h> #include <console/console.h> #include <arch/stages.h> @@ -48,13 +49,19 @@ static int board_wakeup_permitted(void) void main(void) { struct mem_timings *mem; + struct arm_clk_ratios *arm_ratios; int ret; void *entry; + /* Clock must be initialized before console_init, otherwise you may need + * to re-initialize serial console drivers again. */ + mem = get_mem_timings(); + arm_ratios = get_arm_clk_ratios(); + system_clock_init(mem, arm_ratios); + console_init(); printk(BIOS_INFO, "hello from romstage\n"); - mem = get_mem_timings(); if (!mem) { printk(BIOS_CRIT, "Unable to auto-detect memory timings\n"); while(1); |