diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/pci/scc_pata.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index ad7cdf9060ca..a7a2c58482a2 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -618,6 +618,38 @@ static int __devinit init_setup_scc(struct pci_dev *dev, | |||
618 | return rc; | 618 | return rc; |
619 | } | 619 | } |
620 | 620 | ||
621 | static void scc_input_data(ide_drive_t *drive, struct request *rq, | ||
622 | void *buf, unsigned int len) | ||
623 | { | ||
624 | unsigned long data_addr = drive->hwif->io_ports.data_addr; | ||
625 | |||
626 | len++; | ||
627 | |||
628 | if (drive->io_32bit) { | ||
629 | scc_ide_insl(data_addr, buf, len / 4); | ||
630 | |||
631 | if ((len & 3) >= 2) | ||
632 | scc_ide_insw(data_addr, (u8 *)buf + (len & ~3), 1); | ||
633 | } else | ||
634 | scc_ide_insw(data_addr, buf, len / 2); | ||
635 | } | ||
636 | |||
637 | static void scc_output_data(ide_drive_t *drive, struct request *rq, | ||
638 | void *buf, unsigned int len) | ||
639 | { | ||
640 | unsigned long data_addr = drive->hwif->io_ports.data_addr; | ||
641 | |||
642 | len++; | ||
643 | |||
644 | if (drive->io_32bit) { | ||
645 | scc_ide_outsl(data_addr, buf, len / 4); | ||
646 | |||
647 | if ((len & 3) >= 2) | ||
648 | scc_ide_outsw(data_addr, (u8 *)buf + (len & ~3), 1); | ||
649 | } else | ||
650 | scc_ide_outsw(data_addr, buf, len / 2); | ||
651 | } | ||
652 | |||
621 | /** | 653 | /** |
622 | * init_mmio_iops_scc - set up the iops for MMIO | 654 | * init_mmio_iops_scc - set up the iops for MMIO |
623 | * @hwif: interface to set up | 655 | * @hwif: interface to set up |
@@ -632,6 +664,9 @@ static void __devinit init_mmio_iops_scc(ide_hwif_t *hwif) | |||
632 | 664 | ||
633 | ide_set_hwifdata(hwif, ports); | 665 | ide_set_hwifdata(hwif, ports); |
634 | 666 | ||
667 | hwif->input_data = scc_input_data; | ||
668 | hwif->output_data = scc_output_data; | ||
669 | |||
635 | hwif->INB = scc_ide_inb; | 670 | hwif->INB = scc_ide_inb; |
636 | hwif->INW = scc_ide_inw; | 671 | hwif->INW = scc_ide_inw; |
637 | hwif->INSW = scc_ide_insw; | 672 | hwif->INSW = scc_ide_insw; |