From c1055ab07a96927eb738eefe68faa3c19ac060a2 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Thu, 15 Jun 2017 09:22:06 +0200 Subject: soc/intel/skylake: Use common opregion implementation Enable SOC_INTEL_COMMON_GFX_OPREGION for all FSP versions. Allows to get rid of opregion.c, as it's no longer needed. Change-Id: I39190488e12917a09dbf7ee3947a33940ebc290b Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/20222 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/soc/intel/skylake/Kconfig | 2 +- src/soc/intel/skylake/Makefile.inc | 1 - src/soc/intel/skylake/igd.c | 2 +- src/soc/intel/skylake/include/fsp11/soc/ramstage.h | 2 - src/soc/intel/skylake/opregion.c | 50 ---------------------- 5 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 src/soc/intel/skylake/opregion.c (limited to 'src/soc') diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig index af1381af7d..32c2654c4d 100644 --- a/src/soc/intel/skylake/Kconfig +++ b/src/soc/intel/skylake/Kconfig @@ -83,6 +83,7 @@ config CPU_SPECIFIC_OPTIONS select UDELAY_TSC select ACPI_NHLT select HAVE_FSP_GOP + select SOC_INTEL_COMMON_GFX_OPREGION config MAINBOARD_USES_FSP2_0 bool @@ -93,7 +94,6 @@ config USE_FSP2_0_DRIVER depends on MAINBOARD_USES_FSP2_0 select PLATFORM_USES_FSP2_0 select ADD_VBT_DATA_FILE if RUN_FSP_GOP - select SOC_INTEL_COMMON_GFX_OPREGION select POSTCAR_CONSOLE select POSTCAR_STAGE diff --git a/src/soc/intel/skylake/Makefile.inc b/src/soc/intel/skylake/Makefile.inc index 0a8d10577e..7f618d42be 100644 --- a/src/soc/intel/skylake/Makefile.inc +++ b/src/soc/intel/skylake/Makefile.inc @@ -56,7 +56,6 @@ ramstage-y += irq.c ramstage-y += lpc.c ramstage-y += me.c ramstage-y += memmap.c -ramstage-$(CONFIG_PLATFORM_USES_FSP1_1) += opregion.c ramstage-y += pch.c ramstage-y += pei_data.c ramstage-y += pmc.c diff --git a/src/soc/intel/skylake/igd.c b/src/soc/intel/skylake/igd.c index 3f35489262..0974f1f401 100644 --- a/src/soc/intel/skylake/igd.c +++ b/src/soc/intel/skylake/igd.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/soc/intel/skylake/include/fsp11/soc/ramstage.h b/src/soc/intel/skylake/include/fsp11/soc/ramstage.h index a0c8a17bb9..6f9362a4bd 100644 --- a/src/soc/intel/skylake/include/fsp11/soc/ramstage.h +++ b/src/soc/intel/skylake/include/fsp11/soc/ramstage.h @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -31,7 +30,6 @@ void pch_enable_dev(device_t dev); void soc_init_pre_device(void *chip_info); void soc_fsp_load(void); const char *soc_acpi_name(struct device *dev); -int init_igd_opregion(igd_opregion_t *igd_opregion); extern struct pci_operations soc_pci_ops; /* Get igd framebuffer bar */ diff --git a/src/soc/intel/skylake/opregion.c b/src/soc/intel/skylake/opregion.c deleted file mode 100644 index ef7d4ab968..0000000000 --- a/src/soc/intel/skylake/opregion.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2016 Intel Corporation. - * - * 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. - */ - -#include -#include -#include -#include -#include - -enum cb_err init_igd_opregion(igd_opregion_t *opregion) -{ - const optionrom_vbt_t *vbt; - uint32_t vbt_len; - - memset(opregion, 0, sizeof(igd_opregion_t)); - - /* Read VBT table from flash */ - vbt = fsp_get_vbt(&vbt_len); - if (!vbt) - die("vbt data not found"); - - memcpy(&opregion->header.signature, IGD_OPREGION_SIGNATURE, - sizeof(IGD_OPREGION_SIGNATURE) - 1); - memcpy(opregion->header.vbios_version, vbt->coreblock_biosbuild, - sizeof(u32)); - memcpy(opregion->vbt.gvd1, vbt, vbt->hdr_vbt_size < - sizeof(opregion->vbt.gvd1) ? vbt->hdr_vbt_size : - sizeof(opregion->vbt.gvd1)); - - /* Size, in KB, of the entire OpRegion structure (including header)*/ - opregion->header.size = sizeof(igd_opregion_t) / KiB; - opregion->header.version = IGD_OPREGION_VERSION; - - /* We just assume we're mobile for now */ - opregion->header.mailboxes = MAILBOXES_MOBILE; - - return CB_SUCCESS; -} -- cgit v1.2.3