aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/Kconfig48
-rw-r--r--drivers/ide/Makefile1
-rw-r--r--drivers/ide/arm/icside.c13
-rw-r--r--drivers/ide/ide-dma.c2
-rw-r--r--drivers/ide/ide.c4
-rw-r--r--drivers/ide/mips/au1xxx-ide.c3
-rw-r--r--drivers/ide/pci/Makefile1
-rw-r--r--drivers/ide/pci/cmd64x.c45
-rw-r--r--drivers/ide/pci/jmicron.c29
-rw-r--r--drivers/ide/pci/scc_pata.c (renamed from drivers/ide/ppc/scc_pata.c)0
-rw-r--r--drivers/ide/setup-pci.c5
-rw-r--r--include/asm-mips/mach-au1x00/au1xxx_ide.h34
12 files changed, 57 insertions, 128 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index 3f76987d818a..8f1fd017679b 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -434,24 +434,8 @@ config BLK_DEV_IDEDMA_FORCED
434 434
435 Generally say N here. 435 Generally say N here.
436 436
437config IDEDMA_PCI_AUTO
438 bool "Use PCI DMA by default when available"
439 ---help---
440 Prior to kernel version 2.1.112, Linux used to automatically use
441 DMA for IDE drives and chipsets which support it. Due to concerns
442 about a couple of cases where buggy hardware may have caused damage,
443 the default is now to NOT use DMA automatically. To revert to the
444 previous behaviour, say Y to this question.
445
446 If you suspect your hardware is at all flakey, say N here.
447 Do NOT email the IDE kernel people regarding this issue!
448
449 It is normally safe to answer Y to this question unless your
450 motherboard uses a VIA VP2 chipset, in which case you should say N.
451
452config IDEDMA_ONLYDISK 437config IDEDMA_ONLYDISK
453 bool "Enable DMA only for disks " 438 bool "Enable DMA only for disks "
454 depends on IDEDMA_PCI_AUTO
455 help 439 help
456 This is used if you know your ATAPI Devices are going to fail DMA 440 This is used if you know your ATAPI Devices are going to fail DMA
457 Transfers. 441 Transfers.
@@ -769,6 +753,14 @@ config BLK_DEV_TC86C001
769 help 753 help
770 This driver adds support for Toshiba TC86C001 GOKU-S chip. 754 This driver adds support for Toshiba TC86C001 GOKU-S chip.
771 755
756config BLK_DEV_CELLEB
757 tristate "Toshiba's Cell Reference Set IDE support"
758 depends on PPC_CELLEB
759 help
760 This driver provides support for the built-in IDE controller on
761 Toshiba Cell Reference Board.
762 If unsure, say Y.
763
772endif 764endif
773 765
774config BLK_DEV_IDE_PMAC 766config BLK_DEV_IDE_PMAC
@@ -800,14 +792,6 @@ config BLK_DEV_IDEDMA_PMAC
800 to transfer data to and from memory. Saying Y is safe and improves 792 to transfer data to and from memory. Saying Y is safe and improves
801 performance. 793 performance.
802 794
803config BLK_DEV_IDE_CELLEB
804 bool "Toshiba's Cell Reference Set IDE support"
805 depends on PPC_CELLEB && IDE=y
806 help
807 This driver provides support for the built-in IDE controller on
808 Toshiba Cell Reference Board.
809 If unsure, say Y.
810
811config BLK_DEV_IDE_SWARM 795config BLK_DEV_IDE_SWARM
812 tristate "IDE for Sibyte evaluation boards" 796 tristate "IDE for Sibyte evaluation boards"
813 depends on SIBYTE_SB1xxx_SOC 797 depends on SIBYTE_SB1xxx_SOC
@@ -851,19 +835,6 @@ config BLK_DEV_IDEDMA_ICS
851 Say Y here if you want to add DMA (Direct Memory Access) support to 835 Say Y here if you want to add DMA (Direct Memory Access) support to
852 the ICS IDE driver. 836 the ICS IDE driver.
853 837
854config IDEDMA_ICS_AUTO
855 bool "Use ICS DMA by default"
856 depends on BLK_DEV_IDEDMA_ICS
857 help
858 Prior to kernel version 2.1.112, Linux used to automatically use
859 DMA for IDE drives and chipsets which support it. Due to concerns
860 about a couple of cases where buggy hardware may have caused damage,
861 the default is now to NOT use DMA automatically. To revert to the
862 previous behaviour, say Y to this question.
863
864 If you suspect your hardware is at all flakey, say N here.
865 Do NOT email the IDE kernel people regarding this issue!
866
867config BLK_DEV_IDE_RAPIDE 838config BLK_DEV_IDE_RAPIDE
868 tristate "RapIDE interface support" 839 tristate "RapIDE interface support"
869 depends on ARM && ARCH_ACORN 840 depends on ARM && ARCH_ACORN
@@ -1086,9 +1057,6 @@ config IDEDMA_IVB
1086 1057
1087 It is normally safe to answer Y; however, the default is N. 1058 It is normally safe to answer Y; however, the default is N.
1088 1059
1089config IDEDMA_AUTO
1090 def_bool IDEDMA_PCI_AUTO || IDEDMA_ICS_AUTO
1091
1092endif 1060endif
1093 1061
1094config BLK_DEV_HD_ONLY 1062config BLK_DEV_HD_ONLY
diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile
index 28feedfbd21d..d9f029e8ff74 100644
--- a/drivers/ide/Makefile
+++ b/drivers/ide/Makefile
@@ -37,7 +37,6 @@ ide-core-$(CONFIG_BLK_DEV_Q40IDE) += legacy/q40ide.o
37# built-in only drivers from ppc/ 37# built-in only drivers from ppc/
38ide-core-$(CONFIG_BLK_DEV_MPC8xx_IDE) += ppc/mpc8xx.o 38ide-core-$(CONFIG_BLK_DEV_MPC8xx_IDE) += ppc/mpc8xx.o
39ide-core-$(CONFIG_BLK_DEV_IDE_PMAC) += ppc/pmac.o 39ide-core-$(CONFIG_BLK_DEV_IDE_PMAC) += ppc/pmac.o
40ide-core-$(CONFIG_BLK_DEV_IDE_CELLEB) += ppc/scc_pata.o
41 40
42# built-in only drivers from h8300/ 41# built-in only drivers from h8300/
43ide-core-$(CONFIG_H8300) += h8300/ide-h8300.o 42ide-core-$(CONFIG_H8300) += h8300/ide-h8300.o
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index 40e5c66b81ce..e2953fc1fafb 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -196,11 +196,6 @@ static void icside_maskproc(ide_drive_t *drive, int mask)
196} 196}
197 197
198#ifdef CONFIG_BLK_DEV_IDEDMA_ICS 198#ifdef CONFIG_BLK_DEV_IDEDMA_ICS
199
200#ifndef CONFIG_IDEDMA_ICS_AUTO
201#warning CONFIG_IDEDMA_ICS_AUTO=n support is obsolete, and will be removed soon.
202#endif
203
204/* 199/*
205 * SG-DMA support. 200 * SG-DMA support.
206 * 201 *
@@ -474,12 +469,6 @@ static int icside_dma_lostirq(ide_drive_t *drive)
474 469
475static void icside_dma_init(ide_hwif_t *hwif) 470static void icside_dma_init(ide_hwif_t *hwif)
476{ 471{
477 int autodma = 0;
478
479#ifdef CONFIG_IDEDMA_ICS_AUTO
480 autodma = 1;
481#endif
482
483 printk(" %s: SG-DMA", hwif->name); 472 printk(" %s: SG-DMA", hwif->name);
484 473
485 hwif->atapi_dma = 1; 474 hwif->atapi_dma = 1;
@@ -489,7 +478,7 @@ static void icside_dma_init(ide_hwif_t *hwif)
489 hwif->dmatable_cpu = NULL; 478 hwif->dmatable_cpu = NULL;
490 hwif->dmatable_dma = 0; 479 hwif->dmatable_dma = 0;
491 hwif->speedproc = icside_set_speed; 480 hwif->speedproc = icside_set_speed;
492 hwif->autodma = autodma; 481 hwif->autodma = 1;
493 482
494 hwif->ide_dma_check = icside_dma_check; 483 hwif->ide_dma_check = icside_dma_check;
495 hwif->dma_host_off = icside_dma_host_off; 484 hwif->dma_host_off = icside_dma_host_off;
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 08e7cd043bcc..fd213088b06b 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -767,7 +767,7 @@ int ide_set_dma(ide_drive_t *drive)
767 switch(rc) { 767 switch(rc) {
768 case -1: /* DMA needs to be disabled */ 768 case -1: /* DMA needs to be disabled */
769 hwif->dma_off_quietly(drive); 769 hwif->dma_off_quietly(drive);
770 return 0; 770 return -1;
771 case 0: /* DMA needs to be enabled */ 771 case 0: /* DMA needs to be enabled */
772 return hwif->ide_dma_on(drive); 772 return hwif->ide_dma_on(drive);
773 case 1: /* DMA setting cannot be changed */ 773 case 1: /* DMA setting cannot be changed */
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index dfbd74458522..695610f0e3e4 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -177,11 +177,7 @@ DECLARE_MUTEX(ide_cfg_sem);
177static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */ 177static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
178#endif 178#endif
179 179
180#ifdef CONFIG_IDEDMA_AUTO
181int noautodma = 0; 180int noautodma = 0;
182#else
183int noautodma = 1;
184#endif
185 181
186EXPORT_SYMBOL(noautodma); 182EXPORT_SYMBOL(noautodma);
187 183
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index b2dc028dc8ca..d54d9fe92a7d 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -639,6 +639,7 @@ static int au_ide_probe(struct device *dev)
639 _auide_hwif *ahwif = &auide_hwif; 639 _auide_hwif *ahwif = &auide_hwif;
640 ide_hwif_t *hwif; 640 ide_hwif_t *hwif;
641 struct resource *res; 641 struct resource *res;
642 hw_regs_t *hw;
642 int ret = 0; 643 int ret = 0;
643 644
644#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA) 645#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA)
@@ -681,7 +682,7 @@ static int au_ide_probe(struct device *dev)
681 /* FIXME: This might possibly break PCMCIA IDE devices */ 682 /* FIXME: This might possibly break PCMCIA IDE devices */
682 683
683 hwif = &ide_hwifs[pdev->id]; 684 hwif = &ide_hwifs[pdev->id];
684 hw_regs_t *hw = &hwif->hw; 685 hw = &hwif->hw;
685 hwif->irq = hw->irq = ahwif->irq; 686 hwif->irq = hw->irq = ahwif->irq;
686 hwif->chipset = ide_au1xxx; 687 hwif->chipset = ide_au1xxx;
687 688
diff --git a/drivers/ide/pci/Makefile b/drivers/ide/pci/Makefile
index 6591ff4753cb..95d1ea8f1f14 100644
--- a/drivers/ide/pci/Makefile
+++ b/drivers/ide/pci/Makefile
@@ -3,6 +3,7 @@ obj-$(CONFIG_BLK_DEV_AEC62XX) += aec62xx.o
3obj-$(CONFIG_BLK_DEV_ALI15X3) += alim15x3.o 3obj-$(CONFIG_BLK_DEV_ALI15X3) += alim15x3.o
4obj-$(CONFIG_BLK_DEV_AMD74XX) += amd74xx.o 4obj-$(CONFIG_BLK_DEV_AMD74XX) += amd74xx.o
5obj-$(CONFIG_BLK_DEV_ATIIXP) += atiixp.o 5obj-$(CONFIG_BLK_DEV_ATIIXP) += atiixp.o
6obj-$(CONFIG_BLK_DEV_CELLEB) += scc_pata.o
6obj-$(CONFIG_BLK_DEV_CMD64X) += cmd64x.o 7obj-$(CONFIG_BLK_DEV_CMD64X) += cmd64x.o
7obj-$(CONFIG_BLK_DEV_CS5520) += cs5520.o 8obj-$(CONFIG_BLK_DEV_CS5520) += cs5520.o
8obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o 9obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index b0d4825c56a9..561197f7b5bb 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -1,6 +1,6 @@
1/* $Id: cmd64x.c,v 1.21 2000/01/30 23:23:16 1/* $Id: cmd64x.c,v 1.21 2000/01/30 23:23:16
2 * 2 *
3 * linux/drivers/ide/pci/cmd64x.c Version 1.41 Feb 3, 2007 3 * linux/drivers/ide/pci/cmd64x.c Version 1.42 Feb 8, 2007
4 * 4 *
5 * cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines. 5 * cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines.
6 * Note, this driver is not used at all on other systems because 6 * Note, this driver is not used at all on other systems because
@@ -189,6 +189,11 @@ static int cmd64x_get_info (char *buffer, char **addr, off_t offset, int count)
189 189
190#endif /* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) */ 190#endif /* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) */
191 191
192static u8 quantize_timing(int timing, int quant)
193{
194 return (timing + quant - 1) / quant;
195}
196
192/* 197/*
193 * This routine writes the prepared setup/active/recovery counts 198 * This routine writes the prepared setup/active/recovery counts
194 * for a drive into the cmd646 chipset registers to active them. 199 * for a drive into the cmd646 chipset registers to active them.
@@ -268,47 +273,37 @@ static void program_drive_counts (ide_drive_t *drive, int setup_count, int activ
268 */ 273 */
269static u8 cmd64x_tune_pio (ide_drive_t *drive, u8 mode_wanted) 274static u8 cmd64x_tune_pio (ide_drive_t *drive, u8 mode_wanted)
270{ 275{
271 int setup_time, active_time, recovery_time; 276 int setup_time, active_time, cycle_time;
272 int clock_time, pio_mode, cycle_time; 277 u8 cycle_count, setup_count, active_count, recovery_count;
273 u8 recovery_count2, cycle_count; 278 u8 pio_mode;
274 int setup_count, active_count, recovery_count; 279 int clock_time = 1000 / system_bus_clock();
275 int bus_speed = system_bus_clock(); 280 ide_pio_data_t pio;
276 ide_pio_data_t d;
277 281
278 pio_mode = ide_get_best_pio_mode(drive, mode_wanted, 5, &d); 282 pio_mode = ide_get_best_pio_mode(drive, mode_wanted, 5, &pio);
279 cycle_time = d.cycle_time; 283 cycle_time = pio.cycle_time;
280 284
281 /*
282 * I copied all this complicated stuff from cmd640.c and made a few
283 * minor changes. For now I am just going to pray that it is correct.
284 */
285 setup_time = ide_pio_timings[pio_mode].setup_time; 285 setup_time = ide_pio_timings[pio_mode].setup_time;
286 active_time = ide_pio_timings[pio_mode].active_time; 286 active_time = ide_pio_timings[pio_mode].active_time;
287 recovery_time = cycle_time - (setup_time + active_time);
288 clock_time = 1000 / bus_speed;
289 cycle_count = (cycle_time + clock_time - 1) / clock_time;
290
291 setup_count = (setup_time + clock_time - 1) / clock_time;
292 287
293 active_count = (active_time + clock_time - 1) / clock_time; 288 setup_count = quantize_timing( setup_time, clock_time);
289 cycle_count = quantize_timing( cycle_time, clock_time);
290 active_count = quantize_timing(active_time, clock_time);
294 291
295 recovery_count = (recovery_time + clock_time - 1) / clock_time; 292 recovery_count = cycle_count - active_count;
296 recovery_count2 = cycle_count - (setup_count + active_count); 293 /* program_drive_counts() takes care of zero recovery cycles */
297 if (recovery_count2 > recovery_count)
298 recovery_count = recovery_count2;
299 if (recovery_count > 16) { 294 if (recovery_count > 16) {
300 active_count += recovery_count - 16; 295 active_count += recovery_count - 16;
301 recovery_count = 16; 296 recovery_count = 16;
302 } 297 }
303 if (active_count > 16) 298 if (active_count > 16)
304 active_count = 16; /* maximum allowed by cmd646 */ 299 active_count = 16; /* maximum allowed by cmd64x */
305 300
306 program_drive_counts (drive, setup_count, active_count, recovery_count); 301 program_drive_counts (drive, setup_count, active_count, recovery_count);
307 302
308 cmdprintk("%s: PIO mode wanted %d, selected %d (%dns)%s, " 303 cmdprintk("%s: PIO mode wanted %d, selected %d (%dns)%s, "
309 "clocks=%d/%d/%d\n", 304 "clocks=%d/%d/%d\n",
310 drive->name, mode_wanted, pio_mode, cycle_time, 305 drive->name, mode_wanted, pio_mode, cycle_time,
311 d.overridden ? " (overriding vendor mode)" : "", 306 pio.overridden ? " (overriding vendor mode)" : "",
312 setup_count, active_count, recovery_count); 307 setup_count, active_count, recovery_count);
313 308
314 return pio_mode; 309 return pio_mode;
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c
index 53f25500c22b..be4fc96c29e0 100644
--- a/drivers/ide/pci/jmicron.c
+++ b/drivers/ide/pci/jmicron.c
@@ -240,12 +240,31 @@ static int __devinit jmicron_init_one(struct pci_dev *dev, const struct pci_devi
240 return 0; 240 return 0;
241} 241}
242 242
243/* If libata is configured, jmicron PCI quirk will configure it such
244 * that the SATA ports are in AHCI function while the PATA ports are
245 * in a separate IDE function. In such cases, match device class and
246 * attach only to IDE. If libata isn't configured, keep the old
247 * behavior for backward compatibility.
248 */
249#if defined(CONFIG_ATA) || defined(CONFIG_ATA_MODULE)
250#define JMB_CLASS PCI_CLASS_STORAGE_IDE << 8
251#define JMB_CLASS_MASK 0xffff00
252#else
253#define JMB_CLASS 0
254#define JMB_CLASS_MASK 0
255#endif
256
243static struct pci_device_id jmicron_pci_tbl[] = { 257static struct pci_device_id jmicron_pci_tbl[] = {
244 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 258 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361,
245 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 259 PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 0},
246 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, 260 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363,
247 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, 261 PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 1},
248 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, 262 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365,
263 PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 2},
264 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366,
265 PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 3},
266 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368,
267 PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 4},
249 { 0, }, 268 { 0, },
250}; 269};
251 270
diff --git a/drivers/ide/ppc/scc_pata.c b/drivers/ide/pci/scc_pata.c
index f84bf791f72e..f84bf791f72e 100644
--- a/drivers/ide/ppc/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index a52c80fe7d3e..118fb3205ca8 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -505,11 +505,6 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
505 } 505 }
506 } 506 }
507} 507}
508
509#ifndef CONFIG_IDEDMA_PCI_AUTO
510#warning CONFIG_IDEDMA_PCI_AUTO=n support is obsolete, and will be removed soon.
511#endif
512
513#endif /* CONFIG_BLK_DEV_IDEDMA_PCI*/ 508#endif /* CONFIG_BLK_DEV_IDEDMA_PCI*/
514 509
515/** 510/**
diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h
index e9fa252f8a3f..8fcae21adbd5 100644
--- a/include/asm-mips/mach-au1x00/au1xxx_ide.h
+++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h
@@ -141,40 +141,6 @@ static int auide_ddma_init( _auide_hwif *auide );
141static void auide_setup_ports(hw_regs_t *hw, _auide_hwif *ahwif); 141static void auide_setup_ports(hw_regs_t *hw, _auide_hwif *ahwif);
142int __init auide_probe(void); 142int __init auide_probe(void);
143 143
144#ifdef CONFIG_PM
145 int au1200ide_pm_callback( au1xxx_power_dev_t *dev,
146 au1xxx_request_t request, void *data);
147 static int au1xxxide_pm_standby( au1xxx_power_dev_t *dev );
148 static int au1xxxide_pm_sleep( au1xxx_power_dev_t *dev );
149 static int au1xxxide_pm_resume( au1xxx_power_dev_t *dev );
150 static int au1xxxide_pm_getstatus( au1xxx_power_dev_t *dev );
151 static int au1xxxide_pm_access( au1xxx_power_dev_t *dev );
152 static int au1xxxide_pm_idle( au1xxx_power_dev_t *dev );
153 static int au1xxxide_pm_cleanup( au1xxx_power_dev_t *dev );
154#endif
155
156
157/*
158 * Multi-Word DMA + DbDMA functions
159 */
160#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
161 static int auide_build_sglist(ide_drive_t *drive, struct request *rq);
162 static int auide_build_dmatable(ide_drive_t *drive);
163 static int auide_dma_end(ide_drive_t *drive);
164 ide_startstop_t auide_dma_intr (ide_drive_t *drive);
165 static void auide_dma_exec_cmd(ide_drive_t *drive, u8 command);
166 static int auide_dma_setup(ide_drive_t *drive);
167 static int auide_dma_check(ide_drive_t *drive);
168 static int auide_dma_test_irq(ide_drive_t *drive);
169 static int auide_dma_host_off(ide_drive_t *drive);
170 static int auide_dma_host_on(ide_drive_t *drive);
171 static int auide_dma_lostirq(ide_drive_t *drive);
172 static int auide_dma_on(ide_drive_t *drive);
173 static void auide_ddma_tx_callback(int irq, void *param);
174 static void auide_ddma_rx_callback(int irq, void *param);
175 static int auide_dma_off_quietly(ide_drive_t *drive);
176#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */
177
178/******************************************************************************* 144/*******************************************************************************
179* PIO Mode timing calculation : * 145* PIO Mode timing calculation : *
180* * 146* *