Lines Matching refs:pdev

87 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);  in sil680_cable_detect()  local
90 pci_read_config_byte(pdev, addr, &ata66); in sil680_cable_detect()
119 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in sil680_set_piomode() local
131 pci_write_config_word(pdev, addr, speed_p[pio]); in sil680_set_piomode()
132 pci_write_config_word(pdev, tfaddr, speed_t[lowest_pio]); in sil680_set_piomode()
134 pci_read_config_word(pdev, tfaddr-2, &reg); in sil680_set_piomode()
135 pci_read_config_byte(pdev, addr_mask, &mode); in sil680_set_piomode()
144 pci_write_config_word(pdev, tfaddr-2, reg); in sil680_set_piomode()
145 pci_write_config_byte(pdev, addr_mask, mode); in sil680_set_piomode()
167 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in sil680_set_dmamode() local
175 pci_read_config_byte(pdev, 0x8A, &scsc); in sil680_set_dmamode()
176 pci_read_config_byte(pdev, addr_mask, &mode); in sil680_set_dmamode()
177 pci_read_config_word(pdev, ma, &multi); in sil680_set_dmamode()
178 pci_read_config_word(pdev, ua, &ultra); in sil680_set_dmamode()
195 pci_write_config_byte(pdev, addr_mask, mode); in sil680_set_dmamode()
196 pci_write_config_word(pdev, ma, multi); in sil680_set_dmamode()
197 pci_write_config_word(pdev, ua, ultra); in sil680_set_dmamode()
222 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in sil680_sff_irq_check() local
226 pci_read_config_byte(pdev, addr, &val); in sil680_sff_irq_check()
255 static u8 sil680_init_chip(struct pci_dev *pdev, int *try_mmio) in sil680_init_chip() argument
260 pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, in sil680_init_chip()
261 pdev->revision ? 1 : 255); in sil680_init_chip()
263 pci_write_config_byte(pdev, 0x80, 0x00); in sil680_init_chip()
264 pci_write_config_byte(pdev, 0x84, 0x00); in sil680_init_chip()
266 pci_read_config_byte(pdev, 0x8A, &tmpbyte); in sil680_init_chip()
268 dev_dbg(&pdev->dev, "sil680: BA5_EN = %d clock = %02X\n", in sil680_init_chip()
274 *try_mmio = (tmpbyte & 1) || pci_resource_start(pdev, 5); in sil680_init_chip()
280 pci_write_config_byte(pdev, 0x8A, tmpbyte|0x10); in sil680_init_chip()
285 pci_write_config_byte(pdev, 0x8A, tmpbyte & ~0x20); in sil680_init_chip()
295 pci_read_config_byte(pdev, 0x8A, &tmpbyte); in sil680_init_chip()
296 dev_dbg(&pdev->dev, "sil680: BA5_EN = %d clock = %02X\n", in sil680_init_chip()
299 pci_write_config_byte(pdev, 0xA1, 0x72); in sil680_init_chip()
300 pci_write_config_word(pdev, 0xA2, 0x328A); in sil680_init_chip()
301 pci_write_config_dword(pdev, 0xA4, 0x62DD62DD); in sil680_init_chip()
302 pci_write_config_dword(pdev, 0xA8, 0x43924392); in sil680_init_chip()
303 pci_write_config_dword(pdev, 0xAC, 0x40094009); in sil680_init_chip()
304 pci_write_config_byte(pdev, 0xB1, 0x72); in sil680_init_chip()
305 pci_write_config_word(pdev, 0xB2, 0x328A); in sil680_init_chip()
306 pci_write_config_dword(pdev, 0xB4, 0x62DD62DD); in sil680_init_chip()
307 pci_write_config_dword(pdev, 0xB8, 0x43924392); in sil680_init_chip()
308 pci_write_config_dword(pdev, 0xBC, 0x40094009); in sil680_init_chip()
327 static int sil680_init_one(struct pci_dev *pdev, const struct pci_device_id *id) in sil680_init_one() argument
348 ata_print_version_once(&pdev->dev, DRV_VERSION); in sil680_init_one()
350 rc = pcim_enable_device(pdev); in sil680_init_one()
354 switch (sil680_init_chip(pdev, &try_mmio)) { in sil680_init_one()
368 rc = pcim_iomap_regions(pdev, 1 << SIL680_MMIO_BAR, DRV_NAME); in sil680_init_one()
373 host = ata_host_alloc_pinfo(&pdev->dev, ppi, 2); in sil680_init_one()
376 host->iomap = pcim_iomap_table(pdev); in sil680_init_one()
379 rc = dma_set_mask_and_coherent(&pdev->dev, ATA_DMA_MASK); in sil680_init_one()
382 pci_set_master(pdev); in sil680_init_one()
398 return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, in sil680_init_one()
402 return ata_pci_bmdma_init_one(pdev, ppi, &sil680_sht, NULL, 0); in sil680_init_one()
406 static int sil680_reinit_one(struct pci_dev *pdev) in sil680_reinit_one() argument
408 struct ata_host *host = pci_get_drvdata(pdev); in sil680_reinit_one()
411 rc = ata_pci_device_do_resume(pdev); in sil680_reinit_one()
414 sil680_init_chip(pdev, &try_mmio); in sil680_reinit_one()