• Home
  • Raw
  • Download

Lines Matching +full:dma +full:- +full:33 +full:bits

2  * Copyright (C) 2000-2002		Mark Lord <mlord@pobox.com>
54 // the clock is in bits 8 and 9 of this word in sc1200_get_pci_clock()
66 * Here are the standard PIO mode 0-4 timings for each "format".
67 * Format-0 uses fast data reg timings, with slower command reg timings.
68 * Format-1 uses fast timings for all registers, but won't work with all drives.
71 {{0x00009172, 0x00012171, 0x00020080, 0x00032010, 0x00040010}, // format0 33Mhz
72 {0xd1329172, 0x71212171, 0x30200080, 0x20102010, 0x00100010}, // format1, 33Mhz
83 ide_hwif_t *hwif = drive->hwif; in sc1200_tunepio()
84 struct pci_dev *pdev = to_pci_dev(hwif->dev); in sc1200_tunepio()
85 unsigned int basereg = hwif->channel ? 0x50 : 0x40, format = 0; in sc1200_tunepio()
91 pci_write_config_dword(pdev, basereg + ((drive->dn & 1) << 3), in sc1200_tunepio()
99 * set the appropriate timing bits on the fly, but that might be
106 ide_hwif_t *hwif = drive->hwif; in sc1200_udma_filter()
109 u8 mask = hwif->ultra_mask; in sc1200_udma_filter()
113 mateid = mate->id; in sc1200_udma_filter()
128 struct pci_dev *dev = to_pci_dev(hwif->dev); in sc1200_set_dma_mode()
131 unsigned int basereg = hwif->channel ? 0x50 : 0x40; in sc1200_set_dma_mode()
132 const u8 mode = drive->dma_mode; in sc1200_set_dma_mode()
149 * Note that each DMA mode has several timings associated with it. in sc1200_set_dma_mode()
154 timings = udma_timing[pci_clock][mode - XFER_UDMA_0]; in sc1200_set_dma_mode()
156 timings = mwdma_timing[pci_clock][mode - XFER_MW_DMA_0]; in sc1200_set_dma_mode()
158 if ((drive->dn & 1) == 0) { in sc1200_set_dma_mode()
173 ide_hwif_t *hwif = drive->hwif; in sc1200_dma_end()
174 unsigned long dma_base = hwif->dma_base; in sc1200_dma_end()
177 dma_stat = inb(dma_base+2); /* get DMA status */ in sc1200_dma_end()
183 outb(dma_stat|0x1b, dma_base+2); /* clear the INTR & ERROR bits */ in sc1200_dma_end()
184 outb(inb(dma_base)&~1, dma_base); /* !! DO THIS HERE !! stop DMA */ in sc1200_dma_end()
186 return (dma_stat & 7) != 4; /* verify good DMA status */ in sc1200_dma_end()
199 int mode = -1; in sc1200_set_pio_mode()
200 const u8 pio = drive->pio_mode - XFER_PIO_0; in sc1200_set_pio_mode()
203 * bad abuse of ->set_pio_mode interface in sc1200_set_pio_mode()
213 if (mode != -1) { in sc1200_set_pio_mode()
214 printk("SC1200: %s: changing (U)DMA mode\n", drive->name); in sc1200_set_pio_mode()
217 (drive->dev_flags & IDE_DFLAG_USING_DMA)) in sc1200_set_pio_mode()
218 hwif->dma_ops->dma_host_set(drive, 1); in sc1200_set_pio_mode()
239 struct sc1200_saved_state *ss = host->host_priv; in sc1200_suspend()
247 pci_read_config_dword(dev, 0x40 + r * 4, &ss->regs[r]); in sc1200_suspend()
258 struct sc1200_saved_state *ss = host->host_priv; in sc1200_resume()
271 pci_write_config_dword(dev, 0x40 + r * 4, ss->regs[r]); in sc1200_resume()
314 return -ENOMEM; in sc1200_init_one()