X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/0d365ef3df8d2874e5034d63ead8a55ff7d5cca9..HEAD:/target/linux/adm5120/files/arch/mips/pci/pci-adm5120.c diff --git a/target/linux/adm5120/files/arch/mips/pci/pci-adm5120.c b/target/linux/adm5120/files/arch/mips/pci/pci-adm5120.c index b0caef24f..86657ce84 100644 --- a/target/linux/adm5120/files/arch/mips/pci/pci-adm5120.c +++ b/target/linux/adm5120/files/arch/mips/pci/pci-adm5120.c @@ -1,10 +1,7 @@ /* - * $Id$ - * * ADM5120 PCI Host Controller driver * - * Copyright (C) 2007 OpenWrt.org - * Copyright (C) 2007 Gabor Juhos + * Copyright (C) 2007-2008 Gabor Juhos * * This code was based on the ADM5120 specific port of the Linux 2.6.10 kernel * done by Jeroen Vreeken @@ -24,18 +21,18 @@ #include #include #include +#include #include #include #include -#include #include -#include -#include -#include -#include +#include +#include +#include +#include #undef DEBUG @@ -74,8 +71,8 @@ static inline u32 read_cfgdata(void) 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); } /* -------------------------------------------------------------------------*/ @@ -204,7 +201,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 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; @@ -260,14 +257,10 @@ static struct pci_controller adm5120_controller = { 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; + } /* Avoid ISA compat ranges. */ PCIBIOS_MIN_IO = 0x00000000;