sb/intel/bd82x6x: Make the pch_enable_lpc hook optional

This also changes the name to mainboard_pch_lpc_setup to better
reflect that it is an optional mainboard hook.

This adds an empty weakly linked default. The rationale behind this
change is that without an implementation of the hook some features
might not work but that the result is likely still able to boot, so it
can be made optional.

Change-Id: Ie8e6056b4c4aed3739d2d12b4224de36fe217189
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36782
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Arthur Heymans
2019-11-12 17:21:08 +01:00
committed by Patrick Georgi
parent 9c538348d8
commit 2b28a16061
47 changed files with 31 additions and 109 deletions

View File

@@ -286,12 +286,16 @@ static void pch_enable_lpc_decode(void)
pci_write_config32(PCH_LPC_DEV, LPC_GEN4_DEC, config->gen4_dec);
}
__weak void mainboard_pch_lpc_setup(void)
{
}
void early_pch_init(void)
{
pch_enable_lpc_decode();
pch_enable_lpc();
mainboard_pch_lpc_setup();
pch_enable_bars();

View File

@@ -75,6 +75,9 @@ void southbridge_rcba_config(void);
/* Optional mainboard hook to do additional configuration
on the RCBA config space. It is called after the raminit. */
void mainboard_late_rcba_config(void);
/* Optional mainboard hook to do additional LPC configuration
or to override what is set up by default. */
void mainboard_pch_lpc_setup(void);
void early_pch_init_native(void);
void early_pch_init(void);
void early_pch_init_native_dmi_pre(void);