From a512e117b0a550e8d8c8a13e74ebbf971614ebee Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 25 Nov 2014 12:55:20 -0800 Subject: arm: Redesign mainboard and SoC hooks for bootblock This patch makes some slight changes to the way bootblock_cpu_init() and bootblock_mainboard_init() are used on ARM. Experience has shown that nearly every board needs either one or both of these hooks, so having explicit Kconfigs for them has become unwieldy. Instead, this patch implements them as a weak symbol that can be overridden by mainboard/SoC code, as the more recent arm64_soc_init() is also doing. Since the whole concept of a single "CPU" on ARM systems has kinda died out, rename bootblock_cpu_init() to bootblock_soc_init(). (This had already been done on Storm/ipq806x, which is now adjusted to directly use the generic hook.) Also add a proper license header to bootblock_common.h that was somehow missing. Leaving non-ARM32 architectures out for now, since they are still using the really old and weird x86 model of directly including a file. These architectures should also eventually be aligned with the cleaner ARM32 model as they mature. [pg: this was already partly upstreamed. These are the remains. Further cleanup is necessary and on the short-term TODO, but beyond the scope of this commit] BRANCH=None BUG=chrome-os-partner:32123 TEST=Booted on Pinky. Compiled for Storm and confirmed in the disassembly that bootblock_soc_init() is still compiled in and called right before the (now no-op) bootblock_mainboard_init(). Change-Id: Idf655894c4fec8fce7d3348d3b3e43b1613b35db Signed-off-by: Patrick Georgi Original-Commit-Id: 257aaee9e3aeeffe50ed54de7342dd2bc9baae76 Original-Change-Id: I57013b99c3af455cc3d7e78f344888d27ffb8d79 Original-Signed-off-by: Julius Werner Original-Reviewed-on: https://chromium-review.googlesource.com/231940 Original-Reviewed-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/9602 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/Kconfig | 8 -------- src/soc/rockchip/rk3288/bootblock.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'src') diff --git a/src/Kconfig b/src/Kconfig index 569e404224..377f7cfa1b 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -291,14 +291,6 @@ source "src/drivers/intel/fsp/Kconfig" endmenu -config CPU_HAS_BOOTBLOCK_INIT - bool - default n - -config MAINBOARD_HAS_BOOTBLOCK_INIT - bool - default n - source "src/device/Kconfig" menu "Generic Drivers" diff --git a/src/soc/rockchip/rk3288/bootblock.c b/src/soc/rockchip/rk3288/bootblock.c index 6dde1cb943..84a17c2e22 100644 --- a/src/soc/rockchip/rk3288/bootblock.c +++ b/src/soc/rockchip/rk3288/bootblock.c @@ -27,7 +27,7 @@ #include #include -static void bootblock_cpu_init(void) +static void bootblock_soc_init(void) { rk3288_init_timer(); -- cgit v1.2.3