]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/pci/hpt366.c
ide: Stop mapping ROMs
[linux-2.6-omap-h63xx.git] / drivers / ide / pci / hpt366.c
index 4b6bae8eee82822b875bd40f4ccba0cb72894c9b..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);
@@ -1413,11 +1405,9 @@ static int __devinit init_setup_hpt372n(struct pci_dev *dev, ide_pci_device_t *d
 static int __devinit init_setup_hpt371(struct pci_dev *dev, ide_pci_device_t *d)
 {
        struct hpt_info *info;
-       u8 rev = 0, mcr1 = 0;
-
-       pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
+       u8 mcr1 = 0;
 
-       if (rev > 1) {
+       if (dev->revision > 1) {
                d->name = "HPT371N";
 
                info = &hpt371n;
@@ -1442,11 +1432,8 @@ static int __devinit init_setup_hpt371(struct pci_dev *dev, ide_pci_device_t *d)
 static int __devinit init_setup_hpt372a(struct pci_dev *dev, ide_pci_device_t *d)
 {
        struct hpt_info *info;
-       u8 rev = 0;
 
-       pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
-
-       if (rev > 1) {
+       if (dev->revision > 1) {
                d->name = "HPT372N";
 
                info = &hpt372n;
@@ -1460,11 +1447,8 @@ static int __devinit init_setup_hpt372a(struct pci_dev *dev, ide_pci_device_t *d
 static int __devinit init_setup_hpt302(struct pci_dev *dev, ide_pci_device_t *d)
 {
        struct hpt_info *info;
-       u8 rev = 0;
-
-       pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
 
-       if (rev > 1) {
+       if (dev->revision > 1) {
                d->name = "HPT302N";
 
                info = &hpt302n;
@@ -1478,7 +1462,7 @@ static int __devinit init_setup_hpt302(struct pci_dev *dev, ide_pci_device_t *d)
 static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d)
 {
        struct pci_dev *dev2;
-       u8 rev = 0;
+       u8 rev = dev->revision;
        static char   *chipset_names[] = { "HPT366", "HPT366",  "HPT368",
                                           "HPT370", "HPT370A", "HPT372",
                                           "HPT372N" };
@@ -1489,8 +1473,6 @@ static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d)
        if (PCI_FUNC(dev->devfn) & 1)
                return -ENODEV;
 
-       pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
-
        switch (rev) {
        case 0:
        case 1: