[package] libpcap: explicitely disable libnl support to prevent different build resul...
[openwrt.git] / target / linux / adm5120 / files / arch / mips / pci / pci-adm5120.c
index 722d47c..86657ce 100644 (file)
@@ -1,27 +1,19 @@
 /*
 /*
- *  $Id$
- *
  *  ADM5120 PCI Host Controller driver
  *
  *  ADM5120 PCI Host Controller driver
  *
- *  Copyright (C) ADMtek Incorporated.
- *  Copyright (C) 2005 Jeroen Vreeken (pe1rxq@amsat.org)
- *  Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
- *  Copyright (C) 2007 OpenWrt.org
+ *  Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
  *
  *
- *  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
- *  of the License, or (at your option) any later version.
+ *  This code was based on the ADM5120 specific port of the Linux 2.6.10 kernel
+ *  done by Jeroen Vreeken
+ *     Copyright (C) 2005 Jeroen Vreeken (pe1rxq@amsat.org)
  *
  *
- *  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.
+ *  Jeroen's code was based on the Linux 2.4.xx source codes found in various
+ *  tarballs released by Edimax for it's ADM5120 based devices
+ *     Copyright (C) ADMtek Incorporated
  *
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the
- *  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA  02110-1301, USA.
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
  *
  */
 #include <linux/types.h>
  *
  */
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/io.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/io.h>
+#include <linux/delay.h>
 
 #include <linux/pci.h>
 #include <linux/pci_ids.h>
 #include <linux/pci_regs.h>
 
 
 #include <linux/pci.h>
 #include <linux/pci_ids.h>
 #include <linux/pci_regs.h>
 
-#include <asm/delay.h>
 #include <asm/bootinfo.h>
 
 #include <asm/bootinfo.h>
 
-#include <adm5120_defs.h>
-#include <adm5120_info.h>
-#include <adm5120_defs.h>
-#include <adm5120_platform.h>
+#include <asm/mach-adm5120/adm5120_defs.h>
+#include <asm/mach-adm5120/adm5120_info.h>
+#include <asm/mach-adm5120/adm5120_defs.h>
+#include <asm/mach-adm5120/adm5120_platform.h>
 
 #undef DEBUG
 
 
 #undef DEBUG
 
@@ -79,8 +71,8 @@ static inline u32 read_cfgdata(void)
 
 static inline u32 mkaddr(struct pci_bus *bus, unsigned int devfn, int where)
 {
 
 static inline u32 mkaddr(struct pci_bus *bus, unsigned int devfn, int where)
 {
-       return (((bus->number & 0xFF) << 16) | ((devfn & 0xFF) << 8) | \
-               (where & 0xFC));
+       return ((bus->number & 0xFF) << 16) | ((devfn & 0xFF) << 8) | \
+               (where & 0xFC);
 }
 
 /* -------------------------------------------------------------------------*/
 }
 
 /* -------------------------------------------------------------------------*/
@@ -209,7 +201,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
                goto out;
        }
 
                goto out;
        }
 
-       if (slot < 1 || slot > 3) {
+       if (slot < 1 || slot > 4) {
                printk(KERN_ALERT "PCI: slot number %u is not supported\n",
                        slot);
                goto out;
                printk(KERN_ALERT "PCI: slot number %u is not supported\n",
                        slot);
                goto out;
@@ -265,14 +257,10 @@ static struct pci_controller adm5120_controller = {
 
 static int __init adm5120_pci_setup(void)
 {
 
 static int __init adm5120_pci_setup(void)
 {
-       int pci_bios;
-
-       pci_bios = adm5120_has_pci();
-
-       printk(KERN_INFO "adm5120: system has %sPCI BIOS\n",
-               pci_bios ? "" : "no ");
-       if (pci_bios == 0)
+       if (adm5120_package_pqfp()) {
+               printk(KERN_INFO "PCI: not available on ADM5120P\n");
                return -1;
                return -1;
+       }
 
        /* Avoid ISA compat ranges.  */
        PCIBIOS_MIN_IO = 0x00000000;
 
        /* Avoid ISA compat ranges.  */
        PCIBIOS_MIN_IO = 0x00000000;
This page took 0.036375 seconds and 4 git commands to generate.