]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/mips/au1xxx-ide.c
au1xxx-ide: add ->{in,out}put_data methods (take 2)
[linux-2.6-omap-h63xx.git] / drivers / ide / mips / au1xxx-ide.c
index e0cf5e2dbab76accf3e5e392b9ab2b790e701131..b28fa794b3142382b46bb884b0574cc6332377fe 100644 (file)
@@ -48,8 +48,6 @@
 
 static _auide_hwif auide_hwif;
 
-static int auide_ddma_init(_auide_hwif *auide);
-
 #if defined(CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA)
 
 void auide_insw(unsigned long port, void *addr, u32 count)
@@ -88,6 +86,17 @@ void auide_outsw(unsigned long port, void *addr, u32 count)
        ctp->cur_ptr = au1xxx_ddma_get_nextptr_virt(dp);
 }
 
+static void au1xxx_input_data(ide_drive_t *drive, struct request *rq,
+                             void *buf, unsigned int len)
+{
+       auide_insw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2);
+}
+
+static void au1xxx_output_data(ide_drive_t *drive, struct request *rq,
+                              void *buf, unsigned int len)
+{
+       auide_outsw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2);
+}
 #endif
 
 static void au1xxx_set_pio_mode(ide_drive_t *drive, const u8 pio)
@@ -598,6 +607,9 @@ static int au_ide_probe(struct device *dev)
        */
 
 #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA     
+       hwif->input_data  = au1xxx_input_data;
+       hwif->output_data = au1xxx_output_data;
+
        hwif->INSW                      = auide_insw;
        hwif->OUTSW                     = auide_outsw;
 #endif