add a driver for rtl8306 switches
[openwrt.git] / target / linux / atheros / patches-2.6.28 / 105-ar2315_pci.patch
index 389a0ec2148965224c39c52863b2fd6b2f5cd8d8..7c5afbdb830ea14a26cc6b65b73c6867e687e1f9 100644 (file)
@@ -7,7 +7,7 @@
 +obj-$(CONFIG_ATHEROS_AR2315_PCI) += pci.o
 --- /dev/null
 +++ b/arch/mips/ar231x/pci.c
-@@ -0,0 +1,231 @@
+@@ -0,0 +1,230 @@
 +/*
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
 +#include <ar231x_platform.h>
 +#include <ar231x.h>
 +#include <ar2315_regs.h>
++#include "devices.h"
 +
 +#define AR531X_MEM_BASE    0x80800000UL
 +#define AR531X_MEM_SIZE    0x00ffffffUL
 +#define AR531X_IO_SIZE     0x00007fffUL
 +
-+#define IS_2315() (current_cpu_data.cputype == CPU_4KEC)
-+
 +static unsigned long configspace;
 +
 +static int config_access(int devfn, int where, int size, u32 *ptr, bool write)
 +{
 +      u32 reg;
 +
-+      if (!IS_2315())
++      if (ar231x_devtype != DEV_TYPE_AR2315)
 +              return -ENODEV;
 +
 +      configspace = (unsigned long) ioremap_nocache(0x80000000, 1*1024*1024); /* Remap PCI config space */
 --- a/arch/mips/ar231x/ar2315.c
 +++ b/arch/mips/ar231x/ar2315.c
 @@ -61,6 +61,27 @@ static inline void ar2315_gpio_irq(void)
-       do_IRQ(AR531X_GPIO_IRQ_BASE + fls(pend) - 1);
+               do_IRQ(AR531X_GPIO_IRQ_BASE + bit);
  }
  
 +#ifdef CONFIG_ATHEROS_AR2315_PCI