coreboot-kgpe-d16/src/soc/rockchip/rk3288
Julius Werner 44cf870cb0 timer: Reestablish init_timer(), consolidate timer initialization calls
We have known for a while that the old x86 model of calling init_timer()
in ramstage doesn't make sense on other archs (and is questionable in
general), and finally removed it with CL:219719. However, now timer
initialization is completely buried in the platform code, and it's hard
to ensure it is done in time to set up timestamps. For three out of four
non-x86 SoC vendors we have brought up for now, the timers need some
kind of SoC-specific initialization.

This patch reintroduces init_timer() as a weak function that can be
overridden by platform code. The call in ramstage is restricted to x86
(and should probably eventually be removed from there as well), and
other archs should call them at the earliest reasonable point in their
bootblock. (Only changing arm for now since arm64 and mips bootblocks
are still in very early state and should sync up to features in arm once
their requirements are better understood.) This allows us to move
timestamp_init() into arch code, so that we can rely on timestamps
being available at a well-defined point and initialize our base value as
early as possible. (Platforms who know that their timers start at zero
can still safely call timestamp_init(0) again from platform code.)

BRANCH=None
BUG=None
TEST=Booted Pinky, Blaze and Storm, compiled Daisy and Pit.

Change-Id: I1b064ba3831c0c5b7965b1d88a6f4a590789c891
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ffaebcd3785c4ce998ac1536e9fdd46ce3f52bfa
Original-Change-Id: Iece1614b7442d4fa9ca981010e1c8497bdea308d
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/234062
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9606
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-04-14 09:03:28 +02:00
..
include/soc timer: Reestablish init_timer(), consolidate timer initialization calls 2015-04-14 09:03:28 +02:00
bootblock.c timer: Reestablish init_timer(), consolidate timer initialization calls 2015-04-14 09:03:28 +02:00
cbmem.c rk3288: Change all SoC headers to <soc/headername.h> system 2015-04-08 09:28:50 +02:00
chip.h rockchip: support display 2015-04-10 20:50:53 +02:00
clock.c rk3288: reset edp after edp clock source select 2015-04-10 20:51:18 +02:00
display.c rockchip: support display 2015-04-10 20:50:53 +02:00
edp.c rk3288: reset edp after edp clock source select 2015-04-10 20:51:18 +02:00
gpio.c gpio: Extend common GPIO header, simplify function names 2015-04-10 11:57:33 +02:00
i2c.c rk3288: Change all SoC headers to <soc/headername.h> system 2015-04-08 09:28:50 +02:00
Kconfig CBFS: Automate ROM image layout and remove hardcoded offsets 2015-04-14 09:01:27 +02:00
Makefile.inc rk3288/exynos5250/exynos5420: Consolidate timer files 2015-04-13 17:42:07 +02:00
media.c rk3288: Change all SoC headers to <soc/headername.h> system 2015-04-08 09:28:50 +02:00
pwm.c rk3288: Change all SoC headers to <soc/headername.h> system 2015-04-08 09:28:50 +02:00
rk808.c veyron: Change VCC10_LCD_PWREN_H to allowed maximum of 2.5V 2015-04-10 20:50:01 +02:00
sdram.c rk3288: Increase the delay after DDR reset de-assert to 10us. 2015-04-13 16:57:51 +02:00
soc.c rockchip: support display 2015-04-10 20:50:53 +02:00
spi.c rk3288: Change all SoC headers to <soc/headername.h> system 2015-04-08 09:28:50 +02:00
timer.c timer: Reestablish init_timer(), consolidate timer initialization calls 2015-04-14 09:03:28 +02:00
tsadc.c rk3288: don't log LAST_TSHUT bit 2015-04-10 11:59:15 +02:00
uart.c rk3288: Change all SoC headers to <soc/headername.h> system 2015-04-08 09:28:50 +02:00
vop.c rockchip: support display 2015-04-10 20:50:53 +02:00