Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38090 )
Change subject: mb/hp/2570p: Transform into variant-enabled structure ......................................................................
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.
Change-Id: I0b68e524b57e3705e91e3cd98be5571b3554bd67 Signed-off-by: Angel Pons th3fanbus@gmail.com --- D src/mainboard/hp/2570p/Kconfig D src/mainboard/hp/2570p/Kconfig.name A src/mainboard/hp/snb_ivb_laptops/Kconfig C src/mainboard/hp/snb_ivb_laptops/Kconfig.name R src/mainboard/hp/snb_ivb_laptops/Makefile.inc R src/mainboard/hp/snb_ivb_laptops/acpi/ec.asl R src/mainboard/hp/snb_ivb_laptops/acpi/platform.asl R src/mainboard/hp/snb_ivb_laptops/acpi/superio.asl R src/mainboard/hp/snb_ivb_laptops/acpi_tables.c A src/mainboard/hp/snb_ivb_laptops/board_info.txt R src/mainboard/hp/snb_ivb_laptops/cmos.default R src/mainboard/hp/snb_ivb_laptops/cmos.layout R src/mainboard/hp/snb_ivb_laptops/dsdt.asl A src/mainboard/hp/snb_ivb_laptops/hda_verb.c R src/mainboard/hp/snb_ivb_laptops/mainboard.c R src/mainboard/hp/snb_ivb_laptops/variants/2570p/board_info.txt R src/mainboard/hp/snb_ivb_laptops/variants/2570p/devicetree.cb R src/mainboard/hp/snb_ivb_laptops/variants/2570p/early_init.c R src/mainboard/hp/snb_ivb_laptops/variants/2570p/gma-mainboard.ads R src/mainboard/hp/snb_ivb_laptops/variants/2570p/gpio.c R src/mainboard/hp/snb_ivb_laptops/variants/2570p/hda_verb.c 21 files changed, 84 insertions(+), 73 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/38090/1
diff --git a/src/mainboard/hp/2570p/Kconfig b/src/mainboard/hp/2570p/Kconfig deleted file mode 100644 index f7d2781..0000000 --- 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 af13735..0000000 --- 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 0000000..c92039f --- /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/2570p/Makefile.inc b/src/mainboard/hp/snb_ivb_laptops/Kconfig.name similarity index 61% copy from src/mainboard/hp/2570p/Makefile.inc copy to src/mainboard/hp/snb_ivb_laptops/Kconfig.name index 1d25875..ecef3b3 100644 --- a/src/mainboard/hp/2570p/Makefile.inc +++ b/src/mainboard/hp/snb_ivb_laptops/Kconfig.name @@ -1,7 +1,7 @@ ## ## This file is part of the coreboot project. ## -## Copyright (C) 2011 The ChromiumOS Authors. All rights reserved. +## 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 @@ -13,9 +13,13 @@ ## GNU General Public License for more details. ##
-bootblock-y += gpio.c -romstage-y += gpio.c +config BOARD_HP_2570P + bool "EliteBook 2570p"
-ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads -bootblock-y += early_init.c -romstage-y += early_init.c + 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 similarity index 63% rename from src/mainboard/hp/2570p/Makefile.inc rename to src/mainboard/hp/snb_ivb_laptops/Makefile.inc index 1d25875..663f81a 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 similarity index 100% rename from src/mainboard/hp/2570p/acpi/ec.asl rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/acpi/platform.asl rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/acpi/superio.asl rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/acpi_tables.c rename to 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 0000000..ef4e5dd --- /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 similarity index 100% rename from src/mainboard/hp/2570p/cmos.default rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/cmos.layout rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/dsdt.asl rename to 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 0000000..e69de29 --- /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 similarity index 100% rename from src/mainboard/hp/2570p/mainboard.c rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/board_info.txt rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/devicetree.cb rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/early_init.c rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/gma-mainboard.ads rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/gpio.c rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/hda_verb.c rename to src/mainboard/hp/snb_ivb_laptops/variants/2570p/hda_verb.c
Hello Iru Cai (vimacs), build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38090
to look at the new patch set (#2).
Change subject: mb/hp/2570p: Transform into variant-enabled structure ......................................................................
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 --- D src/mainboard/hp/2570p/Kconfig D src/mainboard/hp/2570p/Kconfig.name A src/mainboard/hp/snb_ivb_laptops/Kconfig C src/mainboard/hp/snb_ivb_laptops/Kconfig.name R src/mainboard/hp/snb_ivb_laptops/Makefile.inc R src/mainboard/hp/snb_ivb_laptops/acpi/ec.asl R src/mainboard/hp/snb_ivb_laptops/acpi/platform.asl R src/mainboard/hp/snb_ivb_laptops/acpi/superio.asl R src/mainboard/hp/snb_ivb_laptops/acpi_tables.c A src/mainboard/hp/snb_ivb_laptops/board_info.txt R src/mainboard/hp/snb_ivb_laptops/cmos.default R src/mainboard/hp/snb_ivb_laptops/cmos.layout R src/mainboard/hp/snb_ivb_laptops/dsdt.asl A src/mainboard/hp/snb_ivb_laptops/hda_verb.c R src/mainboard/hp/snb_ivb_laptops/mainboard.c R src/mainboard/hp/snb_ivb_laptops/variants/2570p/board_info.txt R src/mainboard/hp/snb_ivb_laptops/variants/2570p/devicetree.cb R src/mainboard/hp/snb_ivb_laptops/variants/2570p/early_init.c R src/mainboard/hp/snb_ivb_laptops/variants/2570p/gma-mainboard.ads R src/mainboard/hp/snb_ivb_laptops/variants/2570p/gpio.c R src/mainboard/hp/snb_ivb_laptops/variants/2570p/hda_verb.c 21 files changed, 84 insertions(+), 73 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/38090/2
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38090 )
Change subject: mb/hp/2570p: Transform into variant-enabled structure ......................................................................
Patch Set 2: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/38090/2/src/mainboard/hp/snb_ivb_la... File src/mainboard/hp/snb_ivb_laptops/Kconfig.name:
https://review.coreboot.org/c/coreboot/+/38090/2/src/mainboard/hp/snb_ivb_la... PS2, Line 24: select MAINBOARD_USES_IFD_GBE_REGION Can this be moved to Kconfig?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38090 )
Change subject: mb/hp/2570p: Transform into variant-enabled structure ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38090/2/src/mainboard/hp/snb_ivb_la... File src/mainboard/hp/snb_ivb_laptops/Kconfig.name:
https://review.coreboot.org/c/coreboot/+/38090/2/src/mainboard/hp/snb_ivb_la... PS2, Line 24: select MAINBOARD_USES_IFD_GBE_REGION
Can this be moved to Kconfig?
It could, but why? I would have to use `if` clauses or something else to handle them.
In any case, it would be easier to do this after the patch train.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38090 )
Change subject: mb/hp/2570p: Transform into variant-enabled structure ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38090/2/src/mainboard/hp/snb_ivb_la... File src/mainboard/hp/snb_ivb_laptops/Kconfig.name:
https://review.coreboot.org/c/coreboot/+/38090/2/src/mainboard/hp/snb_ivb_la... PS2, Line 24: select MAINBOARD_USES_IFD_GBE_REGION
It could, but why? I would have to use `if` clauses or something else to handle them. […]
It seems I am not the first person to do this:
https://review.coreboot.org/c/coreboot/+/38277/6/src/mainboard/google/dedede...
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38090 )
Change subject: mb/hp/2570p: Transform into variant-enabled structure ......................................................................
Patch Set 2: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/38090/2/src/mainboard/hp/snb_ivb_la... File src/mainboard/hp/snb_ivb_laptops/Kconfig.name:
https://review.coreboot.org/c/coreboot/+/38090/2/src/mainboard/hp/snb_ivb_la... PS2, Line 24: select MAINBOARD_USES_IFD_GBE_REGION
It seems I am not the first person to do this: […]
I meant this particular select because it's common to all variants (in this patch train). Anyway, can be done later...
Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38090 )
Change subject: mb/hp/2570p: Transform into variant-enabled structure ......................................................................
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 --- D src/mainboard/hp/2570p/Kconfig D src/mainboard/hp/2570p/Kconfig.name A src/mainboard/hp/snb_ivb_laptops/Kconfig C src/mainboard/hp/snb_ivb_laptops/Kconfig.name R src/mainboard/hp/snb_ivb_laptops/Makefile.inc R src/mainboard/hp/snb_ivb_laptops/acpi/ec.asl R src/mainboard/hp/snb_ivb_laptops/acpi/platform.asl R src/mainboard/hp/snb_ivb_laptops/acpi/superio.asl R src/mainboard/hp/snb_ivb_laptops/acpi_tables.c A src/mainboard/hp/snb_ivb_laptops/board_info.txt R src/mainboard/hp/snb_ivb_laptops/cmos.default R src/mainboard/hp/snb_ivb_laptops/cmos.layout R src/mainboard/hp/snb_ivb_laptops/dsdt.asl A src/mainboard/hp/snb_ivb_laptops/hda_verb.c R src/mainboard/hp/snb_ivb_laptops/mainboard.c R src/mainboard/hp/snb_ivb_laptops/variants/2570p/board_info.txt R src/mainboard/hp/snb_ivb_laptops/variants/2570p/devicetree.cb R src/mainboard/hp/snb_ivb_laptops/variants/2570p/early_init.c R src/mainboard/hp/snb_ivb_laptops/variants/2570p/gma-mainboard.ads R src/mainboard/hp/snb_ivb_laptops/variants/2570p/gpio.c R src/mainboard/hp/snb_ivb_laptops/variants/2570p/hda_verb.c 21 files changed, 84 insertions(+), 73 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/mainboard/hp/2570p/Kconfig b/src/mainboard/hp/2570p/Kconfig deleted file mode 100644 index f7d2781..0000000 --- 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 af13735..0000000 --- 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 0000000..c92039f --- /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/2570p/Makefile.inc b/src/mainboard/hp/snb_ivb_laptops/Kconfig.name similarity index 61% copy from src/mainboard/hp/2570p/Makefile.inc copy to src/mainboard/hp/snb_ivb_laptops/Kconfig.name index 1d25875..ecef3b3 100644 --- a/src/mainboard/hp/2570p/Makefile.inc +++ b/src/mainboard/hp/snb_ivb_laptops/Kconfig.name @@ -1,7 +1,7 @@ ## ## This file is part of the coreboot project. ## -## Copyright (C) 2011 The ChromiumOS Authors. All rights reserved. +## 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 @@ -13,9 +13,13 @@ ## GNU General Public License for more details. ##
-bootblock-y += gpio.c -romstage-y += gpio.c +config BOARD_HP_2570P + bool "EliteBook 2570p"
-ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads -bootblock-y += early_init.c -romstage-y += early_init.c + 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 similarity index 63% rename from src/mainboard/hp/2570p/Makefile.inc rename to src/mainboard/hp/snb_ivb_laptops/Makefile.inc index 1d25875..663f81a 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 similarity index 100% rename from src/mainboard/hp/2570p/acpi/ec.asl rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/acpi/platform.asl rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/acpi/superio.asl rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/acpi_tables.c rename to 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 0000000..ef4e5dd --- /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 similarity index 100% rename from src/mainboard/hp/2570p/cmos.default rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/cmos.layout rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/dsdt.asl rename to 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 0000000..e69de29 --- /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 similarity index 100% rename from src/mainboard/hp/2570p/mainboard.c rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/board_info.txt rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/devicetree.cb rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/early_init.c rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/gma-mainboard.ads rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/gpio.c rename to 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 similarity index 100% rename from src/mainboard/hp/2570p/hda_verb.c rename to src/mainboard/hp/snb_ivb_laptops/variants/2570p/hda_verb.c