aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:29 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:29 -0400
commit5510b1255726d5d4ff424be4264aa0c99275dfdc (patch)
treea9a1bc692a265f33db1a331c57597713649b6c92 /arch/ppc
parent2661b13a21f609b279b4048978f8625d518df6e1 (diff)
ppc/lopec: remove ppc_ide_md hooks
* Add IDE_HFLAG_FORCE_LEGACY_IRQS host flag for Motorola-LoPEC platform to sl82c105 host driver. * Remove ppc_ide_md hooks from arch/ppc/platforms/lopec.c - no need for them (sl82c105 host driver takes care of all this setup). * Then remove no longer needed <linux/ide.h> include. Looking at arch/ppc/configs/lopec_defconfig: ... CONFIG_IDE_GENERIC=y CONFIG_BLK_DEV_IDEPCI=y # CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_BLK_DEV_OFFBOARD is not set CONFIG_BLK_DEV_GENERIC=y # CONFIG_BLK_DEV_OPTI621 is not set CONFIG_BLK_DEV_SL82C105=y ... there should be no functional changes unless somebody preferred to disable sl82c105 host driver and use only ide_generic one (but why would anybody want to do such thing :-). PS It seems that lopec_defconfig hasn't been updated for ages but if somebody is going to do it please look into disabling IDE_GENERIC and BLK_DEV_GENERIC config options. Thanks. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/platforms/lopec.c85
1 files changed, 0 insertions, 85 deletions
diff --git a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c
index b947c774f524..1e3aa6e9b6c7 100644
--- a/arch/ppc/platforms/lopec.c
+++ b/arch/ppc/platforms/lopec.c
@@ -15,7 +15,6 @@
15#include <linux/pci_ids.h> 15#include <linux/pci_ids.h>
16#include <linux/ioport.h> 16#include <linux/ioport.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/ide.h>
19#include <linux/seq_file.h> 18#include <linux/seq_file.h>
20#include <linux/initrd.h> 19#include <linux/initrd.h>
21#include <linux/console.h> 20#include <linux/console.h>
@@ -168,85 +167,6 @@ lopec_power_off(void)
168 lopec_halt(); 167 lopec_halt();
169} 168}
170 169
171#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
172int lopec_ide_ports_known = 0;
173static unsigned long lopec_ide_regbase[MAX_HWIFS];
174static unsigned long lopec_ide_ctl_regbase[MAX_HWIFS];
175static unsigned long lopec_idedma_regbase;
176
177static void
178lopec_ide_probe(void)
179{
180 struct pci_dev *dev = pci_get_device(PCI_VENDOR_ID_WINBOND,
181 PCI_DEVICE_ID_WINBOND_82C105,
182 NULL);
183 lopec_ide_ports_known = 1;
184
185 if (dev) {
186 lopec_ide_regbase[0] = dev->resource[0].start;
187 lopec_ide_regbase[1] = dev->resource[2].start;
188 lopec_ide_ctl_regbase[0] = dev->resource[1].start;
189 lopec_ide_ctl_regbase[1] = dev->resource[3].start;
190 lopec_idedma_regbase = dev->resource[4].start;
191 pci_dev_put(dev);
192 }
193}
194
195static int
196lopec_ide_default_irq(unsigned long base)
197{
198 if (lopec_ide_ports_known == 0)
199 lopec_ide_probe();
200
201 if (base == lopec_ide_regbase[0])
202 return 14;
203 else if (base == lopec_ide_regbase[1])
204 return 15;
205 else
206 return 0;
207}
208
209static unsigned long
210lopec_ide_default_io_base(int index)
211{
212 if (lopec_ide_ports_known == 0)
213 lopec_ide_probe();
214 return lopec_ide_regbase[index];
215}
216
217static void __init
218lopec_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data,
219 unsigned long ctl, int *irq)
220{
221 unsigned long reg = data;
222 uint alt_status_base;
223 int i;
224
225 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++)
226 hw->io_ports[i] = reg++;
227
228 if (data == lopec_ide_regbase[0]) {
229 alt_status_base = lopec_ide_ctl_regbase[0] + 2;
230 hw->irq = 14;
231 } else if (data == lopec_ide_regbase[1]) {
232 alt_status_base = lopec_ide_ctl_regbase[1] + 2;
233 hw->irq = 15;
234 } else {
235 alt_status_base = 0;
236 hw->irq = 0;
237 }
238
239 if (ctl)
240 hw->io_ports[IDE_CONTROL_OFFSET] = ctl;
241 else
242 hw->io_ports[IDE_CONTROL_OFFSET] = alt_status_base;
243
244 if (irq != NULL)
245 *irq = hw->irq;
246
247}
248#endif /* BLK_DEV_IDE */
249
250static void __init 170static void __init
251lopec_init_IRQ(void) 171lopec_init_IRQ(void)
252{ 172{
@@ -384,11 +304,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
384 ppc_md.nvram_read_val = todc_direct_read_val; 304 ppc_md.nvram_read_val = todc_direct_read_val;
385 ppc_md.nvram_write_val = todc_direct_write_val; 305 ppc_md.nvram_write_val = todc_direct_write_val;
386 306
387#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
388 ppc_ide_md.default_irq = lopec_ide_default_irq;
389 ppc_ide_md.default_io_base = lopec_ide_default_io_base;
390 ppc_ide_md.ide_init_hwif = lopec_ide_init_hwif_ports;
391#endif
392#ifdef CONFIG_SERIAL_TEXT_DEBUG 307#ifdef CONFIG_SERIAL_TEXT_DEBUG
393 ppc_md.progress = gen550_progress; 308 ppc_md.progress = gen550_progress;
394#endif 309#endif