Lines Matching refs:pdev

74 static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
193 struct pci_dev *pdev, in vt6421_init_addrs() argument
196 unsigned long reg_addr = pci_resource_start(pdev, port); in vt6421_init_addrs()
197 unsigned long bmdma_addr = pci_resource_start(pdev, 4) + (port * 8); in vt6421_init_addrs()
205 scr_addr = vt6421_scr_addr(pci_resource_start(pdev, 5), port); in vt6421_init_addrs()
211 static struct ata_probe_ent *vt6420_init_probe_ent(struct pci_dev *pdev) in vt6420_init_probe_ent() argument
216 probe_ent = ata_pci_init_native_mode(pdev, &ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY); in vt6420_init_probe_ent()
221 svia_scr_addr(pci_resource_start(pdev, 5), 0); in vt6420_init_probe_ent()
223 svia_scr_addr(pci_resource_start(pdev, 5), 1); in vt6420_init_probe_ent()
228 static struct ata_probe_ent *vt6421_init_probe_ent(struct pci_dev *pdev) in vt6421_init_probe_ent() argument
238 probe_ent->dev = pci_dev_to_dev(pdev); in vt6421_init_probe_ent()
246 probe_ent->irq = pdev->irq; in vt6421_init_probe_ent()
253 vt6421_init_addrs(probe_ent, pdev, i); in vt6421_init_probe_ent()
258 static void svia_configure(struct pci_dev *pdev) in svia_configure() argument
262 pci_read_config_byte(pdev, PCI_INTERRUPT_LINE, &tmp8); in svia_configure()
263 pdev_printk(KERN_INFO, pdev, "routed to hard irq line %d\n", in svia_configure()
267 pci_read_config_byte(pdev, SATA_CHAN_ENAB, &tmp8); in svia_configure()
269 pdev_printk(KERN_DEBUG, pdev, in svia_configure()
273 pci_write_config_byte(pdev, SATA_CHAN_ENAB, tmp8); in svia_configure()
277 pci_read_config_byte(pdev, SATA_INT_GATE, &tmp8); in svia_configure()
279 pdev_printk(KERN_DEBUG, pdev, in svia_configure()
283 pci_write_config_byte(pdev, SATA_INT_GATE, tmp8); in svia_configure()
287 pci_read_config_byte(pdev, SATA_NATIVE_MODE, &tmp8); in svia_configure()
289 pdev_printk(KERN_DEBUG, pdev, in svia_configure()
293 pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8); in svia_configure()
297 static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) in svia_init_one() argument
309 pdev_printk(KERN_DEBUG, pdev, "version " DRV_VERSION "\n"); in svia_init_one()
311 rc = pci_enable_device(pdev); in svia_init_one()
315 rc = pci_request_regions(pdev, DRV_NAME); in svia_init_one()
322 pci_read_config_byte(pdev, SATA_PATA_SHARING, &tmp8); in svia_init_one()
324 pdev_printk(KERN_ERR, pdev, in svia_init_one()
337 if ((pci_resource_start(pdev, i) == 0) || in svia_init_one()
338 (pci_resource_len(pdev, i) < bar_sizes[i])) { in svia_init_one()
339 pdev_printk(KERN_ERR, pdev, in svia_init_one()
342 pci_resource_start(pdev, i), in svia_init_one()
343 pci_resource_len(pdev, i)); in svia_init_one()
348 rc = pci_set_dma_mask(pdev, ATA_DMA_MASK); in svia_init_one()
351 rc = pci_set_consistent_dma_mask(pdev, ATA_DMA_MASK); in svia_init_one()
356 probe_ent = vt6420_init_probe_ent(pdev); in svia_init_one()
358 probe_ent = vt6421_init_probe_ent(pdev); in svia_init_one()
361 pdev_printk(KERN_ERR, pdev, "out of memory\n"); in svia_init_one()
366 svia_configure(pdev); in svia_init_one()
368 pci_set_master(pdev); in svia_init_one()
375 pci_release_regions(pdev); in svia_init_one()
378 pci_disable_device(pdev); in svia_init_one()