Lines Matching refs:pdev
63 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
69 pci_write_config_byte(pdev, 0x62 + ap->port_no,
74 pci_write_config_byte(pdev, 0x64 + 4*ap->port_no + slave,
78 pci_write_config_byte(pdev, 0x66 + 4*ap->port_no + slave,
110 static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
126 rc = pcim_enable_device(pdev);
131 pci_read_config_byte(pdev, 0x60, &pcicfg);
144 dev_warn(&pdev->dev, "DMA mode disabled. Enabling.\n");
145 pci_write_config_byte(pdev, 0x60, pcicfg | 0x40);
150 host = ata_host_alloc_pinfo(&pdev->dev, ppi, 2);
155 if (pci_enable_device_io(pdev)) {
156 dev_err(&pdev->dev, "unable to configure BAR2.\n");
160 if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) {
161 dev_err(&pdev->dev, "unable to configure DMA mask.\n");
166 iomap[0] = devm_ioport_map(&pdev->dev, cmd_port[0], 8);
167 iomap[1] = devm_ioport_map(&pdev->dev, ctl_port[0], 1);
168 iomap[2] = devm_ioport_map(&pdev->dev, cmd_port[1], 8);
169 iomap[3] = devm_ioport_map(&pdev->dev, ctl_port[1], 1);
170 iomap[4] = pcim_iomap(pdev, 2, 0);
198 pci_set_master(pdev);
210 rc = devm_request_irq(&pdev->dev, irq[ap->port_no],
224 * @pdev: PCI device
230 static int cs5520_reinit_one(struct pci_dev *pdev)
232 struct ata_host *host = pci_get_drvdata(pdev);
236 rc = ata_pci_device_do_resume(pdev);
240 pci_read_config_byte(pdev, 0x60, &pcicfg);
242 pci_write_config_byte(pdev, 0x60, pcicfg | 0x40);
250 * @pdev: PCI device
259 static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
261 struct ata_host *host = pci_get_drvdata(pdev);
265 pci_save_state(pdev);