summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/apollolake/graphics.c26
-rw-r--r--src/soc/intel/apollolake/include/soc/pci_devs.h3
2 files changed, 6 insertions, 23 deletions
diff --git a/src/soc/intel/apollolake/graphics.c b/src/soc/intel/apollolake/graphics.c
index ba3d5dbf2b..9b4dbc97da 100644
--- a/src/soc/intel/apollolake/graphics.c
+++ b/src/soc/intel/apollolake/graphics.c
@@ -22,37 +22,17 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
+#include <soc/pci_devs.h>
#include <soc/pci_ids.h>
#include <soc/intel/common/opregion.h>
-static uintptr_t framebuffer_bar = (uintptr_t)NULL;
-
-void lb_framebuffer(struct lb_header *header)
+uintptr_t fsp_soc_get_igd_bar(void)
{
- enum cb_err ret;
- struct lb_framebuffer *framebuffer;
-
- framebuffer = (void *)lb_new_record(header);
- ret = fsp_fill_lb_framebuffer(framebuffer);
- if (ret != CB_SUCCESS) {
- printk(BIOS_ALERT, "FSP did not return a valid framebuffer\n");
- return;
- }
-
- if (!framebuffer_bar) {
- printk(BIOS_ALERT, "Framebuffer BAR invalid (00:02.0 BAR2)\n");
- return;
- }
-
- /* Resource allocator can move the BAR around after FSP configures it */
- framebuffer->physical_address = framebuffer_bar;
- printk(BIOS_DEBUG, "Graphics framebuffer located at 0x%llx\n",
- framebuffer->physical_address);
+ return find_resource(IGD_DEV, PCI_BASE_ADDRESS_2)->base;
}
static void igd_set_resources(struct device *dev)
{
- framebuffer_bar = find_resource(dev, PCI_BASE_ADDRESS_2)->base;
pci_dev_set_resources(dev);
}
diff --git a/src/soc/intel/apollolake/include/soc/pci_devs.h b/src/soc/intel/apollolake/include/soc/pci_devs.h
index b7519ed799..0d9e28847c 100644
--- a/src/soc/intel/apollolake/include/soc/pci_devs.h
+++ b/src/soc/intel/apollolake/include/soc/pci_devs.h
@@ -34,6 +34,9 @@
#define NB_DEVFN _PCI_DEVFN(0, 0)
#define NB_DEV_ROOT _PCI_DEV(0x0, 0)
+#define IGD_DEV _PCI_DEV(0x2, 0)
+#define IGD_DEVFN _PCI_DEVFN(0x2, 0)
+
#define P2SB_DEV _PCI_DEV(0xd, 0)
#define P2SB_DEVFN _PCI_DEVFN(0xd, 0)