aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/tx4939ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/tx4939ide.c')
-rw-r--r--drivers/ide/tx4939ide.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index 1ac27ac7283b..882f6f07c476 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -397,6 +397,17 @@ static int tx4939ide_dma_test_irq(ide_drive_t *drive)
397 return found; 397 return found;
398} 398}
399 399
400#ifdef __BIG_ENDIAN
401static u8 tx4939ide_dma_sff_read_status(ide_hwif_t *hwif)
402{
403 void __iomem *base = TX4939IDE_BASE(hwif);
404
405 return tx4939ide_readb(base, TX4939IDE_DMA_Stat);
406}
407#else
408#define tx4939ide_dma_sff_read_status ide_dma_sff_read_status
409#endif
410
400static void tx4939ide_init_hwif(ide_hwif_t *hwif) 411static void tx4939ide_init_hwif(ide_hwif_t *hwif)
401{ 412{
402 void __iomem *base = TX4939IDE_BASE(hwif); 413 void __iomem *base = TX4939IDE_BASE(hwif);
@@ -443,13 +454,6 @@ static void tx4939ide_tf_load_fixup(ide_drive_t *drive, ide_task_t *task)
443 454
444#ifdef __BIG_ENDIAN 455#ifdef __BIG_ENDIAN
445 456
446static u8 tx4939ide_read_sff_dma_status(ide_hwif_t *hwif)
447{
448 void __iomem *base = TX4939IDE_BASE(hwif);
449
450 return tx4939ide_readb(base, TX4939IDE_DMA_Stat);
451}
452
453/* custom iops (independent from SWAP_IO_SPACE) */ 457/* custom iops (independent from SWAP_IO_SPACE) */
454static u8 tx4939ide_inb(unsigned long port) 458static u8 tx4939ide_inb(unsigned long port)
455{ 459{
@@ -585,7 +589,6 @@ static const struct ide_tp_ops tx4939ide_tp_ops = {
585 .exec_command = ide_exec_command, 589 .exec_command = ide_exec_command,
586 .read_status = ide_read_status, 590 .read_status = ide_read_status,
587 .read_altstatus = ide_read_altstatus, 591 .read_altstatus = ide_read_altstatus,
588 .read_sff_dma_status = tx4939ide_read_sff_dma_status,
589 592
590 .set_irq = ide_set_irq, 593 .set_irq = ide_set_irq,
591 594
@@ -609,7 +612,6 @@ static const struct ide_tp_ops tx4939ide_tp_ops = {
609 .exec_command = ide_exec_command, 612 .exec_command = ide_exec_command,
610 .read_status = ide_read_status, 613 .read_status = ide_read_status,
611 .read_altstatus = ide_read_altstatus, 614 .read_altstatus = ide_read_altstatus,
612 .read_sff_dma_status = ide_read_sff_dma_status,
613 615
614 .set_irq = ide_set_irq, 616 .set_irq = ide_set_irq,
615 617
@@ -638,6 +640,7 @@ static const struct ide_dma_ops tx4939ide_dma_ops = {
638 .dma_test_irq = tx4939ide_dma_test_irq, 640 .dma_test_irq = tx4939ide_dma_test_irq,
639 .dma_lost_irq = ide_dma_lost_irq, 641 .dma_lost_irq = ide_dma_lost_irq,
640 .dma_timeout = ide_dma_timeout, 642 .dma_timeout = ide_dma_timeout,
643 .dma_sff_read_status = tx4939ide_dma_sff_read_status,
641}; 644};
642 645
643static const struct ide_port_info tx4939ide_port_info __initdata = { 646static const struct ide_port_info tx4939ide_port_info __initdata = {