[coreboot-gerrit] Change in coreboot[master]: sandybridge/acpi: remove unnessary check of PCI IDs

Vagiz Tarkhanov (Code Review) gerrit at coreboot.org
Thu Sep 28 21:42:37 CEST 2017


Vagiz Tarkhanov has uploaded this change for review. ( https://review.coreboot.org/21754


Change subject: sandybridge/acpi: remove unnessary check of PCI IDs
......................................................................

sandybridge/acpi: remove unnessary check of PCI IDs

DRAM Controller is always 00.0 No need to check its PCI ID.

Change-Id: I9c5f3e5658905e464491579f8da01aa6a03bd3b7
Signed-off-by: Vagiz Tarkhanov <rakkin at autistici.org>
---
M src/northbridge/intel/sandybridge/acpi.c
M src/northbridge/intel/sandybridge/sandybridge.h
2 files changed, 1 insertion(+), 7 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/21754/1

diff --git a/src/northbridge/intel/sandybridge/acpi.c b/src/northbridge/intel/sandybridge/acpi.c
index 658000aa..78225d0 100644
--- a/src/northbridge/intel/sandybridge/acpi.c
+++ b/src/northbridge/intel/sandybridge/acpi.c
@@ -26,14 +26,11 @@
 
 unsigned long acpi_fill_mcfg(unsigned long current)
 {
-	device_t dev;
 	u32 pciexbar = 0;
 	u32 pciexbar_reg;
 	int max_buses;
 
-	dev = dev_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_SB, 0);
-	if (!dev)
-		dev = dev_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_IB, 0);
+	struct device *const dev = dev_find_slot(0, PCI_DEVFN(0, 0));
 	if (!dev)
 		return current;
 
diff --git a/src/northbridge/intel/sandybridge/sandybridge.h b/src/northbridge/intel/sandybridge/sandybridge.h
index 9d88c70..dd1a58c 100644
--- a/src/northbridge/intel/sandybridge/sandybridge.h
+++ b/src/northbridge/intel/sandybridge/sandybridge.h
@@ -201,9 +201,6 @@
 #ifndef __ASSEMBLER__
 static inline void barrier(void) { asm("" ::: "memory"); }
 
-#define PCI_DEVICE_ID_SB 0x0104
-#define PCI_DEVICE_ID_IB 0x0154
-
 #ifdef __SMM__
 void intel_sandybridge_finalize_smm(void);
 #else /* !__SMM__ */

-- 
To view, visit https://review.coreboot.org/21754
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c5f3e5658905e464491579f8da01aa6a03bd3b7
Gerrit-Change-Number: 21754
Gerrit-PatchSet: 1
Gerrit-Owner: Vagiz Tarkhanov <rakkin at autistici.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170928/0f2c6c3c/attachment.html>


More information about the coreboot-gerrit mailing list