linux/drivers/ide/pci
Sergei Shtylyov 60e7a82f1a cmd64x: fix multiword and remove single-word DMA support
Fix the multiword DMA and drop the single-word DMA support (which nobody will
miss, I think).  In order to do it, a number of changes was necessary:

- rename program_drive_counts() to program_cycle_times(), pass to it cycle's
  total/active times instead of the clock counts, and convert them into the
  active/recovery clocks there instead of cmd64x_tune_pio() -- this causes
  quantize_timing() to also move;

- contrarywise, move all the code handling the address setup timing into
  cmd64x_tune_pio(), so that setting MWDMA mode wouldn't change address setup;

- remove from the speedproc() method the  bogus code pretending to set the DMA
  timings by twiddling bits in the BMIDE status register, handle setting MWDMA
  by just calling program_cycle_times(); while at it, improve the style of that
  whole switch statement;

- stop fiddling with the DMA capable bits in the speedproc() method -- they do
  not enable DMA, and are properly dealt with by the dma_host_{on,off} methods;

- don't set hwif->swdma_mask in the init_hwif() method anymore.

In addition to those changes, do the following:

- in cmd64x_tune_pio(), when writing to ARTTIM23 register preserve the interrupt
  status bit, eliminate local_irq_{save|restore}() around this code as there's
  *no* actual race with the interrupt handler, and move cmdprintk() to a more
  fitting place -- after ide_get_best_pio_mode() call;

- make {arttim|drwtim}_regs arrays single-dimensional, indexed with drive->dn;

- rename {setup|recovery}_counts[] into more fitting {setup|recovery}_values[];

- in  the speedproc() method, get rid of the duplicate reads/writes from/to the
  UDIDETCRx registers and of the extra variable used to store the transfer mode
  value after filtering,  use another method of determining master/slave drive,
  and cleanup useless parens;

- beautify cmdprintk() output here and there.

While at it, remove meaningless comment about the driver being used only on
UltraSPARC and long non-relevant RCS tag. :-)

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-05 22:03:49 +02:00
..
aec62xx.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
alim15x3.c alim15x3: fix PIO mode setup 2007-03-03 17:48:52 +01:00
amd74xx.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
atiixp.c ide: make ide_hwif_t.ide_dma_host_on void (v2) 2007-02-17 02:40:26 +01:00
cmd64x.c cmd64x: fix multiword and remove single-word DMA support 2007-05-05 22:03:49 +02:00
cmd640.c ide: remove a ton of pointless #undef REALLY_SLOW_IO 2007-03-03 17:48:54 +01:00
cs5520.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
cs5530.c ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2) 2007-02-17 02:40:26 +01:00
cs5535.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
cy82c693.c ide: use PIO/MMIO operations directly where possible (v2) 2007-02-17 02:40:25 +01:00
delkin_cb.c ide/pci/delkin_cb.c: add new PCI ID 2007-04-20 22:16:58 +02:00
generic.c ide: remove a ton of pointless #undef REALLY_SLOW_IO 2007-03-03 17:48:54 +01:00
hpt34x.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
hpt366.c hpt366: fix kernel oops with HPT302N 2007-04-20 22:16:58 +02:00
it821x.c ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2) 2007-02-17 02:40:26 +01:00
it8213.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
jmicron.c jmicron: make ide jmicron driver play nice with libata ones 2007-03-17 21:57:25 +01:00
Makefile scc_pata: dependency fix 2007-03-17 21:57:25 +01:00
ns87415.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
opti621.c ide: remove some obsoleted kernel params (v2) 2007-03-03 17:48:55 +01:00
pdc202xx_new.c pdc202xx_new: Enable ATAPI DMA 2007-03-26 23:03:19 +02:00
pdc202xx_old.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
piix.c piix/slc90e66: more tuneproc() fixing (take 2) 2007-03-03 17:48:53 +01:00
rz1000.c ide: remove a ton of pointless #undef REALLY_SLOW_IO 2007-03-03 17:48:54 +01:00
sc1200.c ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2) 2007-02-17 02:40:26 +01:00
scc_pata.c scc_pata: dependency fix 2007-03-17 21:57:25 +01:00
serverworks.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
sgiioc4.c ide: make ide_hwif_t.ide_dma_host_on void (v2) 2007-02-17 02:40:26 +01:00
siimage.c siimage: DRAC4 note 2007-03-03 17:48:54 +01:00
sis5513.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
sl82c105.c sl82c105: DMA support code cleanup (take 4) 2007-05-05 22:03:49 +02:00
slc90e66.c piix/slc90e66: more tuneproc() fixing (take 2) 2007-03-03 17:48:53 +01:00
tc86c001.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
triflex.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
trm290.c ide: use PIO/MMIO operations directly where possible (v2) 2007-02-17 02:40:25 +01:00
via82cxxx.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00