Lines Matching refs:dev
28 __FBSDID("$FreeBSD: releng/11.0/sys/dev/pci/hostb_pci.c 298955 2016-05-03 03:41:25Z pfg $");
35 #include <dev/pci/pcivar.h>
36 #include <dev/pci/pcireg.h>
46 pci_hostb_probe(device_t dev)
50 id = pci_get_devid(dev);
62 if (pci_get_class(dev) == PCIC_BRIDGE &&
63 pci_get_subclass(dev) == PCIS_BRIDGE_HOST) {
64 device_set_desc(dev, "Host to PCI bridge");
65 device_quiet(dev);
72 pci_hostb_attach(device_t dev)
75 bus_generic_probe(dev);
81 if (pci_find_cap(dev, PCIY_AGP, NULL) == 0)
82 device_add_child(dev, "agp", -1);
83 bus_generic_attach(dev);
90 pci_hostb_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
93 return (BUS_READ_IVAR(device_get_parent(dev), dev, which, result));
97 pci_hostb_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
104 pci_hostb_alloc_resource(device_t dev, device_t child, int type, int *rid,
108 return (bus_alloc_resource(dev, type, rid, start, end, count, flags));
112 pci_hostb_release_resource(device_t dev, device_t child, int type, int rid,
116 return (bus_release_resource(dev, type, rid, r));
122 pci_hostb_read_config(device_t dev, device_t child, int reg, int width)
125 return (pci_read_config(dev, reg, width));
129 pci_hostb_write_config(device_t dev, device_t child, int reg,
133 pci_write_config(dev, reg, val, width);
137 pci_hostb_enable_busmaster(device_t dev, device_t child)
140 device_printf(dev, "child %s requested pci_enable_busmaster\n",
142 return (pci_enable_busmaster(dev));
146 pci_hostb_disable_busmaster(device_t dev, device_t child)
149 device_printf(dev, "child %s requested pci_disable_busmaster\n",
151 return (pci_disable_busmaster(dev));
155 pci_hostb_enable_io(device_t dev, device_t child, int space)
158 device_printf(dev, "child %s requested pci_enable_io\n",
160 return (pci_enable_io(dev, space));
164 pci_hostb_disable_io(device_t dev, device_t child, int space)
167 device_printf(dev, "child %s requested pci_disable_io\n",
169 return (pci_disable_io(dev, space));
173 pci_hostb_set_powerstate(device_t dev, device_t child, int state)
176 device_printf(dev, "child %s requested pci_set_powerstate\n",
178 return (pci_set_powerstate(dev, state));
182 pci_hostb_get_powerstate(device_t dev, device_t child)
185 device_printf(dev, "child %s requested pci_get_powerstate\n",
187 return (pci_get_powerstate(dev));
191 pci_hostb_assign_interrupt(device_t dev, device_t child)
194 device_printf(dev, "child %s requested pci_assign_interrupt\n",
196 return (PCI_ASSIGN_INTERRUPT(device_get_parent(dev), dev));
200 pci_hostb_find_cap(device_t dev, device_t child, int capability,
204 return (pci_find_cap(dev, capability, capreg));
208 pci_hostb_find_extcap(device_t dev, device_t child, int capability,
212 return (pci_find_extcap(dev, capability, capreg));
216 pci_hostb_find_htcap(device_t dev, device_t child, int capability,
220 return (pci_find_htcap(dev, capability, capreg));