Lines Matching refs:dev
38 #include <dev/ofw/openfirm.h>
39 #include <dev/ofw/ofw_pci.h>
40 #include <dev/ofw/ofw_bus.h>
41 #include <dev/ofw/ofw_bus_subr.h>
43 #include <dev/pci/pcivar.h>
44 #include <dev/pci/pcireg.h>
45 #include <dev/pci/pcib_private.h>
53 static phandle_t ofw_pcib_pci_get_node(device_t bus, device_t dev);
54 static int ofw_pcib_pci_route_interrupt(device_t bridge, device_t dev,
76 * generic routines only need the dev, secbus and subbus members
89 ofw_pcib_pci_probe(device_t dev)
92 if ((pci_get_class(dev) != PCIC_BRIDGE) ||
93 (pci_get_subclass(dev) != PCIS_BRIDGE_PCI)) {
97 if (ofw_bus_get_node(dev) == -1)
100 device_set_desc(dev, "OFW PCI-PCI bridge");
105 ofw_pcib_pci_attach(device_t dev)
109 sc = device_get_softc(dev);
110 sc->ops_pcib_sc.dev = dev;
111 sc->ops_node = ofw_bus_get_node(dev);
116 pcib_attach_common(dev);
117 return (pcib_attach_child(dev));
121 ofw_pcib_pci_get_node(device_t bridge, device_t dev)
129 ofw_pcib_pci_route_interrupt(device_t bridge, device_t dev, int intpin)
145 reg.phys_hi = (pci_get_bus(dev) << OFW_PCI_PHYS_HI_BUSSHIFT) |
146 (pci_get_slot(dev) << OFW_PCI_PHYS_HI_DEVICESHIFT) |
147 (pci_get_function(dev) << OFW_PCI_PHYS_HI_FUNCTIONSHIFT);
149 intrcells = ofw_bus_lookup_imap(ofw_bus_get_node(dev), ii, ®,
158 mintr[0] = ofw_bus_map_intr(dev, iparent, intrcells,
167 return (pcib_route_interrupt(bridge, dev, intpin));