]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/ata_piix.c
Merge watchdog driver updates
[~andy/linux] / drivers / scsi / ata_piix.c
index 03695616e59ef597c9c3ce51a8c425814f96af63..deec0cef88d92bcb007c9b28c514948b3c700758 100644 (file)
@@ -1,24 +1,42 @@
 /*
-
-    ata_piix.c - Intel PATA/SATA controllers
-
-    Maintained by:  Jeff Garzik <jgarzik@pobox.com>
-                   Please ALWAYS copy linux-ide@vger.kernel.org
-                   on emails.
-
-
-       Copyright 2003-2004 Red Hat Inc
-       Copyright 2003-2004 Jeff Garzik
-
-
-       Copyright header from piix.c:
-
-    Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer
-    Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org>
-    Copyright (C) 2003 Red Hat Inc <alan@redhat.com>
-
-    May be copied or modified under the terms of the GNU General Public License
-
+ *    ata_piix.c - Intel PATA/SATA controllers
+ *
+ *    Maintained by:  Jeff Garzik <jgarzik@pobox.com>
+ *                 Please ALWAYS copy linux-ide@vger.kernel.org
+ *                 on emails.
+ *
+ *
+ *     Copyright 2003-2005 Red Hat Inc
+ *     Copyright 2003-2005 Jeff Garzik
+ *
+ *
+ *     Copyright header from piix.c:
+ *
+ *  Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer
+ *  Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org>
+ *  Copyright (C) 2003 Red Hat Inc <alan@redhat.com>
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; see the file COPYING.  If not, write to
+ *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ *  libata documentation is available via 'make {ps|pdf}docs',
+ *  as Documentation/DocBook/libata.*
+ *
+ *  Hardware documentation available at http://developer.intel.com/
+ *
  */
 
 #include <linux/kernel.h>
@@ -565,8 +583,7 @@ static void pci_enable_intx(struct pci_dev *pdev)
 #define AHCI_ENABLE (1 << 31)
 static int piix_disable_ahci(struct pci_dev *pdev)
 {
-       void *mmio;
-       unsigned long addr;
+       void __iomem *mmio;
        u32 tmp;
        int rc = 0;
 
@@ -574,11 +591,11 @@ static int piix_disable_ahci(struct pci_dev *pdev)
         * works because this device is usually set up by BIOS.
         */
 
-       addr = pci_resource_start(pdev, AHCI_PCI_BAR);
-       if (!addr || !pci_resource_len(pdev, AHCI_PCI_BAR))
+       if (!pci_resource_start(pdev, AHCI_PCI_BAR) ||
+           !pci_resource_len(pdev, AHCI_PCI_BAR))
                return 0;
 
-       mmio = ioremap(addr, 64);
+       mmio = pci_iomap(pdev, AHCI_PCI_BAR, 64);
        if (!mmio)
                return -ENOMEM;
 
@@ -592,7 +609,7 @@ static int piix_disable_ahci(struct pci_dev *pdev)
                        rc = -EIO;
        }
 
-       iounmap(mmio);
+       pci_iounmap(pdev, mmio);
        return rc;
 }