From 4913cb78d2e8a37e80128fbd82466d1825dba413 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 4 Dec 2014 14:57:52 -0800 Subject: [PATCH] storm: Fix timer init order problem Commit 257aaee9e3a (arm: Add bootblock_mainboard_early_init() for pre-console initialization) inadvertently moved the timer initialization after console initialization for IPQ806x, which is apparently not a good idea for this platform. This patch solves the issue by moving init_timer() to bootblock_mainboard_early_init(), which is the new hook explicitly provided to perform pre-console tasks. BRANCH=None BUG=None TEST=Built and booted Storm with 257aaee9e reverted. Noticed that it was already broken. Bisected coreboot and tracked down breakage to commit a126a62f (ipq8064: use the new utility to build bootblock). Built and booted successfully with this patch and a revert of a126a62f to confirm that the bug in question here is fixed. Change-Id: I4a3faa2aec8ff1fbbe6c389f1d048475aa944418 Signed-off-by: Stefan Reinauer Original-Commit-Id: 752d1f879f9bd841f18bd84842491f747458cf52 Original-Change-Id: Ie4aa2d06cb6fda6d5ff8dd5ea052257fb7b8a24b Original-Signed-off-by: Julius Werner Original-Reviewed-on: https://chromium-review.googlesource.com/233290 Original-Reviewed-by: Aaron Durbin Original-Reviewed-by: Vadim Bendebury Reviewed-on: http://review.coreboot.org/9574 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/mainboard/google/storm/Makefile.inc | 1 + .../qualcomm/ipq806x => mainboard/google/storm}/bootblock.c | 2 +- src/soc/qualcomm/ipq806x/Makefile.inc | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) rename src/{soc/qualcomm/ipq806x => mainboard/google/storm}/bootblock.c (95%) diff --git a/src/mainboard/google/storm/Makefile.inc b/src/mainboard/google/storm/Makefile.inc index 5add3b3e56..453caae143 100644 --- a/src/mainboard/google/storm/Makefile.inc +++ b/src/mainboard/google/storm/Makefile.inc @@ -17,6 +17,7 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +bootblock-y += bootblock.c bootblock-y += cdp.c bootblock-y += reset.c diff --git a/src/soc/qualcomm/ipq806x/bootblock.c b/src/mainboard/google/storm/bootblock.c similarity index 95% rename from src/soc/qualcomm/ipq806x/bootblock.c rename to src/mainboard/google/storm/bootblock.c index a079d42922..fc9f8f39dd 100644 --- a/src/soc/qualcomm/ipq806x/bootblock.c +++ b/src/mainboard/google/storm/bootblock.c @@ -20,7 +20,7 @@ #include #include -void bootblock_soc_init(void) +void bootblock_mainboard_early_init(void) { init_timer(); } diff --git a/src/soc/qualcomm/ipq806x/Makefile.inc b/src/soc/qualcomm/ipq806x/Makefile.inc index 5dfca4d7ad..6d3f8665d1 100644 --- a/src/soc/qualcomm/ipq806x/Makefile.inc +++ b/src/soc/qualcomm/ipq806x/Makefile.inc @@ -17,7 +17,6 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -bootblock-y += bootblock.c bootblock-y += clock.c bootblock-y += gpio.c bootblock-$(CONFIG_SPI_FLASH) += spi.c