Hello Matt DeVillier, Angel Pons, Patrick Rudolph,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/40729
to review the following change.
Change subject: soc/intel/gma: Implement fsp_soc_get_igd_bar() in common code ......................................................................
soc/intel/gma: Implement fsp_soc_get_igd_bar() in common code
Change-Id: Iaa5981088eeb5c36f765d6332ae47a38a6a4c875 Signed-off-by: Nico Huber nico.h@gmx.de --- M src/soc/intel/apollolake/Makefile.inc D src/soc/intel/apollolake/graphics.c M src/soc/intel/cannonlake/Makefile.inc D src/soc/intel/cannonlake/graphics.c M src/soc/intel/common/block/graphics/graphics.c M src/soc/intel/icelake/Makefile.inc D src/soc/intel/icelake/graphics.c M src/soc/intel/jasperlake/Makefile.inc D src/soc/intel/jasperlake/graphics.c M src/soc/intel/skylake/graphics.c M src/soc/intel/tigerlake/Makefile.inc D src/soc/intel/tigerlake/graphics.c 12 files changed, 7 insertions(+), 134 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/40729/1
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc index a20a554..517c8ca 100644 --- a/src/soc/intel/apollolake/Makefile.inc +++ b/src/soc/intel/apollolake/Makefile.inc @@ -54,7 +54,6 @@ 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 8deb548..0000000 --- a/src/soc/intel/apollolake/graphics.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * - * 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; either version 2 of the License, or - * (at your option) any later version. - * - * 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 <fsp/util.h> -#include <intelblocks/graphics.h> -#include <types.h> - -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 c744e99..b1523be 100644 --- a/src/soc/intel/cannonlake/Makefile.inc +++ b/src/soc/intel/cannonlake/Makefile.inc @@ -36,7 +36,6 @@ 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 cdc4a6a..0000000 --- a/src/soc/intel/cannonlake/graphics.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * - * 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; either version 2 of the License, or - * (at your option) any later version. - * - * 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 <arch/acpi.h> -#include <fsp/util.h> -#include <device/device.h> -#include <drivers/intel/gma/i915_reg.h> -#include <intelblocks/graphics.h> -#include <types.h> - -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 206810f..7a0cebe 100644 --- a/src/soc/intel/common/block/graphics/graphics.c +++ b/src/soc/intel/common/block/graphics/graphics.c @@ -23,8 +23,10 @@ #include <drivers/intel/gma/i915.h> #include <drivers/intel/gma/libgfxinit.h> #include <drivers/intel/gma/opregion.h> +#include <fsp/util.h> #include <intelblocks/graphics.h> #include <soc/pci_devs.h> +#include <types.h>
/* SoC Overrides */ __weak void graphics_soc_init(struct device *dev) @@ -166,6 +168,11 @@ graphics_gtt_write(reg, val); }
+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 f30816e..05f4846 100644 --- a/src/soc/intel/icelake/Makefile.inc +++ b/src/soc/intel/icelake/Makefile.inc @@ -35,7 +35,6 @@ 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 8deb548..0000000 --- a/src/soc/intel/icelake/graphics.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * - * 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; either version 2 of the License, or - * (at your option) any later version. - * - * 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 <fsp/util.h> -#include <intelblocks/graphics.h> -#include <types.h> - -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 4a65adc..ba63433 100644 --- a/src/soc/intel/jasperlake/Makefile.inc +++ b/src/soc/intel/jasperlake/Makefile.inc @@ -36,7 +36,6 @@ 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 8deb548..0000000 --- a/src/soc/intel/jasperlake/graphics.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * - * 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; either version 2 of the License, or - * (at your option) any later version. - * - * 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 <fsp/util.h> -#include <intelblocks/graphics.h> -#include <types.h> - -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 8285ad9..a33b7ac 100644 --- a/src/soc/intel/skylake/graphics.c +++ b/src/soc/intel/skylake/graphics.c @@ -11,11 +11,6 @@ #include <soc/ramstage.h> #include <types.h>
-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 f62bfaf..626cb06 100644 --- a/src/soc/intel/tigerlake/Makefile.inc +++ b/src/soc/intel/tigerlake/Makefile.inc @@ -36,7 +36,6 @@ 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 90d3a02..0000000 --- a/src/soc/intel/tigerlake/graphics.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * - * 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; either version 2 of the License, or - * (at your option) any later version. - * - * 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. - */ - -/* - * This file is created based on Intel Tiger Lake Processor SA Datasheet - * Document number: 571131 - * Chapter number: 4 - */ - -#include <fsp/util.h> -#include <intelblocks/graphics.h> -#include <types.h> - -uintptr_t fsp_soc_get_igd_bar(void) -{ - return graphics_get_memory_base(); -}