Merge pull request #580 from wigyori/cc-libpcap
[15.05/openwrt.git] / target / linux / cns3xxx / patches-3.18 / 100-laguna_support.patch
1 --- a/arch/arm/mach-cns3xxx/Kconfig
2 +++ b/arch/arm/mach-cns3xxx/Kconfig
3 @@ -22,4 +22,12 @@ config MACH_CNS3420VB
4           This is a platform with an on-board ARM11 MPCore and has support
5           for USB, USB-OTG, MMC/SD/SDIO, SATA, PCI-E, etc.
6  
7 +config MACH_GW2388
8 +       bool "Support for Gateworks Laguna Platform"
9 +       help
10 +         Include support for the Gateworks Laguna Platform
11 +
12 +         This is a platform with an on-board ARM11 MPCore and has support
13 +         for USB, USB-OTG, MMC/SD/SDIO, SATA, PCI-E, I2C, GIG, etc.
14 +
15  endif
16 --- a/arch/arm/mach-cns3xxx/Makefile
17 +++ b/arch/arm/mach-cns3xxx/Makefile
18 @@ -8,3 +8,5 @@ CFLAGS_pcie.o                           += -Wframe-larger-than=
19  cns3xxx-$(CONFIG_MACH_CNS3420VB)       += cns3420vb.o
20  cns3xxx-$(CONFIG_SMP)                  += platsmp.o headsmp.o cns3xxx_fiq.o
21  cns3xxx-$(CONFIG_HOTPLUG_CPU)          += hotplug.o
22 +cns3xxx-$(CONFIG_MACH_GW2388)          += laguna.o
23 +
24 --- a/arch/arm/mach-cns3xxx/devices.c
25 +++ b/arch/arm/mach-cns3xxx/devices.c
26 @@ -16,6 +16,7 @@
27  #include <linux/compiler.h>
28  #include <linux/dma-mapping.h>
29  #include <linux/platform_device.h>
30 +#include <asm/mach-types.h>
31  #include "cns3xxx.h"
32  #include "pm.h"
33  #include "core.h"
34 @@ -101,7 +102,11 @@ void __init cns3xxx_sdhci_init(void)
35         u32 gpioa_pins = __raw_readl(gpioa);
36  
37         /* MMC/SD pins share with GPIOA */
38 -       gpioa_pins |= 0x1fff0004;
39 +       if (machine_is_gw2388()) {
40 +               gpioa_pins |= 0x1fff0000;
41 +       } else {
42 +               gpioa_pins |= 0x1fff0004;
43 +       }
44         __raw_writel(gpioa_pins, gpioa);
45  
46         cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO));