summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-11-12 17:21:08 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-18 11:46:51 +0000
commit2b28a160618018b4d7b7930362e1088c2313901b (patch)
tree044e169f851fb29f9842f8b14081f1ca64ba63a6 /src/mainboard/lenovo
parent9c538348d8ccaef2c3dd6b898a1f44b00ea59690 (diff)
downloadcoreboot-2b28a160618018b4d7b7930362e1088c2313901b.tar.xz
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>
Diffstat (limited to 'src/mainboard/lenovo')
-rw-r--r--src/mainboard/lenovo/l520/romstage.c4
-rw-r--r--src/mainboard/lenovo/s230u/romstage.c2
-rw-r--r--src/mainboard/lenovo/t420/romstage.c2
-rw-r--r--src/mainboard/lenovo/t420s/romstage.c2
-rw-r--r--src/mainboard/lenovo/t430/romstage.c4
-rw-r--r--src/mainboard/lenovo/t430s/romstage.c2
-rw-r--r--src/mainboard/lenovo/t520/romstage.c2
-rw-r--r--src/mainboard/lenovo/t530/romstage.c2
-rw-r--r--src/mainboard/lenovo/x131e/romstage.c4
-rw-r--r--src/mainboard/lenovo/x1_carbon_gen1/romstage.c2
-rw-r--r--src/mainboard/lenovo/x220/romstage.c2
-rw-r--r--src/mainboard/lenovo/x230/romstage.c2
12 files changed, 9 insertions, 21 deletions
diff --git a/src/mainboard/lenovo/l520/romstage.c b/src/mainboard/lenovo/l520/romstage.c
index 37182f855d..af73537f24 100644
--- a/src/mainboard/lenovo/l520/romstage.c
+++ b/src/mainboard/lenovo/l520/romstage.c
@@ -22,10 +22,6 @@
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/common/gpio.h>
-void pch_enable_lpc(void)
-{
-}
-
const struct southbridge_usb_port mainboard_usb_ports[] = {
{ 1, 0, -1 },
{ 1, 0, -1 },
diff --git a/src/mainboard/lenovo/s230u/romstage.c b/src/mainboard/lenovo/s230u/romstage.c
index ee1d0ed19c..0552170668 100644
--- a/src/mainboard/lenovo/s230u/romstage.c
+++ b/src/mainboard/lenovo/s230u/romstage.c
@@ -27,7 +27,7 @@
#define SPD_LEN 256
-void pch_enable_lpc(void)
+void mainboard_pch_lpc_setup(void)
{
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
diff --git a/src/mainboard/lenovo/t420/romstage.c b/src/mainboard/lenovo/t420/romstage.c
index 7036ec40fe..e04803f165 100644
--- a/src/mainboard/lenovo/t420/romstage.c
+++ b/src/mainboard/lenovo/t420/romstage.c
@@ -49,7 +49,7 @@ static void hybrid_graphics_init(void)
pci_write_config32(PCI_DEV(0, 0, 0), DEVEN, reg32);
}
-void pch_enable_lpc(void)
+void mainboard_pch_lpc_setup(void)
{
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
diff --git a/src/mainboard/lenovo/t420s/romstage.c b/src/mainboard/lenovo/t420s/romstage.c
index 7b97ff7e75..764997297e 100644
--- a/src/mainboard/lenovo/t420s/romstage.c
+++ b/src/mainboard/lenovo/t420s/romstage.c
@@ -49,7 +49,7 @@ static void hybrid_graphics_init(void)
pci_write_config32(PCI_DEV(0, 0, 0), DEVEN, reg32);
}
-void pch_enable_lpc(void)
+void mainboard_pch_lpc_setup(void)
{
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
diff --git a/src/mainboard/lenovo/t430/romstage.c b/src/mainboard/lenovo/t430/romstage.c
index 0cff5d2b59..f1e724be47 100644
--- a/src/mainboard/lenovo/t430/romstage.c
+++ b/src/mainboard/lenovo/t430/romstage.c
@@ -49,10 +49,6 @@ static void hybrid_graphics_init(void)
pci_write_config32(PCI_DEV(0, 0, 0), DEVEN, reg32);
}
-void pch_enable_lpc(void)
-{
-}
-
/* FIXME: used T530 values here */
const struct southbridge_usb_port mainboard_usb_ports[] = {
{ 1, 1, 0 },
diff --git a/src/mainboard/lenovo/t430s/romstage.c b/src/mainboard/lenovo/t430s/romstage.c
index 298673b5dd..6503c9a920 100644
--- a/src/mainboard/lenovo/t430s/romstage.c
+++ b/src/mainboard/lenovo/t430s/romstage.c
@@ -19,7 +19,7 @@
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <southbridge/intel/bd82x6x/pch.h>
-void pch_enable_lpc(void)
+void mainboard_pch_lpc_setup(void)
{
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
diff --git a/src/mainboard/lenovo/t520/romstage.c b/src/mainboard/lenovo/t520/romstage.c
index 52898faa45..caf54bd5df 100644
--- a/src/mainboard/lenovo/t520/romstage.c
+++ b/src/mainboard/lenovo/t520/romstage.c
@@ -51,7 +51,7 @@ static void hybrid_graphics_init(void)
pci_write_config32(PCI_DEV(0, 0, 0), DEVEN, reg32);
}
-void pch_enable_lpc(void)
+void mainboard_pch_lpc_setup(void)
{
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
diff --git a/src/mainboard/lenovo/t530/romstage.c b/src/mainboard/lenovo/t530/romstage.c
index e0b0455c75..85c3090bb5 100644
--- a/src/mainboard/lenovo/t530/romstage.c
+++ b/src/mainboard/lenovo/t530/romstage.c
@@ -51,7 +51,7 @@ static void hybrid_graphics_init(void)
pci_write_config32(PCI_DEV(0, 0, 0), DEVEN, reg32);
}
-void pch_enable_lpc(void)
+void mainboard_pch_lpc_setup(void)
{
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
diff --git a/src/mainboard/lenovo/x131e/romstage.c b/src/mainboard/lenovo/x131e/romstage.c
index a1d3e88ad7..45d6b88099 100644
--- a/src/mainboard/lenovo/x131e/romstage.c
+++ b/src/mainboard/lenovo/x131e/romstage.c
@@ -20,10 +20,6 @@
#include <northbridge/intel/sandybridge/raminit_native.h>
#include <southbridge/intel/bd82x6x/pch.h>
-void pch_enable_lpc(void)
-{
-}
-
const struct southbridge_usb_port mainboard_usb_ports[] = {
{1, 1, 0}, /* P0: USB 3.0 1 (OC0) */
{1, 1, 0}, /* P1: USB 3.0 2 (OC0) */
diff --git a/src/mainboard/lenovo/x1_carbon_gen1/romstage.c b/src/mainboard/lenovo/x1_carbon_gen1/romstage.c
index f4d2a3c70a..1f027ffab8 100644
--- a/src/mainboard/lenovo/x1_carbon_gen1/romstage.c
+++ b/src/mainboard/lenovo/x1_carbon_gen1/romstage.c
@@ -28,7 +28,7 @@
#include <southbridge/intel/common/gpio.h>
#include <cbfs.h>
-void pch_enable_lpc(void)
+void mainboard_pch_lpc_setup(void)
{
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
diff --git a/src/mainboard/lenovo/x220/romstage.c b/src/mainboard/lenovo/x220/romstage.c
index 7989fd6298..72dd8dddca 100644
--- a/src/mainboard/lenovo/x220/romstage.c
+++ b/src/mainboard/lenovo/x220/romstage.c
@@ -27,7 +27,7 @@
#include <southbridge/intel/common/gpio.h>
#include <cpu/x86/msr.h>
-void pch_enable_lpc(void)
+void mainboard_pch_lpc_setup(void)
{
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
diff --git a/src/mainboard/lenovo/x230/romstage.c b/src/mainboard/lenovo/x230/romstage.c
index 3e9ea2c371..56f5a90670 100644
--- a/src/mainboard/lenovo/x230/romstage.c
+++ b/src/mainboard/lenovo/x230/romstage.c
@@ -24,7 +24,7 @@
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/common/gpio.h>
-void pch_enable_lpc(void)
+void mainboard_pch_lpc_setup(void)
{
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}