Author: mcayland Date: Sun Nov 10 21:14:30 2013 New Revision: 1233 URL: http://tracker.coreboot.org/trac/openbios/changeset/1233
Log: prep: Add support for detection of i82378 ISA bridge
Here we simply allow the ISA bridge to be detected during PCI bus enumeration and implement a stub callback so that devices can be added later.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/drivers/pci.c trunk/openbios-devel/drivers/pci_database.c trunk/openbios-devel/drivers/pci_database.h trunk/openbios-devel/include/drivers/pci.h
Modified: trunk/openbios-devel/drivers/pci.c ============================================================================== --- trunk/openbios-devel/drivers/pci.c Fri Oct 25 12:38:24 2013 (r1232) +++ trunk/openbios-devel/drivers/pci.c Sun Nov 10 21:14:30 2013 (r1233) @@ -868,6 +868,11 @@ return 0; }
+int i82378_config_cb(const pci_config_t *config) +{ + return 0; +} + static void ob_pci_add_properties(phandle_t phandle, pci_addr addr, const pci_dev_t *pci_dev, const pci_config_t *config, int num_bars)
Modified: trunk/openbios-devel/drivers/pci_database.c ============================================================================== --- trunk/openbios-devel/drivers/pci_database.c Fri Oct 25 12:38:24 2013 (r1232) +++ trunk/openbios-devel/drivers/pci_database.c Sun Nov 10 21:14:30 2013 (r1233) @@ -390,6 +390,21 @@ }, };
+static const pci_dev_t isabrg_devices[] = { + { + PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, NULL, + "isa", "isa", "pci8086,484\0", + 1, 1, 1, + i82378_config_cb, NULL, + }, + { + 0xFFFF, 0xFFFF, + NULL, NULL, NULL, NULL, + -1, -1, -1, + NULL, NULL, + }, +}; + static const pci_subclass_t bridg_subclass[] = { { PCI_SUBCLASS_BRIDGE_HOST, "PCI host bridge", @@ -398,7 +413,7 @@ }, { PCI_SUBCLASS_BRIDGE_ISA, "ISA bridge", - NULL, NULL, NULL, + "isa", isabrg_devices, NULL, NULL, NULL, }, {
Modified: trunk/openbios-devel/drivers/pci_database.h ============================================================================== --- trunk/openbios-devel/drivers/pci_database.h Fri Oct 25 12:38:24 2013 (r1232) +++ trunk/openbios-devel/drivers/pci_database.h Sun Nov 10 21:14:30 2013 (r1233) @@ -37,6 +37,7 @@ extern int sabre_config_cb(const pci_config_t *config); extern int bridge_config_cb(const pci_config_t *config); extern int ebus_config_cb(const pci_config_t *config); +extern int i82378_config_cb(const pci_config_t *config);
static inline int pci_compat_len(const pci_dev_t *dev) {
Modified: trunk/openbios-devel/include/drivers/pci.h ============================================================================== --- trunk/openbios-devel/include/drivers/pci.h Fri Oct 25 12:38:24 2013 (r1232) +++ trunk/openbios-devel/include/drivers/pci.h Sun Nov 10 21:14:30 2013 (r1233) @@ -210,6 +210,7 @@ #define PCI_DEVICE_ID_VIRTIO_BLOCK 0x1001
#define PCI_VENDOR_ID_INTEL 0x8086 +#define PCI_DEVICE_ID_INTEL_82378 0x0484 #define PCI_DEVICE_ID_INTEL_82441 0x1237
#endif /* _H_PCI */