summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-05-17 12:31:29 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-05-18 11:49:32 +0000
commite94cda578c6a91538c05cc8590752435136268b4 (patch)
tree237e6701bcbbe4d337160ea2a1861da0b22c01e8 /src
parentde649bc01da910a2bcf5aaed1701beec7c4694e7 (diff)
mb/asus/p8h61-m_lx3_r2_0: Transform into variant setup
Get ready to squash all Asus H61 boards together, so as to factor out lots of redundant code. Tested with BUILD_TIMELESS=1, coreboot.rom for the Asus P8H61-M LX3 R2.0 remains identical when not adding the .config file in it. Change-Id: I738197bf4d5ea8b879ae26ecbcb0cf3714316662 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/54372 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/asus/h61-series/Kconfig (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/Kconfig)25
-rw-r--r--src/mainboard/asus/h61-series/Kconfig.name8
-rw-r--r--src/mainboard/asus/h61-series/Makefile.inc8
-rw-r--r--src/mainboard/asus/h61-series/acpi/ec.asl (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/acpi/ec.asl)0
-rw-r--r--src/mainboard/asus/h61-series/acpi/platform.asl (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/acpi/platform.asl)0
-rw-r--r--src/mainboard/asus/h61-series/acpi/superio.asl (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/acpi/superio.asl)0
-rw-r--r--src/mainboard/asus/h61-series/board_info.txt5
-rw-r--r--src/mainboard/asus/h61-series/dsdt.asl (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/dsdt.asl)0
-rw-r--r--src/mainboard/asus/h61-series/hda_verb.c0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/board_info.txt (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/board_info.txt)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/data.vbt (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/data.vbt)bin7168 -> 7168 bytes
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/devicetree.cb (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/devicetree.cb)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/early_init.c (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/early_init.c)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/gma-mainboard.ads (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/gma-mainboard.ads)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/gpio.c (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/gpio.c)0
-rw-r--r--src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/hda_verb.c (renamed from src/mainboard/asus/p8h61-m_lx3_r2_0/hda_verb.c)0
-rw-r--r--src/mainboard/asus/p8h61-m_lx3_r2_0/Kconfig.name2
-rw-r--r--src/mainboard/asus/p8h61-m_lx3_r2_0/Makefile.inc7
18 files changed, 35 insertions, 20 deletions
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/Kconfig b/src/mainboard/asus/h61-series/Kconfig
index 16fbbb8af7..2ef6642788 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/Kconfig
+++ b/src/mainboard/asus/h61-series/Kconfig
@@ -1,29 +1,32 @@
## SPDX-License-Identifier: GPL-2.0-only
-if BOARD_ASUS_P8H61_M_LX3_R2_0
-
-config BOARD_SPECIFIC_OPTIONS
- def_bool y
- select BOARD_ROMSIZE_KB_8192
+config BOARD_ASUS_H61_SERIES
+ bool
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_LIBGFXINIT
- select NO_UART_ON_SUPERIO
select NORTHBRIDGE_INTEL_SANDYBRIDGE
- select REALTEK_8168_RESET
- select RT8168_SET_LED_MODE
select SERIRQ_CONTINUOUS_MODE
select SOUTHBRIDGE_INTEL_BD82X6X
- select SUPERIO_NUVOTON_NCT6779D
select USE_NATIVE_RAMINIT
+if BOARD_ASUS_H61_SERIES
+
config MAINBOARD_DIR
string
- default "asus/p8h61-m_lx3_r2_0"
+ default "asus/h61-series"
+
+config VARIANT_DIR
+ string
+ default "p8h61-m_lx3_r2_0" if BOARD_ASUS_P8H61_M_LX3_R2_0
config MAINBOARD_PART_NUMBER
string
- default "P8H61-M LX3 R2.0"
+ default "P8H61-M LX3 R2.0" if BOARD_ASUS_P8H61_M_LX3_R2_0
+
+config DEVICETREE
+ string
+ default "variants/\$(CONFIG_VARIANT_DIR)/devicetree.cb"
endif
diff --git a/src/mainboard/asus/h61-series/Kconfig.name b/src/mainboard/asus/h61-series/Kconfig.name
new file mode 100644
index 0000000000..14ca540753
--- /dev/null
+++ b/src/mainboard/asus/h61-series/Kconfig.name
@@ -0,0 +1,8 @@
+config BOARD_ASUS_P8H61_M_LX3_R2_0
+ bool "P8H61-M LX3 R2.0"
+ select BOARD_ASUS_H61_SERIES
+ select BOARD_ROMSIZE_KB_8192
+ select NO_UART_ON_SUPERIO
+ select REALTEK_8168_RESET
+ select RT8168_SET_LED_MODE
+ select SUPERIO_NUVOTON_NCT6779D
diff --git a/src/mainboard/asus/h61-series/Makefile.inc b/src/mainboard/asus/h61-series/Makefile.inc
new file mode 100644
index 0000000000..e339285620
--- /dev/null
+++ b/src/mainboard/asus/h61-series/Makefile.inc
@@ -0,0 +1,8 @@
+## SPDX-License-Identifier: GPL-2.0-only
+
+bootblock-y += variants/$(VARIANT_DIR)/early_init.c
+romstage-y += variants/$(VARIANT_DIR)/early_init.c
+bootblock-y += variants/$(VARIANT_DIR)/gpio.c
+romstage-y += variants/$(VARIANT_DIR)/gpio.c
+ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
+ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/acpi/ec.asl b/src/mainboard/asus/h61-series/acpi/ec.asl
index e69de29bb2..e69de29bb2 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/acpi/ec.asl
+++ b/src/mainboard/asus/h61-series/acpi/ec.asl
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/acpi/platform.asl b/src/mainboard/asus/h61-series/acpi/platform.asl
index 7da03bfddd..7da03bfddd 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/acpi/platform.asl
+++ b/src/mainboard/asus/h61-series/acpi/platform.asl
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/acpi/superio.asl b/src/mainboard/asus/h61-series/acpi/superio.asl
index ee2eabeb75..ee2eabeb75 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/acpi/superio.asl
+++ b/src/mainboard/asus/h61-series/acpi/superio.asl
diff --git a/src/mainboard/asus/h61-series/board_info.txt b/src/mainboard/asus/h61-series/board_info.txt
new file mode 100644
index 0000000000..8f74c04efd
--- /dev/null
+++ b/src/mainboard/asus/h61-series/board_info.txt
@@ -0,0 +1,5 @@
+Category: desktop
+ROM package: DIP-8
+ROM protocol: SPI
+ROM socketed: y
+Flashrom support: y
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/dsdt.asl b/src/mainboard/asus/h61-series/dsdt.asl
index e8e2b3a3e5..e8e2b3a3e5 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/dsdt.asl
+++ b/src/mainboard/asus/h61-series/dsdt.asl
diff --git a/src/mainboard/asus/h61-series/hda_verb.c b/src/mainboard/asus/h61-series/hda_verb.c
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/mainboard/asus/h61-series/hda_verb.c
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/board_info.txt b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/board_info.txt
index 3e3c173aa9..3e3c173aa9 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/board_info.txt
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/board_info.txt
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/data.vbt b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/data.vbt
index e5be40c56b..e5be40c56b 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/data.vbt
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/data.vbt
Binary files differ
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/devicetree.cb b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/devicetree.cb
index 317f9cc22b..317f9cc22b 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/devicetree.cb
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/devicetree.cb
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/early_init.c b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/early_init.c
index 33efaf6e04..33efaf6e04 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/early_init.c
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/early_init.c
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/gma-mainboard.ads b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/gma-mainboard.ads
index 53464cafb4..53464cafb4 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/gma-mainboard.ads
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/gma-mainboard.ads
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/gpio.c b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/gpio.c
index 4c326c4272..4c326c4272 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/gpio.c
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/gpio.c
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/hda_verb.c b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/hda_verb.c
index 7988e2b4ad..7988e2b4ad 100644
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/hda_verb.c
+++ b/src/mainboard/asus/h61-series/variants/p8h61-m_lx3_r2_0/hda_verb.c
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/Kconfig.name b/src/mainboard/asus/p8h61-m_lx3_r2_0/Kconfig.name
deleted file mode 100644
index 6d10dcfc39..0000000000
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/Kconfig.name
+++ /dev/null
@@ -1,2 +0,0 @@
-config BOARD_ASUS_P8H61_M_LX3_R2_0
- bool "P8H61-M LX3 R2.0"
diff --git a/src/mainboard/asus/p8h61-m_lx3_r2_0/Makefile.inc b/src/mainboard/asus/p8h61-m_lx3_r2_0/Makefile.inc
deleted file mode 100644
index 7167e10123..0000000000
--- a/src/mainboard/asus/p8h61-m_lx3_r2_0/Makefile.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-bootblock-y += early_init.c
-bootblock-y += gpio.c
-
-romstage-y += early_init.c
-romstage-y += gpio.c
-
-ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads