diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-02-16 20:40:25 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-02-16 20:40:25 -0500 |
commit | 0ecdca26e556eae9668ce6de9554757dddb942ef (patch) | |
tree | 21d62c01d0c0d5aeea2524252ed8dec6ca20b6d4 /drivers/ide/ide-iops.c | |
parent | 7569e8dc2213ecc47024ea5edbadc8736487d926 (diff) |
ide: use PIO/MMIO operations directly where possible (v2)
This results in smaller/faster/simpler code and allows future optimizations.
Also remove no longer needed ide[_mm]_{inl,outl}() and ide_hwif_t.{INL,OUTL}.
v2:
* updated for scc_pata
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index badde6331775..09c30cbf4bd7 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -49,11 +49,6 @@ static void ide_insw (unsigned long port, void *addr, u32 count) | |||
49 | insw(port, addr, count); | 49 | insw(port, addr, count); |
50 | } | 50 | } |
51 | 51 | ||
52 | static u32 ide_inl (unsigned long port) | ||
53 | { | ||
54 | return (u32) inl(port); | ||
55 | } | ||
56 | |||
57 | static void ide_insl (unsigned long port, void *addr, u32 count) | 52 | static void ide_insl (unsigned long port, void *addr, u32 count) |
58 | { | 53 | { |
59 | insl(port, addr, count); | 54 | insl(port, addr, count); |
@@ -79,11 +74,6 @@ static void ide_outsw (unsigned long port, void *addr, u32 count) | |||
79 | outsw(port, addr, count); | 74 | outsw(port, addr, count); |
80 | } | 75 | } |
81 | 76 | ||
82 | static void ide_outl (u32 val, unsigned long port) | ||
83 | { | ||
84 | outl(val, port); | ||
85 | } | ||
86 | |||
87 | static void ide_outsl (unsigned long port, void *addr, u32 count) | 77 | static void ide_outsl (unsigned long port, void *addr, u32 count) |
88 | { | 78 | { |
89 | outsl(port, addr, count); | 79 | outsl(port, addr, count); |
@@ -94,12 +84,10 @@ void default_hwif_iops (ide_hwif_t *hwif) | |||
94 | hwif->OUTB = ide_outb; | 84 | hwif->OUTB = ide_outb; |
95 | hwif->OUTBSYNC = ide_outbsync; | 85 | hwif->OUTBSYNC = ide_outbsync; |
96 | hwif->OUTW = ide_outw; | 86 | hwif->OUTW = ide_outw; |
97 | hwif->OUTL = ide_outl; | ||
98 | hwif->OUTSW = ide_outsw; | 87 | hwif->OUTSW = ide_outsw; |
99 | hwif->OUTSL = ide_outsl; | 88 | hwif->OUTSL = ide_outsl; |
100 | hwif->INB = ide_inb; | 89 | hwif->INB = ide_inb; |
101 | hwif->INW = ide_inw; | 90 | hwif->INW = ide_inw; |
102 | hwif->INL = ide_inl; | ||
103 | hwif->INSW = ide_insw; | 91 | hwif->INSW = ide_insw; |
104 | hwif->INSL = ide_insl; | 92 | hwif->INSL = ide_insl; |
105 | } | 93 | } |
@@ -123,11 +111,6 @@ static void ide_mm_insw (unsigned long port, void *addr, u32 count) | |||
123 | __ide_mm_insw((void __iomem *) port, addr, count); | 111 | __ide_mm_insw((void __iomem *) port, addr, count); |
124 | } | 112 | } |
125 | 113 | ||
126 | static u32 ide_mm_inl (unsigned long port) | ||
127 | { | ||
128 | return (u32) readl((void __iomem *) port); | ||
129 | } | ||
130 | |||
131 | static void ide_mm_insl (unsigned long port, void *addr, u32 count) | 114 | static void ide_mm_insl (unsigned long port, void *addr, u32 count) |
132 | { | 115 | { |
133 | __ide_mm_insl((void __iomem *) port, addr, count); | 116 | __ide_mm_insl((void __iomem *) port, addr, count); |
@@ -153,11 +136,6 @@ static void ide_mm_outsw (unsigned long port, void *addr, u32 count) | |||
153 | __ide_mm_outsw((void __iomem *) port, addr, count); | 136 | __ide_mm_outsw((void __iomem *) port, addr, count); |
154 | } | 137 | } |
155 | 138 | ||
156 | static void ide_mm_outl (u32 value, unsigned long port) | ||
157 | { | ||
158 | writel(value, (void __iomem *) port); | ||
159 | } | ||
160 | |||
161 | static void ide_mm_outsl (unsigned long port, void *addr, u32 count) | 139 | static void ide_mm_outsl (unsigned long port, void *addr, u32 count) |
162 | { | 140 | { |
163 | __ide_mm_outsl((void __iomem *) port, addr, count); | 141 | __ide_mm_outsl((void __iomem *) port, addr, count); |
@@ -170,12 +148,10 @@ void default_hwif_mmiops (ide_hwif_t *hwif) | |||
170 | this one is controller specific! */ | 148 | this one is controller specific! */ |
171 | hwif->OUTBSYNC = ide_mm_outbsync; | 149 | hwif->OUTBSYNC = ide_mm_outbsync; |
172 | hwif->OUTW = ide_mm_outw; | 150 | hwif->OUTW = ide_mm_outw; |
173 | hwif->OUTL = ide_mm_outl; | ||
174 | hwif->OUTSW = ide_mm_outsw; | 151 | hwif->OUTSW = ide_mm_outsw; |
175 | hwif->OUTSL = ide_mm_outsl; | 152 | hwif->OUTSL = ide_mm_outsl; |
176 | hwif->INB = ide_mm_inb; | 153 | hwif->INB = ide_mm_inb; |
177 | hwif->INW = ide_mm_inw; | 154 | hwif->INW = ide_mm_inw; |
178 | hwif->INL = ide_mm_inl; | ||
179 | hwif->INSW = ide_mm_insw; | 155 | hwif->INSW = ide_mm_insw; |
180 | hwif->INSL = ide_mm_insl; | 156 | hwif->INSL = ide_mm_insl; |
181 | } | 157 | } |