Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6221
-gerrit
commit 5b0c84fb7da2dcb7e617548082af0b0a811d9920
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Wed Jul 9 00:25:10 2014 +1000
device_romstage: Add a way to find tdev struct from port/dev no.
NOTFORMERGE
When trying to loop through all the devices in romstage, there was
no function to translate a PnP port and device number to the
corresponding device structure.
Change-Id: I73bd396a5247077aa09e01c0f22510a8b2777ab8
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
src/device/device_romstage.c | 21 +++++++++++++++++++++
src/include/device/device.h | 1 +
2 files changed, 22 insertions(+)
diff --git a/src/device/device_romstage.c b/src/device/device_romstage.c
index 987fdad..df0df6a 100644
--- a/src/device/device_romstage.c
+++ b/src/device/device_romstage.c
@@ -101,3 +101,24 @@ ROMSTAGE_CONST struct device *dev_find_slot_on_smbus(unsigned int bus,
}
return result;
}
+
+/**
+ * Given a PnP port and a device number, find the device structure.
+ *
+ * @param port The I/O port.
+ * @param device Logical device number.
+ * @return Pointer to the device structure (if found), 0 otherwise.
+ */
+ROMSTAGE_CONST struct device *dev_find_slot_pnp(u16 port, u16 device)
+{
+ ROMSTAGE_CONST struct device *dev;
+
+ for (dev = all_devices; dev; dev = dev->next) {
+ if ((dev->path.type == DEVICE_PATH_PNP) &&
+ (dev->path.pnp.port == port) &&
+ (dev->path.pnp.device == device)) {
+ return dev;
+ }
+ }
+ return 0;
+}
diff --git a/src/include/device/device.h b/src/include/device/device.h
index ec17adf..77778db 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -248,6 +248,7 @@ ROMSTAGE_CONST struct device *dev_find_next_pci_device(
ROMSTAGE_CONST struct device *previous_dev);
ROMSTAGE_CONST struct device * dev_find_slot_on_smbus (unsigned int bus,
unsigned int addr);
+ROMSTAGE_CONST struct device * dev_find_slot_pnp(u16 port, u16 device);
#endif
the following patch was just integrated into master:
commit e1163c1782914c348a586b16321e09d81c371cbe
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Mon Jul 7 23:44:40 2014 +1000
mainboard: Trivial - drop trailing blank lines at EOF in .h
Change-Id: I4a4ee99468e5f1dae8412ae565a34290493db726
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6201
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Tested-by: build bot (Jenkins)
See http://review.coreboot.org/6201 for details.
-gerrit
the following patch was just integrated into master:
commit 7974471e379e3aaefc0ecd5524c408e69537444b
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Mon Jul 7 23:42:58 2014 +1000
mainboard: Trivial - drop trailing blank lines at EOF
Change-Id: I05d6d22664155ac8478e665733f816776e277c22
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6200
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
See http://review.coreboot.org/6200 for details.
-gerrit
the following patch was just integrated into master:
commit 1f19d3494142bd12fa6d75f5761865346da5bcc5
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Tue Jul 8 00:29:53 2014 +1000
vendorcode/google: Trivial - drop trailing blank lines at EOF
Change-Id: Ib8d26d62566e42a78abc282dc9e351774b8e2faf
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6212
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
See http://review.coreboot.org/6212 for details.
-gerrit
the following patch was just integrated into master:
commit 16a8206d52fa8aeb7ed2e59c6180b0d8c7355a1b
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Tue Jul 8 00:18:27 2014 +1000
vendorcode/intel: Trivial - drop trailing blank lines at EOF
Change-Id: Iea9e95981e5e87f2890841e7a0cf45ba93ce84eb
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6211
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
See http://review.coreboot.org/6211 for details.
-gerrit
the following patch was just integrated into master:
commit 234781e074919c6e6e5b78f6d323d214f1aed3a9
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Mon Jul 7 23:54:59 2014 +1000
northbridge: Trivial - drop trailing blank lines at EOF
Change-Id: I9515778e97cc5ae0e366b888da90a651ae5994fe
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6210
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
See http://review.coreboot.org/6210 for details.
-gerrit