summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2017-07-31 10:49:29 +0530
committerMartin Roth <martinroth@google.com>2017-08-03 20:30:19 +0000
commit5a752f7b8f66d66d65eb1ba2396930f5d0ef6450 (patch)
treef5457ee547ef088c63d166020b03fd16b34ef0a5 /src/soc/intel
parentd00d682670e1cf5c031a57274d7c4242f7a8193d (diff)
soc/intel/apollolake: Skip disabled IGD device
If IGD PCI device is disabled: 1. BAR for the device will be 0. 2. There is no need to allocate framebuffer for this device. Some early SOCs don't have GFX model fuse by default hence we need to add a check to ensure PCI device is enable. This code to avoid die inside coreboot for missing resources. Change-Id: Ied677e8c77fa7b166b016da458caad0e4702b5d8 Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/20830 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/apollolake/graphics.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/soc/intel/apollolake/graphics.c b/src/soc/intel/apollolake/graphics.c
index c873825f01..90859d5c48 100644
--- a/src/soc/intel/apollolake/graphics.c
+++ b/src/soc/intel/apollolake/graphics.c
@@ -27,7 +27,13 @@
uintptr_t fsp_soc_get_igd_bar(void)
{
- return find_resource(SA_DEV_IGD, PCI_BASE_ADDRESS_2)->base;
+ device_t dev = SA_DEV_IGD;
+
+ /* Check if IGD PCI device is disabled */
+ if (!dev->enabled)
+ return 0;
+
+ return find_resource(dev, PCI_BASE_ADDRESS_2)->base;
}
static void igd_set_resources(struct device *dev)