Skip to contentSkip to conversation

au1xxx-ide: add ->{in,out}put_data methods

PATCH In review Bartlomiej Zolnierkiewicz 1 participant 1 message Mar 30, 2008 libata

lore
Share & tools
lore
#0 lore raw

PATCH 3/6 au1xxx-ide: add ->{in,out}put_data methods

There should be no functional changes caused by this patch.

---
 drivers/ide/mips/au1xxx-ide.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/ide/mips/au1xxx-ide.c +12 -0
Index: b/drivers/ide/mips/au1xxx-ide.c
===================================================================
@@ -93,6 +93,15 @@ void auide_outsw(unsigned long port, voi
 	ctp->cur_ptr = au1xxx_ddma_get_nextptr_virt(dp);
 }
 
+static void au1xxx_input_data(ide_drive_t *drive, 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, 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)
@@ -602,6 +611,9 @@ static int au_ide_probe(struct device *d
 	*/
 
 #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