David Hendricks (dhendrix@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2319
-gerrit
commit cb2c6f7f27fc0d47bc6e5cb847c9ae7f63f6b689 Author: David Hendricks dhendrix@chromium.org Date: Fri Feb 8 01:25:04 2013 +0100
Revert "armv7/snow: Move clock initialization from bootblock to romstage."
This reverts commit 9029f4b63f6d0e29bf1608e666cdb025de45ca24
This patch needs to go at the end of the UART patch set. Sorry 'bout the confusion!
Change-Id: I5702c7d6130daf95776f2c15d24e5d253691cefd --- src/mainboard/google/snow/Makefile.inc | 4 ++++ src/mainboard/google/snow/bootblock.c | 11 ++++++++++- src/mainboard/google/snow/romstage.c | 9 +-------- 3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/mainboard/google/snow/Makefile.inc b/src/mainboard/google/snow/Makefile.inc index b56a1a4..04bf543 100644 --- a/src/mainboard/google/snow/Makefile.inc +++ b/src/mainboard/google/snow/Makefile.inc @@ -17,6 +17,10 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ##
+# needed for system_clock_init() +bootblock-y += mainboard.c +bootblock-y += memory.c + romstage-y += mainboard.c romstage-y += memory.c romstage-y += romstage.c diff --git a/src/mainboard/google/snow/bootblock.c b/src/mainboard/google/snow/bootblock.c index 18306cc..bcfe440 100644 --- a/src/mainboard/google/snow/bootblock.c +++ b/src/mainboard/google/snow/bootblock.c @@ -23,14 +23,23 @@ #include <cbfs.h> #include <uart.h> #include <console/console.h> +#include <cpu/samsung/exynos5250/clk.h> +#include <cpu/samsung/exynos5250/dmc.h> #include <cpu/samsung/exynos5250/periph.h> -#include <cpu/samsung/exynos5250/pinmux.h> +#include <cpu/samsung/exynos5250/clock_init.h>
#endif
void bootblock_mainboard_init(void); void bootblock_mainboard_init(void) { + struct mem_timings *mem; + struct arm_clk_ratios *arm_ratios; + + mem = get_mem_timings(); + arm_ratios = get_arm_clk_ratios(); + system_clock_init(mem, arm_ratios); + #if CONFIG_EARLY_SERIAL_CONSOLE exynos_pinmux_config(PERIPH_ID_UART3, PINMUX_FLAG_NONE); uart_init(); diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c index c0bb6f4..b8e5116 100644 --- a/src/mainboard/google/snow/romstage.c +++ b/src/mainboard/google/snow/romstage.c @@ -26,7 +26,6 @@
#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> @@ -49,19 +48,13 @@ 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);