Add mainboard hook to bootblock

Change allows to override default bootblock_mainboard_init() with
mainboard-specific code.

If the default bootblock_mainboard_init() handler is replaced, with
one from file BOOTBLOCK_MAINBOARD_INIT, one needs to take care the
replacement calls all the necessary bootblock_x_init() functions.

Change-Id: Ie8c667cdba7cafe9ed2d4b19ab2bd21d941ad4ca
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/1845
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2012-11-14 08:08:50 +02:00 committed by Stefan Reinauer
parent f90224845d
commit 48e21ec430
2 changed files with 7 additions and 0 deletions

View File

@ -70,6 +70,9 @@ config PC80_SYSTEM
bool
default y
config BOOTBLOCK_MAINBOARD_INIT
string
config BOOTBLOCK_NORTHBRIDGE_INIT
string

View File

@ -11,6 +11,9 @@
#include CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT
#endif
#ifdef CONFIG_BOOTBLOCK_MAINBOARD_INIT
#include CONFIG_BOOTBLOCK_MAINBOARD_INIT
#else
static void bootblock_mainboard_init(void)
{
#ifdef CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT
@ -23,6 +26,7 @@ static void bootblock_mainboard_init(void)
bootblock_cpu_init();
#endif
}
#endif
#if CONFIG_USE_OPTION_TABLE
#include <pc80/mc146818rtc.h>