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>
This commit is contained in:
Angel Pons 2020-01-01 23:57:30 +01:00 committed by Nico Huber
parent 63fd650e2e
commit 8abb05ac45
21 changed files with 99 additions and 67 deletions

View File

@ -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

View File

@ -1,2 +0,0 @@
config BOARD_HP_2570P
bool "EliteBook 2570p"

View File

@ -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

View File

@ -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

View File

@ -13,9 +13,9 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
bootblock-y += gpio.c bootblock-y += variants/$(VARIANT_DIR)/early_init.c
romstage-y += gpio.c romstage-y += variants/$(VARIANT_DIR)/early_init.c
bootblock-y += variants/$(VARIANT_DIR)/gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads romstage-y += variants/$(VARIANT_DIR)/gpio.c
bootblock-y += early_init.c ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
romstage-y += early_init.c ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads

View File

@ -0,0 +1,4 @@
Category: laptop
ROM protocol: SPI
ROM package: SOIC-8 or SOIC-16
ROM socketed: n