summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-01-01 23:57:30 +0100
committerNico Huber <nico.h@gmx.de>2020-01-20 09:00:24 +0000
commit8abb05ac457bb28c2cf0d210bad0d28cd2aeb7f1 (patch)
treef0d6a45b207778206bdf1de051d43e3ea8ad41fd /src
parent63fd650e2e28984100f3ceb6d9f546fad08171b6 (diff)
mb/hp/2570p: Transform into variant-enabled structure
Get ready to squash all the HP Sandy Bridge and Ivy Bridge laptops together, so as to factor out lots of repeated code. Tested with BUILD_TIMELESS=1, binary does not change. Change-Id: I0b68e524b57e3705e91e3cd98be5571b3554bd67 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38090 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/hp/2570p/Kconfig59
-rw-r--r--src/mainboard/hp/2570p/Kconfig.name2
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/Kconfig64
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/Kconfig.name25
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/Makefile.inc (renamed from src/mainboard/hp/2570p/Makefile.inc)12
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/acpi/ec.asl (renamed from src/mainboard/hp/2570p/acpi/ec.asl)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/acpi/platform.asl (renamed from src/mainboard/hp/2570p/acpi/platform.asl)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/acpi/superio.asl (renamed from src/mainboard/hp/2570p/acpi/superio.asl)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/acpi_tables.c (renamed from src/mainboard/hp/2570p/acpi_tables.c)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/board_info.txt4
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/cmos.default (renamed from src/mainboard/hp/2570p/cmos.default)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/cmos.layout (renamed from src/mainboard/hp/2570p/cmos.layout)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/dsdt.asl (renamed from src/mainboard/hp/2570p/dsdt.asl)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/hda_verb.c0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/mainboard.c (renamed from src/mainboard/hp/2570p/mainboard.c)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/variants/2570p/board_info.txt (renamed from src/mainboard/hp/2570p/board_info.txt)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/variants/2570p/devicetree.cb (renamed from src/mainboard/hp/2570p/devicetree.cb)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/variants/2570p/early_init.c (renamed from src/mainboard/hp/2570p/early_init.c)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/variants/2570p/gma-mainboard.ads (renamed from src/mainboard/hp/2570p/gma-mainboard.ads)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/variants/2570p/gpio.c (renamed from src/mainboard/hp/2570p/gpio.c)0
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/variants/2570p/hda_verb.c (renamed from src/mainboard/hp/2570p/hda_verb.c)0
21 files changed, 99 insertions, 67 deletions
diff --git a/src/mainboard/hp/2570p/Kconfig b/src/mainboard/hp/2570p/Kconfig
deleted file mode 100644
index f7d27818ea..0000000000
--- a/src/mainboard/hp/2570p/Kconfig
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# This file is part of the coreboot project.
-#
-# Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-
-if BOARD_HP_2570P
-
-config BOARD_SPECIFIC_OPTIONS
- def_bool y
- select BOARD_ROMSIZE_KB_16384
- select EC_HP_KBC1126
- select GFX_GMA_INTERNAL_IS_LVDS
- select HAVE_ACPI_RESUME
- select HAVE_ACPI_TABLES
- select HAVE_CMOS_DEFAULT
- select HAVE_OPTION_TABLE
- select INTEL_INT15
- select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_USES_IFD_GBE_REGION
- select NORTHBRIDGE_INTEL_SANDYBRIDGE
- select SERIRQ_CONTINUOUS_MODE
- select SOUTHBRIDGE_INTEL_C216
- select SYSTEM_TYPE_LAPTOP
- select USE_NATIVE_RAMINIT
-
-config MAINBOARD_DIR
- string
- default "hp/2570p"
-
-config MAINBOARD_PART_NUMBER
- string
- default "EliteBook 2570p"
-
-config VGA_BIOS_FILE
- string
- default "pci8086,0166.rom"
-
-config VGA_BIOS_ID
- string
- default "8086,0166"
-
-config MAX_CPUS
- int
- default 8
-
-config USBDEBUG_HCD_INDEX
- int
- default 2
-endif
diff --git a/src/mainboard/hp/2570p/Kconfig.name b/src/mainboard/hp/2570p/Kconfig.name
deleted file mode 100644
index af13735ab5..0000000000
--- a/src/mainboard/hp/2570p/Kconfig.name
+++ /dev/null
@@ -1,2 +0,0 @@
-config BOARD_HP_2570P
- bool "EliteBook 2570p"
diff --git a/src/mainboard/hp/snb_ivb_laptops/Kconfig b/src/mainboard/hp/snb_ivb_laptops/Kconfig
new file mode 100644
index 0000000000..c92039fbe2
--- /dev/null
+++ b/src/mainboard/hp/snb_ivb_laptops/Kconfig
@@ -0,0 +1,64 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+config BOARD_HP_SNB_IVB_LAPTOPS
+ def_bool n
+ select EC_HP_KBC1126
+ select HAVE_ACPI_RESUME
+ select HAVE_ACPI_TABLES
+ select HAVE_CMOS_DEFAULT
+ select HAVE_OPTION_TABLE
+ select NORTHBRIDGE_INTEL_SANDYBRIDGE
+ select SERIRQ_CONTINUOUS_MODE
+ select SYSTEM_TYPE_LAPTOP
+ select USE_NATIVE_RAMINIT
+
+if BOARD_HP_SNB_IVB_LAPTOPS
+
+config MAINBOARD_DIR
+ string
+ default "hp/snb_ivb_laptops"
+
+config VARIANT_DIR
+ string
+ default "2570p" if BOARD_HP_2570P
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "EliteBook 2570p" if BOARD_HP_2570P
+
+config DEVICETREE
+ string
+ default "variants/$(CONFIG_VARIANT_DIR)/devicetree.cb"
+
+config VGA_BIOS_FILE
+ string
+ default "pci8086,0116.rom" if SOUTHBRIDGE_INTEL_BD82X6X
+ default "pci8086,0166.rom" if SOUTHBRIDGE_INTEL_C216
+
+config VGA_BIOS_ID
+ string
+ default "8086,0116" if SOUTHBRIDGE_INTEL_BD82X6X
+ default "8086,0166" if SOUTHBRIDGE_INTEL_C216
+
+config MAX_CPUS
+ int
+ default 8
+
+config USBDEBUG_HCD_INDEX
+ int
+ default 2 if BOARD_HP_2570P
+
+endif
diff --git a/src/mainboard/hp/snb_ivb_laptops/Kconfig.name b/src/mainboard/hp/snb_ivb_laptops/Kconfig.name
new file mode 100644
index 0000000000..ecef3b339c
--- /dev/null
+++ b/src/mainboard/hp/snb_ivb_laptops/Kconfig.name
@@ -0,0 +1,25 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+config BOARD_HP_2570P
+ bool "EliteBook 2570p"
+
+ select BOARD_HP_SNB_IVB_LAPTOPS
+ select BOARD_ROMSIZE_KB_16384
+ select GFX_GMA_INTERNAL_IS_LVDS
+ select INTEL_INT15
+ select MAINBOARD_HAS_LIBGFXINIT
+ select MAINBOARD_USES_IFD_GBE_REGION
+ select SOUTHBRIDGE_INTEL_C216
diff --git a/src/mainboard/hp/2570p/Makefile.inc b/src/mainboard/hp/snb_ivb_laptops/Makefile.inc
index 1d258758be..663f81adad 100644
--- a/src/mainboard/hp/2570p/Makefile.inc
+++ b/src/mainboard/hp/snb_ivb_laptops/Makefile.inc
@@ -13,9 +13,9 @@
## GNU General Public License for more details.
##
-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
+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/hp/2570p/acpi/ec.asl b/src/mainboard/hp/snb_ivb_laptops/acpi/ec.asl
index ac65fb399f..ac65fb399f 100644
--- a/src/mainboard/hp/2570p/acpi/ec.asl
+++ b/src/mainboard/hp/snb_ivb_laptops/acpi/ec.asl
diff --git a/src/mainboard/hp/2570p/acpi/platform.asl b/src/mainboard/hp/snb_ivb_laptops/acpi/platform.asl
index fe0f936a61..fe0f936a61 100644
--- a/src/mainboard/hp/2570p/acpi/platform.asl
+++ b/src/mainboard/hp/snb_ivb_laptops/acpi/platform.asl
diff --git a/src/mainboard/hp/2570p/acpi/superio.asl b/src/mainboard/hp/snb_ivb_laptops/acpi/superio.asl
index b3ea115115..b3ea115115 100644
--- a/src/mainboard/hp/2570p/acpi/superio.asl
+++ b/src/mainboard/hp/snb_ivb_laptops/acpi/superio.asl
diff --git a/src/mainboard/hp/2570p/acpi_tables.c b/src/mainboard/hp/snb_ivb_laptops/acpi_tables.c
index 114f6e1228..114f6e1228 100644
--- a/src/mainboard/hp/2570p/acpi_tables.c
+++ b/src/mainboard/hp/snb_ivb_laptops/acpi_tables.c
diff --git a/src/mainboard/hp/snb_ivb_laptops/board_info.txt b/src/mainboard/hp/snb_ivb_laptops/board_info.txt
new file mode 100644
index 0000000000..ef4e5dd6c5
--- /dev/null
+++ b/src/mainboard/hp/snb_ivb_laptops/board_info.txt
@@ -0,0 +1,4 @@
+Category: laptop
+ROM protocol: SPI
+ROM package: SOIC-8 or SOIC-16
+ROM socketed: n
diff --git a/src/mainboard/hp/2570p/cmos.default b/src/mainboard/hp/snb_ivb_laptops/cmos.default
index ba33ddff5c..ba33ddff5c 100644
--- a/src/mainboard/hp/2570p/cmos.default
+++ b/src/mainboard/hp/snb_ivb_laptops/cmos.default
diff --git a/src/mainboard/hp/2570p/cmos.layout b/src/mainboard/hp/snb_ivb_laptops/cmos.layout
index f1526f34c9..f1526f34c9 100644
--- a/src/mainboard/hp/2570p/cmos.layout
+++ b/src/mainboard/hp/snb_ivb_laptops/cmos.layout
diff --git a/src/mainboard/hp/2570p/dsdt.asl b/src/mainboard/hp/snb_ivb_laptops/dsdt.asl
index 81f45c155e..81f45c155e 100644
--- a/src/mainboard/hp/2570p/dsdt.asl
+++ b/src/mainboard/hp/snb_ivb_laptops/dsdt.asl
diff --git a/src/mainboard/hp/snb_ivb_laptops/hda_verb.c b/src/mainboard/hp/snb_ivb_laptops/hda_verb.c
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/mainboard/hp/snb_ivb_laptops/hda_verb.c
diff --git a/src/mainboard/hp/2570p/mainboard.c b/src/mainboard/hp/snb_ivb_laptops/mainboard.c
index effba5ea6e..effba5ea6e 100644
--- a/src/mainboard/hp/2570p/mainboard.c
+++ b/src/mainboard/hp/snb_ivb_laptops/mainboard.c
diff --git a/src/mainboard/hp/2570p/board_info.txt b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/board_info.txt
index 51ecd98c1f..51ecd98c1f 100644
--- a/src/mainboard/hp/2570p/board_info.txt
+++ b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/board_info.txt
diff --git a/src/mainboard/hp/2570p/devicetree.cb b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/devicetree.cb
index dcf91162d3..dcf91162d3 100644
--- a/src/mainboard/hp/2570p/devicetree.cb
+++ b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/devicetree.cb
diff --git a/src/mainboard/hp/2570p/early_init.c b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/early_init.c
index b72dd304a4..b72dd304a4 100644
--- a/src/mainboard/hp/2570p/early_init.c
+++ b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/early_init.c
diff --git a/src/mainboard/hp/2570p/gma-mainboard.ads b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/gma-mainboard.ads
index 1944a24b02..1944a24b02 100644
--- a/src/mainboard/hp/2570p/gma-mainboard.ads
+++ b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/gma-mainboard.ads
diff --git a/src/mainboard/hp/2570p/gpio.c b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/gpio.c
index c8646fe1fc..c8646fe1fc 100644
--- a/src/mainboard/hp/2570p/gpio.c
+++ b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/gpio.c
diff --git a/src/mainboard/hp/2570p/hda_verb.c b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/hda_verb.c
index 71556c0b96..71556c0b96 100644
--- a/src/mainboard/hp/2570p/hda_verb.c
+++ b/src/mainboard/hp/snb_ivb_laptops/variants/2570p/hda_verb.c