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