[lkml]   [2001]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] remove rubbish from sl82c105.c
Currently, drivers/ide/sl82c105.c has two sets of code in it: some
good code done by Russell King, and some old rubbishy code. Russell's
code is inside #ifdef CONFIG_ARCH_NETWINDER. I tried Russell's code
on my Longtrail CHRP PPC box and it not only compiles and links ok
(which the old code doesn't), it also works just fine.

So the patch below takes out the CONFIG_ARCH_NETWINDER and the old
code, so we use Russell's code on all platforms. I believe that this
file is only used on ARM and PPC so this should be OK. If anyone else
is using sl82c105.c, please try this patch.

Linus, this patch should be good to apply to your tree. It won't
break anything that isn't broken already since the old code won't link
at the moment anyway (it references ide_special_settings which isn't
exported from ide-pci.c).


diff -urN linux/drivers/ide/sl82c105.c linuxppc_2_4/drivers/ide/sl82c105.c
--- linux/drivers/ide/sl82c105.c Wed Jul 4 14:33:21 2001
+++ linuxppc_2_4/drivers/ide/sl82c105.c Sun Jul 22 17:58:43 2001
@@ -28,7 +28,6 @@

extern char *ide_xfer_verbose (byte xfer_rate);

* Convert a PIO mode and cycle time to the required on/off
* times for the interface. This has protection against run-away
@@ -272,37 +271,4 @@
hwif->tuneproc = tune_sl82c105;
-unsigned int pci_init_sl82c105(struct pci_dev *dev, const char *msg)
- return ide_special_settings(dev, msg);
-void dma_init_sl82c105(ide_hwif_t *hwif, unsigned long dma_base)
- ide_setup_dma(hwif, dma_base, 8);
-void __init ide_init_sl82c105(ide_hwif_t *hwif)
- struct pci_dev *dev = hwif->pci_dev;
- unsigned short t16;
- unsigned int t32;
- pci_read_config_word(dev, PCI_COMMAND, &t16);
- printk("SL82C105 command word: %x\n",t16);
- t16 |= PCI_COMMAND_IO;
- pci_write_config_word(dev, PCI_COMMAND, t16);
- /* IDE timing */
- pci_read_config_dword(dev, 0x44, &t32);
- printk("IDE timing: %08x, resetting to PIO0 timing\n",t32);
- pci_write_config_dword(dev, 0x44, 0x03e4);
-#ifndef CONFIG_MBX
- pci_read_config_dword(dev, 0x40, &t32);
- printk("IDE control/status register: %08x\n",t32);
- pci_write_config_dword(dev, 0x40, 0x10ff08a1);
-#endif /* CONFIG_MBX */

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 12:57    [W:0.041 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site