]> err.no Git - linux-2.6/commitdiff
ide: Stop mapping ROMs
authorAlan Cox <alan@redhat.com>
Thu, 19 Jul 2007 23:11:54 +0000 (01:11 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 19 Jul 2007 23:11:54 +0000 (01:11 +0200)
Various old IDE drivers go mapping ROM devices for no apparent reason and
without using the ROM mapping API we now have. They don't actually use
the ROM they map and the new libata drivers are happy without it being
mapped so rather than port them lets just junk it for the next -rc1.

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/pci/aec62xx.c
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_old.c

index e5d09367627ee19e99217af29dd2bae68fc50286..6d18fef558bdb6f1c74880ede0482843a2e535cf 100644 (file)
@@ -174,12 +174,6 @@ static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev, const ch
 {
        int bus_speed = system_bus_clock();
 
-       if (dev->resource[PCI_ROM_RESOURCE].start) {
-               pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
-               printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name,
-                       (unsigned long)dev->resource[PCI_ROM_RESOURCE].start);
-       }
-
        if (bus_speed <= 33)
                pci_set_drvdata(dev, (void *) aec6xxx_33_base);
        else
index 2c24c3de8846f0aaee3dafee2d6c3d0730077ac0..64f19743b127601e01a99bf3d0ca7dbf6c0928a9 100644 (file)
@@ -120,17 +120,10 @@ static unsigned int __devinit init_chipset_hpt34x(struct pci_dev *dev, const cha
        pci_write_config_byte(dev, HPT34X_PCI_INIT_REG, 0x00);
        pci_read_config_word(dev, PCI_COMMAND, &cmd);
 
-       if (cmd & PCI_COMMAND_MEMORY) {
-               if (pci_resource_start(dev, PCI_ROM_RESOURCE)) {
-                       pci_write_config_dword(dev, PCI_ROM_ADDRESS,
-                               dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
-                       printk(KERN_INFO "HPT345: ROM enabled at 0x%08lx\n",
-                               (unsigned long)dev->resource[PCI_ROM_RESOURCE].start);
-               }
+       if (cmd & PCI_COMMAND_MEMORY)
                pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0xF0);
-       } else {
+       else
                pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x20);
-       }
 
        /*
         * Since 20-23 can be assigned and are R/W, we correct them.
index e9b07a97c3408d1da2ac7cca57e268ed4173f3a6..81853d740aeeaa29ddb317454478fd7fb7e34ed2 100644 (file)
@@ -994,14 +994,6 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
         */
        *info = *(struct hpt_info *)pci_get_drvdata(dev);
 
-       /*
-        * FIXME: Not portable. Also, why do we enable the ROM in the first place?
-        * We don't seem to be using it.
-        */
-       if (dev->resource[PCI_ROM_RESOURCE].start)
-               pci_write_config_dword(dev, PCI_ROM_ADDRESS,
-                       dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
-
        pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4));
        pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x78);
        pci_write_config_byte(dev, PCI_MIN_GNT, 0x08);
index ee5020df005d7515eaf7822c18515a34fb119fff..06c5e93d37a2fe112403814d34bfb85ecf28d734 100644 (file)
@@ -378,13 +378,6 @@ static unsigned int __devinit init_chipset_pdcnew(struct pci_dev *dev, const cha
        int f, r;
        u8 pll_ctl0, pll_ctl1;
 
-       if (dev->resource[PCI_ROM_RESOURCE].start) {
-               pci_write_config_dword(dev, PCI_ROM_ADDRESS,
-                       dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
-               printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name,
-                       (unsigned long)dev->resource[PCI_ROM_RESOURCE].start);
-       }
-
 #ifdef CONFIG_PPC_PMAC
        apple_kiwi_init(dev);
 #endif
index 41ac4a94959fb2c6fd1e4032cf599fe9370d84b4..25cebfe18dddb43f5d8bd13642fcaca996ef4de3 100644 (file)
@@ -316,14 +316,6 @@ static void pdc202xx_reset (ide_drive_t *drive)
 static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev,
                                                        const char *name)
 {
-       /* This doesn't appear needed */
-       if (dev->resource[PCI_ROM_RESOURCE].start) {
-               pci_write_config_dword(dev, PCI_ROM_ADDRESS,
-                       dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
-               printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name,
-                       (unsigned long)dev->resource[PCI_ROM_RESOURCE].start);
-       }
-
        return dev->irq;
 }