summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2022-03-15 19:29:23 +1100
committerFelix Held <felix-coreboot@felixheld.de>2022-04-04 19:08:02 +0000
commit3605dac10b88baa22c7a74145a72474aa45a38c4 (patch)
treef147485c689a8c7f5a749a708de1de368100b283
parent311ddf3b81b276553fb3a1973343b5ca31f85dbe (diff)
mb/hp/z220_series: Convert z220_sff_workstation into variant
No functional change, just refactoring to make room for CMT variant. Built with BUILD_TIMELESS=1 and no config included before and after. $ diff master.rom build/coreboot.rom $ TESTED: boots to SeaBIOS on HP Z220 SFF Flashed bios region internally, mainboard also has FDO (flash descriptor override) jumper that allows r/w to whole flash. Change-Id: I6aaac75216b2d7c8bb48801454ce616ace3b1422 Signed-off-by: Damien Zammit <damien@zamaudio.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62808 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r--src/mainboard/hp/z220_series/Kconfig (renamed from src/mainboard/hp/z220_sff_workstation/Kconfig)24
-rw-r--r--src/mainboard/hp/z220_series/Kconfig.name (renamed from src/mainboard/hp/z220_sff_workstation/Kconfig.name)0
-rw-r--r--src/mainboard/hp/z220_series/Makefile.inc (renamed from src/mainboard/hp/z220_sff_workstation/Makefile.inc)4
-rw-r--r--src/mainboard/hp/z220_series/acpi/ec.asl (renamed from src/mainboard/hp/z220_sff_workstation/acpi/ec.asl)0
-rw-r--r--src/mainboard/hp/z220_series/acpi/platform.asl (renamed from src/mainboard/hp/z220_sff_workstation/acpi/platform.asl)0
-rw-r--r--src/mainboard/hp/z220_series/acpi/superio.asl (renamed from src/mainboard/hp/z220_sff_workstation/acpi/superio.asl)0
-rw-r--r--src/mainboard/hp/z220_series/board_info.txt (renamed from src/mainboard/hp/z220_sff_workstation/board_info.txt)0
-rw-r--r--src/mainboard/hp/z220_series/cmos.default (renamed from src/mainboard/hp/z220_sff_workstation/cmos.default)0
-rw-r--r--src/mainboard/hp/z220_series/cmos.layout (renamed from src/mainboard/hp/z220_sff_workstation/cmos.layout)0
-rw-r--r--src/mainboard/hp/z220_series/data.vbt (renamed from src/mainboard/hp/z220_sff_workstation/data.vbt)bin3777 -> 3777 bytes
-rw-r--r--src/mainboard/hp/z220_series/devicetree.cb (renamed from src/mainboard/hp/z220_sff_workstation/devicetree.cb)1
-rw-r--r--src/mainboard/hp/z220_series/dsdt.asl (renamed from src/mainboard/hp/z220_sff_workstation/dsdt.asl)0
-rw-r--r--src/mainboard/hp/z220_series/early_init.c (renamed from src/mainboard/hp/z220_sff_workstation/early_init.c)0
-rw-r--r--src/mainboard/hp/z220_series/gma-mainboard.ads (renamed from src/mainboard/hp/z220_sff_workstation/gma-mainboard.ads)0
-rw-r--r--src/mainboard/hp/z220_series/hda_verb.c (renamed from src/mainboard/hp/z220_sff_workstation/hda_verb.c)0
-rw-r--r--src/mainboard/hp/z220_series/mainboard.c (renamed from src/mainboard/hp/z220_sff_workstation/mainboard.c)0
-rw-r--r--src/mainboard/hp/z220_series/variants/z220_sff_workstation/gpio.c (renamed from src/mainboard/hp/z220_sff_workstation/gpio.c)0
-rw-r--r--src/mainboard/hp/z220_series/variants/z220_sff_workstation/overridetree.cb12
18 files changed, 32 insertions, 9 deletions
diff --git a/src/mainboard/hp/z220_sff_workstation/Kconfig b/src/mainboard/hp/z220_series/Kconfig
index d7066653dd..ee5b5b4f46 100644
--- a/src/mainboard/hp/z220_sff_workstation/Kconfig
+++ b/src/mainboard/hp/z220_series/Kconfig
@@ -1,7 +1,5 @@
-if BOARD_HP_Z220_SFF_WORKSTATION
-
-config BOARD_SPECIFIC_OPTIONS
- def_bool y
+config BOARD_HP_Z220_SERIES_COMMON
+ def_bool n
select BOARD_ROMSIZE_KB_16384
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
@@ -20,6 +18,11 @@ config BOARD_SPECIFIC_OPTIONS
select GFX_GMA_ANALOG_I2C_HDMI_B
select MAINBOARD_USES_IFD_GBE_REGION
+config BOARD_HP_Z220_SFF_WORKSTATION
+ select BOARD_HP_Z220_SERIES_COMMON
+
+if BOARD_HP_Z220_SERIES_COMMON
+
config VBOOT
select VBOOT_VBNV_CMOS
select VBOOT_NO_BOARD_SUPPORT
@@ -36,10 +39,19 @@ config CBFS_SIZE
default 0x570000
config MAINBOARD_DIR
- default "hp/z220_sff_workstation"
+ default "hp/z220_series"
+
+config VARIANT_DIR
+ default "z220_sff_workstation" if BOARD_HP_Z220_SFF_WORKSTATION
config MAINBOARD_PART_NUMBER
- default "HP Z220 SFF Workstation"
+ default "HP Z220 SFF Workstation" if BOARD_HP_Z220_SFF_WORKSTATION
+
+config OVERRIDE_DEVICETREE
+ default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb"
+
+config INTEL_GMA_VBT_FILE
+ default "src/mainboard/\$(MAINBOARDDIR)/data.vbt"
config DRAM_RESET_GATE_GPIO
int
diff --git a/src/mainboard/hp/z220_sff_workstation/Kconfig.name b/src/mainboard/hp/z220_series/Kconfig.name
index 037ebc0694..037ebc0694 100644
--- a/src/mainboard/hp/z220_sff_workstation/Kconfig.name
+++ b/src/mainboard/hp/z220_series/Kconfig.name
diff --git a/src/mainboard/hp/z220_sff_workstation/Makefile.inc b/src/mainboard/hp/z220_series/Makefile.inc
index f0b34f9840..00426a88b9 100644
--- a/src/mainboard/hp/z220_sff_workstation/Makefile.inc
+++ b/src/mainboard/hp/z220_series/Makefile.inc
@@ -1,5 +1,5 @@
-bootblock-y += gpio.c
-romstage-y += gpio.c
+bootblock-y += variants/$(VARIANT_DIR)/gpio.c
+romstage-y += variants/$(VARIANT_DIR)/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/hp/z220_sff_workstation/acpi/ec.asl b/src/mainboard/hp/z220_series/acpi/ec.asl
index e69de29bb2..e69de29bb2 100644
--- a/src/mainboard/hp/z220_sff_workstation/acpi/ec.asl
+++ b/src/mainboard/hp/z220_series/acpi/ec.asl
diff --git a/src/mainboard/hp/z220_sff_workstation/acpi/platform.asl b/src/mainboard/hp/z220_series/acpi/platform.asl
index 861d3cdf71..861d3cdf71 100644
--- a/src/mainboard/hp/z220_sff_workstation/acpi/platform.asl
+++ b/src/mainboard/hp/z220_series/acpi/platform.asl
diff --git a/src/mainboard/hp/z220_sff_workstation/acpi/superio.asl b/src/mainboard/hp/z220_series/acpi/superio.asl
index 506c6d4c2d..506c6d4c2d 100644
--- a/src/mainboard/hp/z220_sff_workstation/acpi/superio.asl
+++ b/src/mainboard/hp/z220_series/acpi/superio.asl
diff --git a/src/mainboard/hp/z220_sff_workstation/board_info.txt b/src/mainboard/hp/z220_series/board_info.txt
index 4d6f6f98b7..4d6f6f98b7 100644
--- a/src/mainboard/hp/z220_sff_workstation/board_info.txt
+++ b/src/mainboard/hp/z220_series/board_info.txt
diff --git a/src/mainboard/hp/z220_sff_workstation/cmos.default b/src/mainboard/hp/z220_series/cmos.default
index 6d27a79c66..6d27a79c66 100644
--- a/src/mainboard/hp/z220_sff_workstation/cmos.default
+++ b/src/mainboard/hp/z220_series/cmos.default
diff --git a/src/mainboard/hp/z220_sff_workstation/cmos.layout b/src/mainboard/hp/z220_series/cmos.layout
index 1fc83b1a55..1fc83b1a55 100644
--- a/src/mainboard/hp/z220_sff_workstation/cmos.layout
+++ b/src/mainboard/hp/z220_series/cmos.layout
diff --git a/src/mainboard/hp/z220_sff_workstation/data.vbt b/src/mainboard/hp/z220_series/data.vbt
index c1fd6d1e13..c1fd6d1e13 100644
--- a/src/mainboard/hp/z220_sff_workstation/data.vbt
+++ b/src/mainboard/hp/z220_series/data.vbt
Binary files differ
diff --git a/src/mainboard/hp/z220_sff_workstation/devicetree.cb b/src/mainboard/hp/z220_series/devicetree.cb
index 0de9cfabef..4611bec140 100644
--- a/src/mainboard/hp/z220_sff_workstation/devicetree.cb
+++ b/src/mainboard/hp/z220_series/devicetree.cb
@@ -30,7 +30,6 @@ chip northbridge/intel/sandybridge
register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }"
register "pcie_port_coalesce" = "true"
register "sata_interface_speed_support" = "0x3"
- register "sata_port_map" = "0xf"
register "spi_lvscc" = "0x2005"
register "spi_uvscc" = "0x2005"
diff --git a/src/mainboard/hp/z220_sff_workstation/dsdt.asl b/src/mainboard/hp/z220_series/dsdt.asl
index 6203060a7d..6203060a7d 100644
--- a/src/mainboard/hp/z220_sff_workstation/dsdt.asl
+++ b/src/mainboard/hp/z220_series/dsdt.asl
diff --git a/src/mainboard/hp/z220_sff_workstation/early_init.c b/src/mainboard/hp/z220_series/early_init.c
index c0d84f5127..c0d84f5127 100644
--- a/src/mainboard/hp/z220_sff_workstation/early_init.c
+++ b/src/mainboard/hp/z220_series/early_init.c
diff --git a/src/mainboard/hp/z220_sff_workstation/gma-mainboard.ads b/src/mainboard/hp/z220_series/gma-mainboard.ads
index 686f7d44db..686f7d44db 100644
--- a/src/mainboard/hp/z220_sff_workstation/gma-mainboard.ads
+++ b/src/mainboard/hp/z220_series/gma-mainboard.ads
diff --git a/src/mainboard/hp/z220_sff_workstation/hda_verb.c b/src/mainboard/hp/z220_series/hda_verb.c
index 27ab4b5275..27ab4b5275 100644
--- a/src/mainboard/hp/z220_sff_workstation/hda_verb.c
+++ b/src/mainboard/hp/z220_series/hda_verb.c
diff --git a/src/mainboard/hp/z220_sff_workstation/mainboard.c b/src/mainboard/hp/z220_series/mainboard.c
index 75dc3302a5..75dc3302a5 100644
--- a/src/mainboard/hp/z220_sff_workstation/mainboard.c
+++ b/src/mainboard/hp/z220_series/mainboard.c
diff --git a/src/mainboard/hp/z220_sff_workstation/gpio.c b/src/mainboard/hp/z220_series/variants/z220_sff_workstation/gpio.c
index 401681f659..401681f659 100644
--- a/src/mainboard/hp/z220_sff_workstation/gpio.c
+++ b/src/mainboard/hp/z220_series/variants/z220_sff_workstation/gpio.c
diff --git a/src/mainboard/hp/z220_series/variants/z220_sff_workstation/overridetree.cb b/src/mainboard/hp/z220_series/variants/z220_sff_workstation/overridetree.cb
new file mode 100644
index 0000000000..c31bf336d1
--- /dev/null
+++ b/src/mainboard/hp/z220_series/variants/z220_sff_workstation/overridetree.cb
@@ -0,0 +1,12 @@
+## SPDX-License-Identifier: GPL-2.0-only
+
+chip northbridge/intel/sandybridge
+ device domain 0 on
+ subsystemid 0x103c 0x1791 inherit
+
+ chip southbridge/intel/bd82x6x
+ register "sata_port_map" = "0xf"
+ device pci 1c.4 on end # dummy setting
+ end
+ end
+end