Lines Matching refs:pdev
62 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
68 pci_write_config_byte(pdev, 0x62 + ap->port_no,
73 pci_write_config_byte(pdev, 0x64 + 4*ap->port_no + slave,
77 pci_write_config_byte(pdev, 0x66 + 4*ap->port_no + slave,
108 static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
124 rc = pcim_enable_device(pdev);
129 pci_read_config_byte(pdev, 0x60, &pcicfg);
142 dev_warn(&pdev->dev, "DMA mode disabled. Enabling.\n");
143 pci_write_config_byte(pdev, 0x60, pcicfg | 0x40);
148 host = ata_host_alloc_pinfo(&pdev->dev, ppi, 2);
153 if (pci_enable_device_io(pdev)) {
158 if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) {
164 iomap[0] = devm_ioport_map(&pdev->dev, cmd_port[0], 8);
165 iomap[1] = devm_ioport_map(&pdev->dev, ctl_port[0], 1);
166 iomap[2] = devm_ioport_map(&pdev->dev, cmd_port[1], 8);
167 iomap[3] = devm_ioport_map(&pdev->dev, ctl_port[1], 1);
168 iomap[4] = pcim_iomap(pdev, 2, 0);
196 pci_set_master(pdev);
208 rc = devm_request_irq(&pdev->dev, irq[ap->port_no],
222 * @pdev: PCI device
228 static int cs5520_reinit_one(struct pci_dev *pdev)
230 struct ata_host *host = pci_get_drvdata(pdev);
234 rc = ata_pci_device_do_resume(pdev);
238 pci_read_config_byte(pdev, 0x60, &pcicfg);
240 pci_write_config_byte(pdev, 0x60, pcicfg | 0x40);
248 * @pdev: PCI device
256 static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
258 struct ata_host *host = pci_get_drvdata(pdev);
265 pci_save_state(pdev);