summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-05-17 13:22:57 +0200
committerDavid Hendricks <david.hendricks@gmail.com>2021-05-20 17:10:01 +0000
commited1e25de525fe2649bf5af2b448f7b37e34c54f6 (patch)
treeaa3f9f493ba748831c93fafd676388087f3c3d57
parent9d8a4558e30845ff9ae421c551b4fa51dcfeec93 (diff)
downloadcoreboot-ed1e25de525fe2649bf5af2b448f7b37e34c54f6.tar.xz
mb/asus/p8h61-m_lx: Transform into variant setup
Handle some differences in the DSDT code using preprocessor. Tested with BUILD_TIMELESS=1, coreboot.rom for the Asus P8H61-M LX remains identical when not adding the .config file in it. Change-Id: I2a02f32dfd9fa9c1adce3baf0d279ea19db5883f Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/54375 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
-rw-r--r--MAINTAINERS6
-rw-r--r--src/mainboard/asus/h61-series/Kconfig12
-rw-r--r--src/mainboard/asus/h61-series/Kconfig.name12
-rw-r--r--src/mainboard/asus/h61-series/acpi/superio.asl15
-rw-r--r--src/mainboard/asus/h61-series/dsdt.asl8
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx/board_info.txt (renamed from src/mainboard/asus/p8h61-m_lx/board_info.txt)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx/cmos.default (renamed from src/mainboard/asus/p8h61-m_lx/cmos.default)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx/cmos.layout (renamed from src/mainboard/asus/p8h61-m_lx/cmos.layout)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx/data.vbt (renamed from src/mainboard/asus/p8h61-m_lx/data.vbt)bin3902 -> 3902 bytes
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx/devicetree.cb (renamed from src/mainboard/asus/p8h61-m_lx/devicetree.cb)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx/early_init.c (renamed from src/mainboard/asus/p8h61-m_lx/early_init.c)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx/gma-mainboard.ads (renamed from src/mainboard/asus/p8h61-m_lx/gma-mainboard.ads)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx/gpio.c (renamed from src/mainboard/asus/p8h61-m_lx/gpio.c)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx/hda_verb.c (renamed from src/mainboard/asus/p8h61-m_lx/hda_verb.c)0
-rw-r--r--src/mainboard/asus/p8h61-m_lx/Kconfig42
-rw-r--r--src/mainboard/asus/p8h61-m_lx/Kconfig.name2
-rw-r--r--src/mainboard/asus/p8h61-m_lx/Makefile.inc7
-rw-r--r--src/mainboard/asus/p8h61-m_lx/acpi/ec.asl0
-rw-r--r--src/mainboard/asus/p8h61-m_lx/acpi/platform.asl10
-rw-r--r--src/mainboard/asus/p8h61-m_lx/acpi/superio.asl12
-rw-r--r--src/mainboard/asus/p8h61-m_lx/dsdt.asl25
-rw-r--r--src/mainboard/asus/p8h61-m_lx/mainboard.c15
22 files changed, 47 insertions, 119 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 860b79c9f7..6a668e52e9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -176,6 +176,7 @@ F: src/mainboard/asus/am1i-a/
ASUS H61 SERIES MAINBOARDS
M: Angel Pons <th3fanbus@gmail.com>
+M: Tristan Corrick <tristan@corrick.kiwi>
S: Maintained
F: src/mainboard/asus/h61-series/
@@ -195,11 +196,6 @@ M: Angel Pons <th3fanbus@gmail.com>
S: Maintained
F: src/mainboard/asus/p5qpl-am/
-ASUS P8H61-M LX MAINBOARD
-M: Tristan Corrick <tristan@corrick.kiwi>
-S: Maintained
-F: src/mainboard/asus/p8h61-m_lx/
-
ASUS P8Z77-M PRO MAINBOARD
M: Vlado Cibic <vladocb@protonmail.com>
S: Maintained
diff --git a/src/mainboard/asus/h61-series/Kconfig b/src/mainboard/asus/h61-series/Kconfig
index 212c06b33d..cadc9841de 100644
--- a/src/mainboard/asus/h61-series/Kconfig
+++ b/src/mainboard/asus/h61-series/Kconfig
@@ -20,12 +20,14 @@ config MAINBOARD_DIR
config VARIANT_DIR
string
default "h61m-cs" if BOARD_ASUS_H61M_CS
+ default "p8h61-m_lx" if BOARD_ASUS_P8H61_M_LX
default "p8h61-m_lx3_r2_0" if BOARD_ASUS_P8H61_M_LX3_R2_0
default "p8h61-m_pro" if BOARD_ASUS_P8H61_M_PRO
config MAINBOARD_PART_NUMBER
string
default "H61M-CS" if BOARD_ASUS_H61M_CS
+ default "P8H61-M LX" if BOARD_ASUS_P8H61_M_LX
default "P8H61-M LX3 R2.0" if BOARD_ASUS_P8H61_M_LX3_R2_0
default "P8H61-M PRO" if BOARD_ASUS_P8H61_M_PRO
@@ -39,4 +41,14 @@ config CMOS_DEFAULT_FILE
config CMOS_LAYOUT_FILE
default "src/mainboard/\$(MAINBOARDDIR)/variants/\$(CONFIG_VARIANT_DIR)/cmos.layout"
+#
+# These ME partitions need to be whitelisted for correct system
+# operation. Example issues from removing them include: no serial output
+# and kernel warnings about loading audio codecs.
+#
+config ME_CLEANER_ARGS
+ string
+ depends on USE_ME_CLEANER
+ default "-S --whitelist EFFS,FCRS" if BOARD_ASUS_P8H61_M_LX
+
endif
diff --git a/src/mainboard/asus/h61-series/Kconfig.name b/src/mainboard/asus/h61-series/Kconfig.name
index 6bb8d45743..c53118856f 100644
--- a/src/mainboard/asus/h61-series/Kconfig.name
+++ b/src/mainboard/asus/h61-series/Kconfig.name
@@ -8,6 +8,18 @@ config BOARD_ASUS_H61M_CS
select NO_UART_ON_SUPERIO
select SUPERIO_NUVOTON_NCT6779D
+config BOARD_ASUS_P8H61_M_LX
+ bool "P8H61-M LX"
+ select BOARD_ASUS_H61_SERIES
+ select BOARD_ROMSIZE_KB_4096
+ select HAVE_CMOS_DEFAULT
+ select HAVE_OPTION_TABLE
+ select INTEL_INT15
+ select REALTEK_8168_RESET
+ select RT8168_SET_LED_MODE
+ select SUPERIO_NUVOTON_COMMON_COM_A
+ select SUPERIO_NUVOTON_NCT6776
+
config BOARD_ASUS_P8H61_M_LX3_R2_0
bool "P8H61-M LX3 R2.0"
select BOARD_ASUS_H61_SERIES
diff --git a/src/mainboard/asus/h61-series/acpi/superio.asl b/src/mainboard/asus/h61-series/acpi/superio.asl
index ee2eabeb75..55816266cf 100644
--- a/src/mainboard/asus/h61-series/acpi/superio.asl
+++ b/src/mainboard/asus/h61-series/acpi/superio.asl
@@ -1,3 +1,18 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
+#if CONFIG(BOARD_ASUS_P8H61_M_LX)
+
+#define SUPERIO_DEV SIO0
+#define SUPERIO_PNP_BASE 0x2e
+#define NCT6776_SHOW_PP
+#define NCT6776_SHOW_SP1
+#define NCT6776_SHOW_KBC
+#define NCT6776_SHOW_HWM
+
+#undef NCT6776_SHOW_GPIO
+
+#include <superio/nuvoton/nct6776/acpi/superio.asl>
+
+#else /* !BOARD_ASUS_P8H61_M_LX */
#include <drivers/pc80/pc/ps2_controller.asl>
+#endif
diff --git a/src/mainboard/asus/h61-series/dsdt.asl b/src/mainboard/asus/h61-series/dsdt.asl
index e8e2b3a3e5..539922e181 100644
--- a/src/mainboard/asus/h61-series/dsdt.asl
+++ b/src/mainboard/asus/h61-series/dsdt.asl
@@ -2,13 +2,19 @@
#include <acpi/acpi.h>
+#if CONFIG(BOARD_ASUS_P8H61_M_LX)
+#define BOARD_DSDT_REVISION 0x20171231 /* OEM revision */
+#else
+#define BOARD_DSDT_REVISION 0x20141018
+#endif
+
DefinitionBlock(
"dsdt.aml",
"DSDT",
ACPI_DSDT_REV_2,
OEM_ID,
ACPI_TABLE_CREATOR,
- 0x20141018 /* OEM revision */
+ BOARD_DSDT_REVISION
)
{
#include <acpi/dsdt_top.asl>
diff --git a/src/mainboard/asus/p8h61-m_lx/board_info.txt b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/board_info.txt
index 9c7f9721b1..9c7f9721b1 100644
--- a/src/mainboard/asus/p8h61-m_lx/board_info.txt
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/board_info.txt
diff --git a/src/mainboard/asus/p8h61-m_lx/cmos.default b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/cmos.default
index d3812abb15..d3812abb15 100644
--- a/src/mainboard/asus/p8h61-m_lx/cmos.default
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/cmos.default
diff --git a/src/mainboard/asus/p8h61-m_lx/cmos.layout b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/cmos.layout
index 782a1b8c10..782a1b8c10 100644
--- a/src/mainboard/asus/p8h61-m_lx/cmos.layout
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/cmos.layout
diff --git a/src/mainboard/asus/p8h61-m_lx/data.vbt b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/data.vbt
index 7eda3ab04d..7eda3ab04d 100644
--- a/src/mainboard/asus/p8h61-m_lx/data.vbt
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/data.vbt
Binary files differ
diff --git a/src/mainboard/asus/p8h61-m_lx/devicetree.cb b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/devicetree.cb
index 276119051c..276119051c 100644
--- a/src/mainboard/asus/p8h61-m_lx/devicetree.cb
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/devicetree.cb
diff --git a/src/mainboard/asus/p8h61-m_lx/early_init.c b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/early_init.c
index 5e54d08e85..5e54d08e85 100644
--- a/src/mainboard/asus/p8h61-m_lx/early_init.c
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/early_init.c
diff --git a/src/mainboard/asus/p8h61-m_lx/gma-mainboard.ads b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/gma-mainboard.ads
index c6422a5ca2..c6422a5ca2 100644
--- a/src/mainboard/asus/p8h61-m_lx/gma-mainboard.ads
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/gma-mainboard.ads
diff --git a/src/mainboard/asus/p8h61-m_lx/gpio.c b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/gpio.c
index 18ee191a40..18ee191a40 100644
--- a/src/mainboard/asus/p8h61-m_lx/gpio.c
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/gpio.c
diff --git a/src/mainboard/asus/p8h61-m_lx/hda_verb.c b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/hda_verb.c
index 3b707c2cd4..3b707c2cd4 100644
--- a/src/mainboard/asus/p8h61-m_lx/hda_verb.c
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx/hda_verb.c
diff --git a/src/mainboard/asus/p8h61-m_lx/Kconfig b/src/mainboard/asus/p8h61-m_lx/Kconfig
deleted file mode 100644
index 80159973cb..0000000000
--- a/src/mainboard/asus/p8h61-m_lx/Kconfig
+++ /dev/null
@@ -1,42 +0,0 @@
-## SPDX-License-Identifier: GPL-2.0-or-later
-
-if BOARD_ASUS_P8H61_M_LX
-
-config BOARD_SPECIFIC_OPTIONS
- def_bool y
- select BOARD_ROMSIZE_KB_4096
- select HAVE_ACPI_RESUME
- select HAVE_ACPI_TABLES
- select HAVE_CMOS_DEFAULT
- select HAVE_OPTION_TABLE
- select INTEL_GMA_HAVE_VBT
- select INTEL_INT15
- select MAINBOARD_HAS_LIBGFXINIT
- select NORTHBRIDGE_INTEL_SANDYBRIDGE
- select REALTEK_8168_RESET
- select RT8168_SET_LED_MODE
- select SERIRQ_CONTINUOUS_MODE
- select SOUTHBRIDGE_INTEL_BD82X6X
- select SUPERIO_NUVOTON_COMMON_COM_A
- select SUPERIO_NUVOTON_NCT6776
- select USE_NATIVE_RAMINIT
-
-config MAINBOARD_DIR
- string
- default "asus/p8h61-m_lx"
-
-config MAINBOARD_PART_NUMBER
- string
- default "P8H61-M LX"
-
-#
-# These ME partitions need to be whitelisted for correct system
-# operation. Example issues from removing them include: no serial output
-# and kernel warnings about loading audio codecs.
-#
-config ME_CLEANER_ARGS
- string
- depends on USE_ME_CLEANER
- default "-S --whitelist EFFS,FCRS"
-
-endif
diff --git a/src/mainboard/asus/p8h61-m_lx/Kconfig.name b/src/mainboard/asus/p8h61-m_lx/Kconfig.name
deleted file mode 100644
index d62f437a3a..0000000000
--- a/src/mainboard/asus/p8h61-m_lx/Kconfig.name
+++ /dev/null
@@ -1,2 +0,0 @@
-config BOARD_ASUS_P8H61_M_LX
- bool "P8H61-M LX"
diff --git a/src/mainboard/asus/p8h61-m_lx/Makefile.inc b/src/mainboard/asus/p8h61-m_lx/Makefile.inc
deleted file mode 100644
index e09d538d26..0000000000
--- a/src/mainboard/asus/p8h61-m_lx/Makefile.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-## SPDX-License-Identifier: GPL-2.0-or-later
-
-bootblock-y += gpio.c
-romstage-y += gpio.c
-ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
-bootblock-y += early_init.c
-romstage-y += early_init.c
diff --git a/src/mainboard/asus/p8h61-m_lx/acpi/ec.asl b/src/mainboard/asus/p8h61-m_lx/acpi/ec.asl
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/mainboard/asus/p8h61-m_lx/acpi/ec.asl
+++ /dev/null
diff --git a/src/mainboard/asus/p8h61-m_lx/acpi/platform.asl b/src/mainboard/asus/p8h61-m_lx/acpi/platform.asl
deleted file mode 100644
index 90cf05bf75..0000000000
--- a/src/mainboard/asus/p8h61-m_lx/acpi/platform.asl
+++ /dev/null
@@ -1,10 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-
-Method(_PTS,1)
-{
-}
-
-Method(_WAK,1)
-{
- Return(Package(){0,0})
-}
diff --git a/src/mainboard/asus/p8h61-m_lx/acpi/superio.asl b/src/mainboard/asus/p8h61-m_lx/acpi/superio.asl
deleted file mode 100644
index 4bdb4b9c22..0000000000
--- a/src/mainboard/asus/p8h61-m_lx/acpi/superio.asl
+++ /dev/null
@@ -1,12 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-
-#define SUPERIO_DEV SIO0
-#define SUPERIO_PNP_BASE 0x2e
-#define NCT6776_SHOW_PP
-#define NCT6776_SHOW_SP1
-#define NCT6776_SHOW_KBC
-#define NCT6776_SHOW_HWM
-
-#undef NCT6776_SHOW_GPIO
-
-#include <superio/nuvoton/nct6776/acpi/superio.asl>
diff --git a/src/mainboard/asus/p8h61-m_lx/dsdt.asl b/src/mainboard/asus/p8h61-m_lx/dsdt.asl
deleted file mode 100644
index dc535279b7..0000000000
--- a/src/mainboard/asus/p8h61-m_lx/dsdt.asl
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-
-#include <acpi/acpi.h>
-DefinitionBlock(
- "dsdt.aml",
- "DSDT",
- ACPI_DSDT_REV_2,
- OEM_ID,
- ACPI_TABLE_CREATOR,
- 0x20171231 /* OEM Revision */
-)
-{
- #include <acpi/dsdt_top.asl>
- #include "acpi/platform.asl"
- #include <cpu/intel/common/acpi/cpu.asl>
- #include <southbridge/intel/common/acpi/platform.asl>
- #include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
- #include <southbridge/intel/common/acpi/sleepstates.asl>
-
- Device (\_SB.PCI0)
- {
- #include <northbridge/intel/sandybridge/acpi/sandybridge.asl>
- #include <southbridge/intel/bd82x6x/acpi/pch.asl>
- }
-}
diff --git a/src/mainboard/asus/p8h61-m_lx/mainboard.c b/src/mainboard/asus/p8h61-m_lx/mainboard.c
deleted file mode 100644
index f0dbc3fc06..0000000000
--- a/src/mainboard/asus/p8h61-m_lx/mainboard.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-
-#include <device/device.h>
-#include <drivers/intel/gma/int15.h>
-
-static void mainboard_enable(struct device *dev)
-{
- install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_NONE,
- GMA_INT15_PANEL_FIT_DEFAULT,
- GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
-}
-
-struct chip_operations mainboard_ops = {
- .enable_dev = mainboard_enable,
-};