From bd4af105c4b5a0bffc890024d5112a73443c102f Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Sun, 26 Apr 2020 20:43:42 +0200 Subject: soc/intel/gma: Implement fsp_soc_get_igd_bar() in common code `fsp/util.h` draws incompatible UDK headers in. Hence, we have to declare it locally again. Change-Id: Iaa5981088eeb5c36f765d6332ae47a38a6a4c875 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/40729 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/soc/intel/apollolake/Makefile.inc | 1 - src/soc/intel/apollolake/graphics.c | 10 ---------- src/soc/intel/cannonlake/Makefile.inc | 1 - src/soc/intel/cannonlake/graphics.c | 13 ------------- src/soc/intel/common/block/graphics/graphics.c | 11 +++++++++++ src/soc/intel/icelake/Makefile.inc | 1 - src/soc/intel/icelake/graphics.c | 10 ---------- src/soc/intel/jasperlake/Makefile.inc | 1 - src/soc/intel/jasperlake/graphics.c | 10 ---------- src/soc/intel/skylake/graphics.c | 5 ----- src/soc/intel/tigerlake/Makefile.inc | 1 - src/soc/intel/tigerlake/graphics.c | 16 ---------------- 12 files changed, 11 insertions(+), 69 deletions(-) delete mode 100644 src/soc/intel/apollolake/graphics.c delete mode 100644 src/soc/intel/cannonlake/graphics.c delete mode 100644 src/soc/intel/icelake/graphics.c delete mode 100644 src/soc/intel/jasperlake/graphics.c delete mode 100644 src/soc/intel/tigerlake/graphics.c (limited to 'src') diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc index a20a554be1..517c8ca97d 100644 --- a/src/soc/intel/apollolake/Makefile.inc +++ b/src/soc/intel/apollolake/Makefile.inc @@ -54,7 +54,6 @@ ramstage-y += cpu.c ramstage-y += chip.c ramstage-y += cse.c ramstage-y += elog.c -ramstage-y += graphics.c ramstage-y += gspi.c ramstage-y += heci.c ramstage-y += i2c.c diff --git a/src/soc/intel/apollolake/graphics.c b/src/soc/intel/apollolake/graphics.c deleted file mode 100644 index c8d282d837..0000000000 --- a/src/soc/intel/apollolake/graphics.c +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include -#include -#include - -uintptr_t fsp_soc_get_igd_bar(void) -{ - return graphics_get_memory_base(); -} diff --git a/src/soc/intel/cannonlake/Makefile.inc b/src/soc/intel/cannonlake/Makefile.inc index e0605817ae..96f1f97d0e 100644 --- a/src/soc/intel/cannonlake/Makefile.inc +++ b/src/soc/intel/cannonlake/Makefile.inc @@ -36,7 +36,6 @@ ramstage-y += cpu.c ramstage-y += elog.c ramstage-y += finalize.c ramstage-y += fsp_params.c -ramstage-y += graphics.c ramstage-y += gspi.c ramstage-y += i2c.c ramstage-y += lockdown.c diff --git a/src/soc/intel/cannonlake/graphics.c b/src/soc/intel/cannonlake/graphics.c deleted file mode 100644 index 5fbe0d53a3..0000000000 --- a/src/soc/intel/cannonlake/graphics.c +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include -#include -#include -#include -#include -#include - -uintptr_t fsp_soc_get_igd_bar(void) -{ - return graphics_get_memory_base(); -} diff --git a/src/soc/intel/common/block/graphics/graphics.c b/src/soc/intel/common/block/graphics/graphics.c index e2c90600ac..f232ee545f 100644 --- a/src/soc/intel/common/block/graphics/graphics.c +++ b/src/soc/intel/common/block/graphics/graphics.c @@ -12,6 +12,7 @@ #include #include #include +#include /* SoC Overrides */ __weak void graphics_soc_init(struct device *dev) @@ -154,6 +155,16 @@ void graphics_gtt_rmw(unsigned long reg, uint32_t andmask, uint32_t ormask) graphics_gtt_write(reg, val); } +/* + * fsp_soc_get_igd_bar() is declared in , + * but that draws incompatible UDK headers in. + */ +uintptr_t fsp_soc_get_igd_bar(void); +uintptr_t fsp_soc_get_igd_bar(void) +{ + return graphics_get_memory_base(); +} + static const struct device_operations graphics_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, diff --git a/src/soc/intel/icelake/Makefile.inc b/src/soc/intel/icelake/Makefile.inc index f30816e003..05f4846963 100644 --- a/src/soc/intel/icelake/Makefile.inc +++ b/src/soc/intel/icelake/Makefile.inc @@ -35,7 +35,6 @@ ramstage-y += espi.c ramstage-y += finalize.c ramstage-y += fsp_params.c ramstage-y += gpio.c -ramstage-y += graphics.c ramstage-y += lockdown.c ramstage-y += p2sb.c ramstage-y += pmc.c diff --git a/src/soc/intel/icelake/graphics.c b/src/soc/intel/icelake/graphics.c deleted file mode 100644 index c8d282d837..0000000000 --- a/src/soc/intel/icelake/graphics.c +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include -#include -#include - -uintptr_t fsp_soc_get_igd_bar(void) -{ - return graphics_get_memory_base(); -} diff --git a/src/soc/intel/jasperlake/Makefile.inc b/src/soc/intel/jasperlake/Makefile.inc index c5ad4d2095..1cba218700 100644 --- a/src/soc/intel/jasperlake/Makefile.inc +++ b/src/soc/intel/jasperlake/Makefile.inc @@ -36,7 +36,6 @@ ramstage-y += espi.c ramstage-y += finalize.c ramstage-y += fsp_params.c ramstage-y += gpio.c -ramstage-y += graphics.c ramstage-y += lockdown.c ramstage-y += p2sb.c ramstage-y += pmc.c diff --git a/src/soc/intel/jasperlake/graphics.c b/src/soc/intel/jasperlake/graphics.c deleted file mode 100644 index c8d282d837..0000000000 --- a/src/soc/intel/jasperlake/graphics.c +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include -#include -#include - -uintptr_t fsp_soc_get_igd_bar(void) -{ - return graphics_get_memory_base(); -} diff --git a/src/soc/intel/skylake/graphics.c b/src/soc/intel/skylake/graphics.c index 27cb87481c..4ecf67a98d 100644 --- a/src/soc/intel/skylake/graphics.c +++ b/src/soc/intel/skylake/graphics.c @@ -10,11 +10,6 @@ #include #include -uintptr_t fsp_soc_get_igd_bar(void) -{ - return graphics_get_memory_base(); -} - void graphics_soc_init(struct device *dev) { struct soc_intel_skylake_config *conf = config_of(dev); diff --git a/src/soc/intel/tigerlake/Makefile.inc b/src/soc/intel/tigerlake/Makefile.inc index 9ff767cfec..c4f71c78b3 100644 --- a/src/soc/intel/tigerlake/Makefile.inc +++ b/src/soc/intel/tigerlake/Makefile.inc @@ -36,7 +36,6 @@ ramstage-y += espi.c ramstage-y += finalize.c ramstage-y += fsp_params.c ramstage-y += gpio.c -ramstage-y += graphics.c ramstage-y += lockdown.c ramstage-y += p2sb.c ramstage-y += pmc.c diff --git a/src/soc/intel/tigerlake/graphics.c b/src/soc/intel/tigerlake/graphics.c deleted file mode 100644 index 11aea72211..0000000000 --- a/src/soc/intel/tigerlake/graphics.c +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -/* - * This file is created based on Intel Tiger Lake Processor SA Datasheet - * Document number: 571131 - * Chapter number: 4 - */ - -#include -#include -#include - -uintptr_t fsp_soc_get_igd_bar(void) -{ - return graphics_get_memory_base(); -} -- cgit v1.2.3