/* If we already have an ISA bridge, bail off */ if (isa_bridge_devnode != NULL) return;
/* For each "isa" node in the system. Note : we do a search by *typeandnotbyname.Itmightbebettertodobynamebutthat's *whatthecodeusedtodoandIdon'twanttobreaktoomuchat *once.Wecanlookintochangingthatseparately
*/
for_each_node_by_type(np, "isa") { /* Look for our hose being a parent */ for (parent = of_get_parent(np); parent;) { if (parent == hose->dn) {
of_node_put(parent); break;
}
tmp = parent;
parent = of_get_parent(parent);
of_node_put(tmp);
} if (parent != NULL) break;
} if (np == NULL) return;
isa_bridge_devnode = np;
/* Now parse the "ranges" property and setup the ISA mapping */
process_ISA_OF_ranges(np, hose->io_base_phys);
/* Set the global ISA io base to indicate we have an ISA bridge */
isa_io_base = ISA_IO_BASE;
/* Clear the global ISA io base to indicate that we have no more *ISAbridge.Notethatdriversdon'tquitehandlethat,though *weshouldprobablydosomethingaboutit.Butdoweeverreally *haveISAbridgesbeingremovedonmachinesusinglegacydevices?
*/
isa_io_base = ISA_IO_BASE;
/* Clear references to the bridge */
of_node_put(isa_bridge_devnode);
isa_bridge_devnode = NULL;
isa_bridge_pcidev = NULL;
/* Unmap the ISA area */
vunmap_range(ISA_IO_BASE, ISA_IO_BASE + 0x10000);
}
switch(action) { case BUS_NOTIFY_ADD_DEVICE: /* Check if we have an early ISA device, without PCI dev */ if (isa_bridge_devnode && isa_bridge_devnode == devnode &&
!isa_bridge_pcidev) {
pr_debug("ISA bridge PCI attached: %s\n",
pci_name(pdev));
isa_bridge_pcidev = pdev;
}
/* Check if we have no ISA device, and this happens to be one, *registeritassuchifithasanOFdevice
*/ if (!isa_bridge_devnode && of_node_is_type(devnode, "isa"))
isa_bridge_find_late(pdev, devnode);
return0; case BUS_NOTIFY_DEL_DEVICE: /* Check if this our existing ISA device */ if (pdev == isa_bridge_pcidev ||
(devnode && devnode == isa_bridge_devnode))
isa_bridge_remove(); return0;
} return0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.