--- /home/bjornw/tmp/linux/drivers/ide/ide.c Tue Apr 24 13:30:46 2001 +++ linux/drivers/ide/ide.c Wed Apr 4 13:20:53 2001 @@ -374,7 +374,19 @@ */ void ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount) { - byte io_32bit = drive->io_32bit; + byte io_32bit; + + /* first check if this controller has defined a special function + * for handling polled ide transfers + */ + + if(HWIF(drive)->ideproc) { + HWIF(drive)->ideproc(ideproc_ide_input_data, + drive, buffer, wcount); + return; + } + + io_32bit = drive->io_32bit; if (io_32bit) { #if SUPPORT_VLB_SYNC @@ -407,7 +419,15 @@ */ void ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount) { - byte io_32bit = drive->io_32bit; + byte io_32bit; + + if(HWIF(drive)->ideproc) { + HWIF(drive)->ideproc(ideproc_ide_output_data, + drive, buffer, wcount); + return; + } + + io_32bit = drive->io_32bit; if (io_32bit) { #if SUPPORT_VLB_SYNC @@ -444,6 +464,12 @@ */ void atapi_input_bytes (ide_drive_t *drive, void *buffer, unsigned int bytecount) { + if(HWIF(drive)->ideproc) { + HWIF(drive)->ideproc(ideproc_atapi_input_bytes, + drive, buffer, bytecount); + return; + } + ++bytecount; #if defined(CONFIG_ATARI) || defined(CONFIG_Q40) if (MACH_IS_ATARI || MACH_IS_Q40) { @@ -459,6 +485,12 @@ void atapi_output_bytes (ide_drive_t *drive, void *buffer, unsigned int bytecount) { + if(HWIF(drive)->ideproc) { + HWIF(drive)->ideproc(ideproc_atapi_output_bytes, + drive, buffer, bytecount); + return; + } + ++bytecount; #if defined(CONFIG_ATARI) || defined(CONFIG_Q40) if (MACH_IS_ATARI || MACH_IS_Q40) { @@ -2092,6 +2123,7 @@ hwif->maskproc = old_hwif.maskproc; hwif->quirkproc = old_hwif.quirkproc; hwif->rwproc = old_hwif.rwproc; + hwif->ideproc = old_hwif.ideproc; hwif->dmaproc = old_hwif.dmaproc; hwif->dma_base = old_hwif.dma_base; hwif->dma_extra = old_hwif.dma_extra; @@ -3193,6 +3225,12 @@ } #endif /* CONFIG_PCI */ +#ifdef CONFIG_ETRAX_IDE + { + extern void init_e100_ide(void); + init_e100_ide(); + } +#endif /* CONFIG_ETRAX_IDE */ #ifdef CONFIG_BLK_DEV_CMD640 { extern void ide_probe_for_cmd640x(void);