summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-06-16 23:36:28 +0200
committerPatrick Georgi <pgeorgi@google.com>2019-10-16 14:08:29 +0000
commitd28d5071906e15c88939d889fbe40b117f5c303b (patch)
tree720d257987ba05695f2546b6fff0a180bde5b1b1 /src
parenta06689c7e7d88f74fd1d12f8f5055b5ea7bc741f (diff)
sb/intel/bd82x6x/lpc: Set up default LPC decode ranges
This sets up some common default LPC decode ranges in a common place. This may set up more decode ranges than needed but that typically does not hurt. Mainboards needing additional ranges can do so in the mainboard pch_enable_lpc hook. Change-Id: Ifeb5a862e56f415aa847d0118a33a31537ab8037 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33549 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/asrock/b75pro3-m/romstage.c3
-rw-r--r--src/mainboard/asus/h61m-cs/romstage.c1
-rw-r--r--src/mainboard/asus/maximus_iv_gene-z/romstage.c1
-rw-r--r--src/mainboard/asus/p8z77-m_pro/romstage.c6
-rw-r--r--src/mainboard/compulab/intense_pc/romstage.c3
-rw-r--r--src/mainboard/gigabyte/ga-b75m-d3h/romstage.c5
-rw-r--r--src/mainboard/gigabyte/ga-h61m-s2pv/romstage.c6
-rw-r--r--src/mainboard/google/link/romstage.c3
-rw-r--r--src/mainboard/google/parrot/romstage.c3
-rw-r--r--src/mainboard/hp/2570p/romstage.c6
-rw-r--r--src/mainboard/hp/2760p/romstage.c6
-rw-r--r--src/mainboard/hp/8460p/romstage.c9
-rw-r--r--src/mainboard/hp/8470p/romstage.c9
-rw-r--r--src/mainboard/hp/8770w/romstage.c9
-rw-r--r--src/mainboard/hp/compaq_8200_elite_sff/romstage.c10
-rw-r--r--src/mainboard/hp/folio_9470m/romstage.c7
-rw-r--r--src/mainboard/hp/revolve_810_g1/romstage.c7
-rw-r--r--src/mainboard/hp/z220_sff_workstation/romstage.c10
-rw-r--r--src/mainboard/intel/dcp847ske/early_southbridge.c10
-rw-r--r--src/mainboard/intel/emeraldlake2/romstage.c3
-rw-r--r--src/mainboard/lenovo/l520/romstage.c5
-rw-r--r--src/mainboard/lenovo/s230u/romstage.c1
-rw-r--r--src/mainboard/lenovo/t420/romstage.c5
-rw-r--r--src/mainboard/lenovo/t420s/romstage.c5
-rw-r--r--src/mainboard/lenovo/t430/romstage.c4
-rw-r--r--src/mainboard/lenovo/t430s/romstage.c5
-rw-r--r--src/mainboard/lenovo/t520/romstage.c5
-rw-r--r--src/mainboard/lenovo/t530/romstage.c5
-rw-r--r--src/mainboard/lenovo/x131e/romstage.c4
-rw-r--r--src/mainboard/lenovo/x1_carbon_gen1/romstage.c5
-rw-r--r--src/mainboard/lenovo/x220/romstage.c5
-rw-r--r--src/mainboard/lenovo/x230/romstage.c5
-rw-r--r--src/mainboard/msi/ms7707/romstage.c5
-rw-r--r--src/mainboard/roda/rv11/variants/rv11/romstage.c4
-rw-r--r--src/mainboard/roda/rv11/variants/rw11/romstage.c8
-rw-r--r--src/mainboard/sapphire/pureplatinumh61/romstage.c2
-rw-r--r--src/southbridge/intel/bd82x6x/early_pch.c21
37 files changed, 18 insertions, 193 deletions
diff --git a/src/mainboard/asrock/b75pro3-m/romstage.c b/src/mainboard/asrock/b75pro3-m/romstage.c
index cbd26a52ac..da895b31fd 100644
--- a/src/mainboard/asrock/b75pro3-m/romstage.c
+++ b/src/mainboard/asrock/b75pro3-m/romstage.c
@@ -25,9 +25,6 @@
void pch_enable_lpc(void)
{
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF1_LPC_EN | KBC_LPC_EN | LPT_LPC_EN | COMA_LPC_EN);
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0000);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/asus/h61m-cs/romstage.c b/src/mainboard/asus/h61m-cs/romstage.c
index 94f58c1e36..2064f14e22 100644
--- a/src/mainboard/asus/h61m-cs/romstage.c
+++ b/src/mainboard/asus/h61m-cs/romstage.c
@@ -29,7 +29,6 @@
void pch_enable_lpc(void)
{
- pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | KBC_LPC_EN);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/asus/maximus_iv_gene-z/romstage.c b/src/mainboard/asus/maximus_iv_gene-z/romstage.c
index f0506fb84e..fcf78d2e68 100644
--- a/src/mainboard/asus/maximus_iv_gene-z/romstage.c
+++ b/src/mainboard/asus/maximus_iv_gene-z/romstage.c
@@ -42,7 +42,6 @@ const struct southbridge_usb_port mainboard_usb_ports[] = {
void pch_enable_lpc(void)
{
- pci_or_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | KBC_LPC_EN);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/asus/p8z77-m_pro/romstage.c b/src/mainboard/asus/p8z77-m_pro/romstage.c
index b5593ec23c..9c5e443908 100644
--- a/src/mainboard/asus/p8z77-m_pro/romstage.c
+++ b/src/mainboard/asus/p8z77-m_pro/romstage.c
@@ -32,12 +32,6 @@
void pch_enable_lpc(void)
{
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF1_LPC_EN | CNF2_LPC_EN |
- KBC_LPC_EN | COMB_LPC_EN);
-
- /* Set COMB/COM2 IO range to 2F8h-2FFh */
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x10);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/compulab/intense_pc/romstage.c b/src/mainboard/compulab/intense_pc/romstage.c
index 74f00c21d1..f74e94d042 100644
--- a/src/mainboard/compulab/intense_pc/romstage.c
+++ b/src/mainboard/compulab/intense_pc/romstage.c
@@ -26,9 +26,6 @@ void pch_enable_lpc(void)
{
pci_devfn_t dev = PCH_LPC_DEV;
- /* Set COM1/COM2 decode range */
- pci_write_config16(dev, LPC_IO_DEC, 0x0010);
-
/* Enable SuperIO */
u16 lpc_config = CNF1_LPC_EN | CNF2_LPC_EN;
pci_write_config16(dev, LPC_EN, lpc_config);
diff --git a/src/mainboard/gigabyte/ga-b75m-d3h/romstage.c b/src/mainboard/gigabyte/ga-b75m-d3h/romstage.c
index b35a8b4af9..ecbd393b2b 100644
--- a/src/mainboard/gigabyte/ga-b75m-d3h/romstage.c
+++ b/src/mainboard/gigabyte/ga-b75m-d3h/romstage.c
@@ -27,11 +27,6 @@
void pch_enable_lpc(void)
{
- pci_write_config16(PCH_LPC_DEV, LPC_EN, KBC_LPC_EN |
- CNF1_LPC_EN | CNF2_LPC_EN | COMA_LPC_EN);
-
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x10);
-
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
diff --git a/src/mainboard/gigabyte/ga-h61m-s2pv/romstage.c b/src/mainboard/gigabyte/ga-h61m-s2pv/romstage.c
index a51595f4ff..8a17ac9a56 100644
--- a/src/mainboard/gigabyte/ga-h61m-s2pv/romstage.c
+++ b/src/mainboard/gigabyte/ga-h61m-s2pv/romstage.c
@@ -25,12 +25,6 @@
void pch_enable_lpc(void)
{
- pci_write_config16(PCH_LPC_DEV, LPC_EN, KBC_LPC_EN | CNF1_LPC_EN);
-
- if (!CONFIG(NO_UART_ON_SUPERIO)) {
- pci_or_config16(PCH_LPC_DEV, LPC_EN, COMA_LPC_EN);
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x10);
- }
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/google/link/romstage.c b/src/mainboard/google/link/romstage.c
index 8e8d94335c..d42572b632 100644
--- a/src/mainboard/google/link/romstage.c
+++ b/src/mainboard/google/link/romstage.c
@@ -34,9 +34,6 @@
void pch_enable_lpc(void)
{
- /* Set COM1/COM2 decode range */
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
-
/* Enable PS/2 Keyboard/Mouse, EC areas and COM1 */
pci_write_config16(PCH_LPC_DEV, LPC_EN, KBC_LPC_EN | MC_LPC_EN | \
GAMEL_LPC_EN | COMA_LPC_EN);
diff --git a/src/mainboard/google/parrot/romstage.c b/src/mainboard/google/parrot/romstage.c
index ac06fbc83e..210c7fc04c 100644
--- a/src/mainboard/google/parrot/romstage.c
+++ b/src/mainboard/google/parrot/romstage.c
@@ -28,9 +28,6 @@
void pch_enable_lpc(void)
{
- /* Parrot EC Decode Range Port60/64, Port62/66 */
- /* Enable EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN, KBC_LPC_EN | MC_LPC_EN);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/hp/2570p/romstage.c b/src/mainboard/hp/2570p/romstage.c
index 6401909dd5..6ffc3409a5 100644
--- a/src/mainboard/hp/2570p/romstage.c
+++ b/src/mainboard/hp/2570p/romstage.c
@@ -22,12 +22,6 @@
void pch_enable_lpc(void)
{
- /*
- * CNF2 and CNF1 for Super I/O
- * MC and LPC (0x60,0x64,0x62,0x66) for KBC and EC
- */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/hp/2760p/romstage.c b/src/mainboard/hp/2760p/romstage.c
index ba6f9566cf..b448f79259 100644
--- a/src/mainboard/hp/2760p/romstage.c
+++ b/src/mainboard/hp/2760p/romstage.c
@@ -21,12 +21,6 @@
void pch_enable_lpc(void)
{
- /*
- * CNF2 and CNF1 for Super I/O
- * MC and LPC (0x60,0x64,0x62,0x66) for KBC and EC
- */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/hp/8460p/romstage.c b/src/mainboard/hp/8460p/romstage.c
index f30c3a8d27..72a62c9eb3 100644
--- a/src/mainboard/hp/8460p/romstage.c
+++ b/src/mainboard/hp/8460p/romstage.c
@@ -25,15 +25,6 @@
void pch_enable_lpc(void)
{
- /*
- * CNF2 and CNF1 for Super I/O
- * MC and LPC (0x60,0x64,0x62,0x66) for KBC and EC
- * Enable parallel port and serial port
- */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN |
- LPT_LPC_EN | COMA_LPC_EN);
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/hp/8470p/romstage.c b/src/mainboard/hp/8470p/romstage.c
index b1375e815b..83f382d0a4 100644
--- a/src/mainboard/hp/8470p/romstage.c
+++ b/src/mainboard/hp/8470p/romstage.c
@@ -24,15 +24,6 @@
void pch_enable_lpc(void)
{
- /*
- * CNF2 and CNF1 for Super I/O
- * MC and LPC (0x60,0x64,0x62,0x66) for KBC and EC
- * Enable parallel port and serial port
- */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN |
- LPT_LPC_EN | COMA_LPC_EN);
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/hp/8770w/romstage.c b/src/mainboard/hp/8770w/romstage.c
index 8956b08b7b..2bd9162beb 100644
--- a/src/mainboard/hp/8770w/romstage.c
+++ b/src/mainboard/hp/8770w/romstage.c
@@ -25,15 +25,6 @@
void pch_enable_lpc(void)
{
- /*
- * CNF2 and CNF1 for Super I/O
- * MC and LPC (0x60,0x64,0x62,0x66) for KBC and EC
- * Enable parallel port and serial port
- */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN |
- LPT_LPC_EN | COMA_LPC_EN);
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/hp/compaq_8200_elite_sff/romstage.c b/src/mainboard/hp/compaq_8200_elite_sff/romstage.c
index 3c388776c3..258eac74b2 100644
--- a/src/mainboard/hp/compaq_8200_elite_sff/romstage.c
+++ b/src/mainboard/hp/compaq_8200_elite_sff/romstage.c
@@ -29,16 +29,6 @@
void pch_enable_lpc(void)
{
- /*
- * Enable SuperIO, TPM, Keyboard, LPT, COMA
- * (COMB can be equip on expansion header)
- */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN |CNF1_LPC_EN | KBC_LPC_EN | LPT_LPC_EN |
- COMB_LPC_EN | COMA_LPC_EN);
-
- /* COMA: 3F8h, COMB: 2F8h */
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/hp/folio_9470m/romstage.c b/src/mainboard/hp/folio_9470m/romstage.c
index 8ff7813cd9..061a06877c 100644
--- a/src/mainboard/hp/folio_9470m/romstage.c
+++ b/src/mainboard/hp/folio_9470m/romstage.c
@@ -23,13 +23,6 @@
void pch_enable_lpc(void)
{
- /*
- * CNF2 and CNF1 for Super I/O
- * MC and LPC (0x60,0x64,0x62,0x66) for KBC and EC
- */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/hp/revolve_810_g1/romstage.c b/src/mainboard/hp/revolve_810_g1/romstage.c
index 5f8df63f5c..5c83a91511 100644
--- a/src/mainboard/hp/revolve_810_g1/romstage.c
+++ b/src/mainboard/hp/revolve_810_g1/romstage.c
@@ -26,13 +26,6 @@
void pch_enable_lpc(void)
{
- /*
- * CNF2 and CNF1 for Super I/O
- * MC and LPC (0x60,0x64,0x62,0x66) for KBC and EC
- */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/hp/z220_sff_workstation/romstage.c b/src/mainboard/hp/z220_sff_workstation/romstage.c
index 54bfae353f..6c139ed34d 100644
--- a/src/mainboard/hp/z220_sff_workstation/romstage.c
+++ b/src/mainboard/hp/z220_sff_workstation/romstage.c
@@ -29,16 +29,6 @@
void pch_enable_lpc(void)
{
- /*
- * Enable SuperIO, TPM, Keyboard, LPT, COMA
- * (COMB can be equip on expansion header)
- */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | KBC_LPC_EN | LPT_LPC_EN |
- COMB_LPC_EN | COMA_LPC_EN);
-
- /* COMA: 3F8h, COMB: 2F8h */
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/intel/dcp847ske/early_southbridge.c b/src/mainboard/intel/dcp847ske/early_southbridge.c
index 705ace9bc6..984629574c 100644
--- a/src/mainboard/intel/dcp847ske/early_southbridge.c
+++ b/src/mainboard/intel/dcp847ske/early_southbridge.c
@@ -27,18 +27,8 @@
#include "superio.h"
#include "thermal.h"
-#if CONFIG(DISABLE_UART_ON_TESTPADS)
-#define DEBUG_UART_EN 0
-#else
-#define DEBUG_UART_EN COMA_LPC_EN
-#endif
-
void pch_enable_lpc(void)
{
- pci_write_config16(PCI_DEV(0, 0x1f, 0), LPC_EN,
- CNF2_LPC_EN | DEBUG_UART_EN);
- /* Decode SuperIO 0x0a00 */
- pci_write_config32(PCI_DEV(0, 0x1f, 0), LPC_GEN1_DEC, 0x00fc0a01);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/intel/emeraldlake2/romstage.c b/src/mainboard/intel/emeraldlake2/romstage.c
index ee3cec1ebf..d56576e2e5 100644
--- a/src/mainboard/intel/emeraldlake2/romstage.c
+++ b/src/mainboard/intel/emeraldlake2/romstage.c
@@ -32,9 +32,6 @@ void pch_enable_lpc(void)
{
pci_devfn_t dev = PCH_LPC_DEV;
- /* Set COM1/COM2 decode range */
- pci_write_config16(dev, LPC_IO_DEC, 0x0010);
-
/* Enable SuperIO + PS/2 Keyboard/Mouse */
u16 lpc_config = CNF1_LPC_EN | CNF2_LPC_EN | KBC_LPC_EN;
pci_write_config16(dev, LPC_EN, lpc_config);
diff --git a/src/mainboard/lenovo/l520/romstage.c b/src/mainboard/lenovo/l520/romstage.c
index 426ac4e6fa..82f63776d9 100644
--- a/src/mainboard/lenovo/l520/romstage.c
+++ b/src/mainboard/lenovo/l520/romstage.c
@@ -24,11 +24,6 @@
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable EC, PS/2 Keyboard/Mouse, LPT */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN |
- LPT_LPC_EN);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/lenovo/s230u/romstage.c b/src/mainboard/lenovo/s230u/romstage.c
index dd8fc17268..754c49aa4f 100644
--- a/src/mainboard/lenovo/s230u/romstage.c
+++ b/src/mainboard/lenovo/s230u/romstage.c
@@ -29,7 +29,6 @@
void pch_enable_lpc(void)
{
- pci_write_config16(PCH_LPC_DEV, LPC_EN, MC_LPC_EN | KBC_LPC_EN);
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
/* Memory map KB9012 EC registers */
diff --git a/src/mainboard/lenovo/t420/romstage.c b/src/mainboard/lenovo/t420/romstage.c
index ebf5aed0f1..e7851f3edb 100644
--- a/src/mainboard/lenovo/t420/romstage.c
+++ b/src/mainboard/lenovo/t420/romstage.c
@@ -51,11 +51,6 @@ static void hybrid_graphics_init(void)
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
-
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 49de58d8d1..72cbcad245 100644
--- a/src/mainboard/lenovo/t420s/romstage.c
+++ b/src/mainboard/lenovo/t420s/romstage.c
@@ -51,11 +51,6 @@ static void hybrid_graphics_init(void)
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
-
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 1f4b90d7f9..3caa443fe9 100644
--- a/src/mainboard/lenovo/t430/romstage.c
+++ b/src/mainboard/lenovo/t430/romstage.c
@@ -51,10 +51,6 @@ static void hybrid_graphics_init(void)
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable TPM, EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/lenovo/t430s/romstage.c b/src/mainboard/lenovo/t430s/romstage.c
index e590bb6c67..34793d1301 100644
--- a/src/mainboard/lenovo/t430s/romstage.c
+++ b/src/mainboard/lenovo/t430s/romstage.c
@@ -21,11 +21,6 @@
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
-
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 5c23b8e06f..75e331e6d4 100644
--- a/src/mainboard/lenovo/t520/romstage.c
+++ b/src/mainboard/lenovo/t520/romstage.c
@@ -53,11 +53,6 @@ static void hybrid_graphics_init(void)
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
-
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 67cf97c486..cb17a27dda 100644
--- a/src/mainboard/lenovo/t530/romstage.c
+++ b/src/mainboard/lenovo/t530/romstage.c
@@ -53,11 +53,6 @@ static void hybrid_graphics_init(void)
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
-
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 5fc5df6b85..2a6ee2733b 100644
--- a/src/mainboard/lenovo/x131e/romstage.c
+++ b/src/mainboard/lenovo/x131e/romstage.c
@@ -22,10 +22,6 @@
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable TPM, EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
}
void mainboard_rcba_config(void)
diff --git a/src/mainboard/lenovo/x1_carbon_gen1/romstage.c b/src/mainboard/lenovo/x1_carbon_gen1/romstage.c
index f666671dd6..b779c4eff5 100644
--- a/src/mainboard/lenovo/x1_carbon_gen1/romstage.c
+++ b/src/mainboard/lenovo/x1_carbon_gen1/romstage.c
@@ -30,11 +30,6 @@
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
-
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 9ecb8a3e1e..af92f9ba8e 100644
--- a/src/mainboard/lenovo/x220/romstage.c
+++ b/src/mainboard/lenovo/x220/romstage.c
@@ -29,11 +29,6 @@
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
-
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 10cddebda3..60016a4f07 100644
--- a/src/mainboard/lenovo/x230/romstage.c
+++ b/src/mainboard/lenovo/x230/romstage.c
@@ -26,11 +26,6 @@
void pch_enable_lpc(void)
{
- /* EC Decode Range Port60/64, Port62/66 */
- /* Enable EC, PS/2 Keyboard/Mouse */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF2_LPC_EN | CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
-
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
diff --git a/src/mainboard/msi/ms7707/romstage.c b/src/mainboard/msi/ms7707/romstage.c
index 30bb545328..dc3b79d527 100644
--- a/src/mainboard/msi/ms7707/romstage.c
+++ b/src/mainboard/msi/ms7707/romstage.c
@@ -23,11 +23,6 @@
void pch_enable_lpc(void)
{
- /* IO Decode Ranges Register */
- pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x80, 0x0000);
- /* LPC IF Enables Register (CNF2_LPC_EN|KBC_LPC_EN) */
- pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x2400);
-
u16 reg16;
reg16 = pci_read_config16(PCI_DEV(0, 0x1f, 0), 0xa4);
reg16 |= (1 << 13); // WOL Enable Override (WOL_EN_OVRD)
diff --git a/src/mainboard/roda/rv11/variants/rv11/romstage.c b/src/mainboard/roda/rv11/variants/rv11/romstage.c
index 685e94237f..4491370cbf 100644
--- a/src/mainboard/roda/rv11/variants/rv11/romstage.c
+++ b/src/mainboard/roda/rv11/variants/rv11/romstage.c
@@ -23,10 +23,6 @@
void pch_enable_lpc(void)
{
- /* Enable KBC on 0x60/0x64 (KBC),
- EC on 0x62/0x66 (MC) */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- KBC_LPC_EN | MC_LPC_EN);
}
void mainboard_config_superio(void)
diff --git a/src/mainboard/roda/rv11/variants/rw11/romstage.c b/src/mainboard/roda/rv11/variants/rw11/romstage.c
index 97d9d2b099..f355578b6e 100644
--- a/src/mainboard/roda/rv11/variants/rw11/romstage.c
+++ b/src/mainboard/roda/rv11/variants/rw11/romstage.c
@@ -27,14 +27,6 @@
void pch_enable_lpc(void)
{
- /* COMA on 0x3f8, COMB on 0x2f8 */
- pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
- /* Enable KBC on 0x60/0x64 (KBC),
- EC on 0x62/0x66 (MC),
- SIO on 0x2e/0x2f (CNF1) */
- pci_write_config16(PCH_LPC_DEV, LPC_EN,
- CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN |
- COMB_LPC_EN | COMA_LPC_EN);
}
void mainboard_config_superio(void)
diff --git a/src/mainboard/sapphire/pureplatinumh61/romstage.c b/src/mainboard/sapphire/pureplatinumh61/romstage.c
index c7d8f0f724..ff5bb701a8 100644
--- a/src/mainboard/sapphire/pureplatinumh61/romstage.c
+++ b/src/mainboard/sapphire/pureplatinumh61/romstage.c
@@ -23,8 +23,6 @@
void pch_enable_lpc(void)
{
- pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x2400);
- pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x80, 0x0000);
pci_write_config32(PCI_DEV(0, 0x1f, 0), 0xac, 0x00010000);
}
diff --git a/src/southbridge/intel/bd82x6x/early_pch.c b/src/southbridge/intel/bd82x6x/early_pch.c
index 73fce3bf9f..df9fdefec1 100644
--- a/src/southbridge/intel/bd82x6x/early_pch.c
+++ b/src/southbridge/intel/bd82x6x/early_pch.c
@@ -254,8 +254,22 @@ static void pch_generic_setup(void)
write_pmbase16(TCO1_CNT, 1 << 11); /* halt timer */
}
-static void pch_enable_lpc_gen_decode(void)
+static void pch_enable_lpc_decode(void)
{
+ /*
+ * Enable some common LPC IO ranges:
+ * - 0x2e/0x2f, 0x4e/0x4f often SuperIO
+ * - 0x60/0x64, 0x62/0x66 often KBC/EC
+ * - 0x3f0-0x3f5/0x3f7 FDD
+ * - 0x378-0x37f and 0x778-0x77f LPT
+ * - 0x2f8-0x2ff COMB
+ * - 0x3f8-0x3ff COMA
+ */
+ pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
+ pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF2_LPC_EN | CNF1_LPC_EN
+ | MC_LPC_EN | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN
+ | COMB_LPC_EN | COMA_LPC_EN);
+
const struct device *dev = pcidev_on_root(0x1f, 0);
const struct southbridge_intel_bd82x6x_config *config = NULL;
@@ -275,9 +289,10 @@ static void pch_enable_lpc_gen_decode(void)
void early_pch_init(void)
{
- pch_enable_lpc();
- pch_enable_lpc_gen_decode();
+ pch_enable_lpc_decode();
+
+ pch_enable_lpc();
pch_enable_bars();