Lines Matching defs:dev
47 #include <dev/pci/pcivar.h>
48 #include <dev/pci/pcireg.h>
49 #include <dev/ata/ata-all.h>
50 #include <dev/ata/ata-pci.h>
54 static int ata_jmicron_chipinit(device_t dev);
55 static int ata_jmicron_ch_attach(device_t dev);
56 static int ata_jmicron_setmode(device_t dev, int target, int mode);
62 ata_jmicron_probe(device_t dev)
64 struct ata_pci_controller *ctlr = device_get_softc(dev);
78 if (pci_get_vendor(dev) != ATA_JMICRON_ID)
81 if (!(idx = ata_match_chip(dev, ids)))
86 device_set_desc_copy(dev, buffer);
93 ata_jmicron_chipinit(device_t dev)
95 struct ata_pci_controller *ctlr = device_get_softc(dev);
98 if (ata_setup_interrupt(dev, ata_generic_intr))
102 if (pci_read_config(dev, 0xdf, 1) & 0x40) {
112 pci_write_config(dev, 0x40, 0x80c0a131, 4);
113 pci_write_config(dev, 0x80, 0x01200000, 4);
116 child = device_add_child(dev, NULL, -1);
119 bus_generic_attach(dev);
132 ata_jmicron_ch_attach(device_t dev)
134 struct ata_channel *ch = device_get_softc(dev);
137 error = ata_pci_ch_attach(dev);
143 ata_jmicron_setmode(device_t dev, int target, int mode)
145 device_t parent = device_get_parent(dev);
152 ata_print_cable(dev, "controller");