atheros: don't try to enable pci on AR2317 (fixes #3533)
[openwrt/staging/wigyori.git] / target / linux / atheros / files / arch / mips / atheros / ar5315 / pci.c
index 9040a43ecd181d4d6b458b944599f37d7b75248f..166fa1cf9756d67c2564719c51b48e144d41e6f1 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/spinlock.h>
 #include <linux/delay.h>
 #include <linux/irq.h>
+#include <asm/bootinfo.h>
 #include <asm/paccess.h>
 #include <asm/irq_cpu.h>
 #include <asm/io.h>
@@ -186,6 +187,9 @@ int __init ar5315_pci_init(void)
 {
        u32 reg;
 
+       if (mips_machtype != MACH_ATHEROS_AR2315)
+               return -ENODEV;
+
        printk("AR531x PCI init... \n");
 
        cfgaddr = (u32) ioremap_nocache(0x80000000, 1*1024*1024); /* Remap PCI config space */