aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-28 17:44:41 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-28 17:44:41 -0400
commit7c0daf2681f140dd9f39cd95966f471b5c904d8a (patch)
treeb8ea0e987f5d2121f4f4e564c05d834c3ce30a89
parentca545c1e75cd017bfd9a9b6c4f81f9b82ba20947 (diff)
ide: remove ->INW and ->OUTW methods
* Remove no longer used ->INW and ->OUTW methods. While at it: * scc_pata.c: scc_ide_{out,in}w() is called only in scc_tf_{load,read}() so inline it there. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/cris/ide-cris.c2
-rw-r--r--drivers/ide/h8300/ide-h8300.c3
-rw-r--r--drivers/ide/ide-iops.c24
-rw-r--r--drivers/ide/pci/scc_pata.c19
-rw-r--r--include/linux/ide.h2
5 files changed, 3 insertions, 47 deletions
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c
index d628141098c2..38b069c0057f 100644
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -903,10 +903,8 @@ static int __init init_e100_ide(void)
903 hwif->output_data = cris_output_data; 903 hwif->output_data = cris_output_data;
904 904
905 hwif->OUTB = &cris_ide_outb; 905 hwif->OUTB = &cris_ide_outb;
906 hwif->OUTW = &cris_ide_outw;
907 hwif->OUTBSYNC = &cris_ide_outbsync; 906 hwif->OUTBSYNC = &cris_ide_outbsync;
908 hwif->INB = &cris_ide_inb; 907 hwif->INB = &cris_ide_inb;
909 hwif->INW = &cris_ide_inw;
910 hwif->cbl = ATA_CBL_PATA40; 908 hwif->cbl = ATA_CBL_PATA40;
911 909
912 idx[h] = hwif->index; 910 idx[h] = hwif->index;
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c
index 6bd143cf0891..ecf53bb0d2aa 100644
--- a/drivers/ide/h8300/ide-h8300.c
+++ b/drivers/ide/h8300/ide-h8300.c
@@ -176,9 +176,6 @@ static inline void hwif_setup(ide_hwif_t *hwif)
176 176
177 hwif->input_data = h8300_input_data; 177 hwif->input_data = h8300_input_data;
178 hwif->output_data = h8300_output_data; 178 hwif->output_data = h8300_output_data;
179
180 hwif->OUTW = mm_outw;
181 hwif->INW = mm_inw;
182} 179}
183 180
184static int __init h8300_ide_init(void) 181static int __init h8300_ide_init(void)
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index e981e2943073..daa23b19440e 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -37,11 +37,6 @@ static u8 ide_inb (unsigned long port)
37 return (u8) inb(port); 37 return (u8) inb(port);
38} 38}
39 39
40static u16 ide_inw (unsigned long port)
41{
42 return (u16) inw(port);
43}
44
45static void ide_outb (u8 val, unsigned long port) 40static void ide_outb (u8 val, unsigned long port)
46{ 41{
47 outb(val, port); 42 outb(val, port);
@@ -52,18 +47,11 @@ static void ide_outbsync (ide_drive_t *drive, u8 addr, unsigned long port)
52 outb(addr, port); 47 outb(addr, port);
53} 48}
54 49
55static void ide_outw (u16 val, unsigned long port)
56{
57 outw(val, port);
58}
59
60void default_hwif_iops (ide_hwif_t *hwif) 50void default_hwif_iops (ide_hwif_t *hwif)
61{ 51{
62 hwif->OUTB = ide_outb; 52 hwif->OUTB = ide_outb;
63 hwif->OUTBSYNC = ide_outbsync; 53 hwif->OUTBSYNC = ide_outbsync;
64 hwif->OUTW = ide_outw;
65 hwif->INB = ide_inb; 54 hwif->INB = ide_inb;
66 hwif->INW = ide_inw;
67} 55}
68 56
69/* 57/*
@@ -75,11 +63,6 @@ static u8 ide_mm_inb (unsigned long port)
75 return (u8) readb((void __iomem *) port); 63 return (u8) readb((void __iomem *) port);
76} 64}
77 65
78static u16 ide_mm_inw (unsigned long port)
79{
80 return (u16) readw((void __iomem *) port);
81}
82
83static void ide_mm_outb (u8 value, unsigned long port) 66static void ide_mm_outb (u8 value, unsigned long port)
84{ 67{
85 writeb(value, (void __iomem *) port); 68 writeb(value, (void __iomem *) port);
@@ -90,20 +73,13 @@ static void ide_mm_outbsync (ide_drive_t *drive, u8 value, unsigned long port)
90 writeb(value, (void __iomem *) port); 73 writeb(value, (void __iomem *) port);
91} 74}
92 75
93static void ide_mm_outw (u16 value, unsigned long port)
94{
95 writew(value, (void __iomem *) port);
96}
97
98void default_hwif_mmiops (ide_hwif_t *hwif) 76void default_hwif_mmiops (ide_hwif_t *hwif)
99{ 77{
100 hwif->OUTB = ide_mm_outb; 78 hwif->OUTB = ide_mm_outb;
101 /* Most systems will need to override OUTBSYNC, alas however 79 /* Most systems will need to override OUTBSYNC, alas however
102 this one is controller specific! */ 80 this one is controller specific! */
103 hwif->OUTBSYNC = ide_mm_outbsync; 81 hwif->OUTBSYNC = ide_mm_outbsync;
104 hwif->OUTW = ide_mm_outw;
105 hwif->INB = ide_mm_inb; 82 hwif->INB = ide_mm_inb;
106 hwif->INW = ide_mm_inw;
107} 83}
108 84
109EXPORT_SYMBOL(default_hwif_mmiops); 85EXPORT_SYMBOL(default_hwif_mmiops);
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index cb635a66030e..a17f73ec577a 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -126,12 +126,6 @@ static u8 scc_ide_inb(unsigned long port)
126 return (u8)data; 126 return (u8)data;
127} 127}
128 128
129static u16 scc_ide_inw(unsigned long port)
130{
131 u32 data = in_be32((void*)port);
132 return (u16)data;
133}
134
135static void scc_ide_insw(unsigned long port, void *addr, u32 count) 129static void scc_ide_insw(unsigned long port, void *addr, u32 count)
136{ 130{
137 u16 *ptr = (u16 *)addr; 131 u16 *ptr = (u16 *)addr;
@@ -154,11 +148,6 @@ static void scc_ide_outb(u8 addr, unsigned long port)
154 out_be32((void*)port, addr); 148 out_be32((void*)port, addr);
155} 149}
156 150
157static void scc_ide_outw(u16 addr, unsigned long port)
158{
159 out_be32((void*)port, addr);
160}
161
162static void 151static void
163scc_ide_outbsync(ide_drive_t * drive, u8 addr, unsigned long port) 152scc_ide_outbsync(ide_drive_t * drive, u8 addr, unsigned long port)
164{ 153{
@@ -630,8 +619,8 @@ static void scc_tf_load(ide_drive_t *drive, ide_task_t *task)
630 ide_set_irq(drive, 1); 619 ide_set_irq(drive, 1);
631 620
632 if (task->tf_flags & IDE_TFLAG_OUT_DATA) 621 if (task->tf_flags & IDE_TFLAG_OUT_DATA)
633 scc_ide_outw((tf->hob_data << 8) | tf->data, 622 out_be32((void *)io_ports->data_addr,
634 io_ports->data_addr); 623 (tf->hob_data << 8) | tf->data);
635 624
636 if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) 625 if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
637 scc_ide_outb(tf->hob_feature, io_ports->feature_addr); 626 scc_ide_outb(tf->hob_feature, io_ports->feature_addr);
@@ -666,7 +655,7 @@ static void scc_tf_read(ide_drive_t *drive, ide_task_t *task)
666 struct ide_taskfile *tf = &task->tf; 655 struct ide_taskfile *tf = &task->tf;
667 656
668 if (task->tf_flags & IDE_TFLAG_IN_DATA) { 657 if (task->tf_flags & IDE_TFLAG_IN_DATA) {
669 u16 data = scc_ide_inw(io_ports->data_addr); 658 u16 data = (u16)in_be32((void *)io_ports->data_addr);
670 659
671 tf->data = data & 0xff; 660 tf->data = data & 0xff;
672 tf->hob_data = (data >> 8) & 0xff; 661 tf->hob_data = (data >> 8) & 0xff;
@@ -755,10 +744,8 @@ static void __devinit init_mmio_iops_scc(ide_hwif_t *hwif)
755 hwif->output_data = scc_output_data; 744 hwif->output_data = scc_output_data;
756 745
757 hwif->INB = scc_ide_inb; 746 hwif->INB = scc_ide_inb;
758 hwif->INW = scc_ide_inw;
759 hwif->OUTB = scc_ide_outb; 747 hwif->OUTB = scc_ide_outb;
760 hwif->OUTBSYNC = scc_ide_outbsync; 748 hwif->OUTBSYNC = scc_ide_outbsync;
761 hwif->OUTW = scc_ide_outw;
762 749
763 hwif->dma_base = dma_base; 750 hwif->dma_base = dma_base;
764 hwif->config_data = ports->ctl; 751 hwif->config_data = ports->ctl;
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 8e95579c3d34..2053d7d86b1d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -479,10 +479,8 @@ typedef struct hwif_s {
479 479
480 void (*OUTB)(u8 addr, unsigned long port); 480 void (*OUTB)(u8 addr, unsigned long port);
481 void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); 481 void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port);
482 void (*OUTW)(u16 addr, unsigned long port);
483 482
484 u8 (*INB)(unsigned long port); 483 u8 (*INB)(unsigned long port);
485 u16 (*INW)(unsigned long port);
486 484
487 /* dma physical region descriptor table (cpu view) */ 485 /* dma physical region descriptor table (cpu view) */
488 unsigned int *dmatable_cpu; 486 unsigned int *dmatable_cpu;