diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2010-08-10 23:04:53 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-12-20 10:07:44 -0500 |
commit | fd62999bad9fc3b176ef6bc9d2a71be940efd908 (patch) | |
tree | 62f1986003c9e74cb17190c989dec61dc88b9533 | |
parent | c085052bc52d7caaca1172aabbedc06777253961 (diff) |
ARM: pxa: Colibri PXA320 PCMCIA driver
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r-- | arch/arm/mach-pxa/colibri-pxa320.c | 21 | ||||
-rw-r--r-- | drivers/pcmcia/Kconfig | 3 | ||||
-rw-r--r-- | drivers/pcmcia/Makefile | 1 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_colibri.c | 17 |
4 files changed, 40 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c index 3d2c944b16e3..ff9ff5f4fc47 100644 --- a/arch/arm/mach-pxa/colibri-pxa320.c +++ b/arch/arm/mach-pxa/colibri-pxa320.c | |||
@@ -73,6 +73,27 @@ static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = { | |||
73 | /* I2C */ | 73 | /* I2C */ |
74 | GPIO32_I2C_SCL, | 74 | GPIO32_I2C_SCL, |
75 | GPIO33_I2C_SDA, | 75 | GPIO33_I2C_SDA, |
76 | |||
77 | /* PCMCIA */ | ||
78 | MFP_CFG(GPIO59, AF7), /* PRST ; AF7 to tristate */ | ||
79 | MFP_CFG(GPIO61, AF7), /* PCE1 ; AF7 to tristate */ | ||
80 | MFP_CFG(GPIO60, AF7), /* PCE2 ; AF7 to tristate */ | ||
81 | MFP_CFG(GPIO62, AF7), /* PCD ; AF7 to tristate */ | ||
82 | MFP_CFG(GPIO56, AF7), /* PSKTSEL ; AF7 to tristate */ | ||
83 | GPIO27_GPIO, /* RDnWR ; input/tristate */ | ||
84 | GPIO50_GPIO, /* PREG ; input/tristate */ | ||
85 | GPIO2_RDY, | ||
86 | GPIO5_NPIOR, | ||
87 | GPIO6_NPIOW, | ||
88 | GPIO7_NPIOS16, | ||
89 | GPIO8_NPWAIT, | ||
90 | GPIO29_GPIO, /* PRDY (READY GPIO) */ | ||
91 | GPIO57_GPIO, /* PPEN (POWER GPIO) */ | ||
92 | GPIO81_GPIO, /* PCD (DETECT GPIO) */ | ||
93 | GPIO77_GPIO, /* PRST (RESET GPIO) */ | ||
94 | GPIO53_GPIO, /* PBVD1 */ | ||
95 | GPIO79_GPIO, /* PBVD2 */ | ||
96 | GPIO54_GPIO, /* POE */ | ||
76 | }; | 97 | }; |
77 | #else | 98 | #else |
78 | static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {}; | 99 | static mfp_cfg_t colibri_pxa320_evalboard_pin_config[] __initdata = {}; |
diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig index e9acf035437b..de886f3dfd39 100644 --- a/drivers/pcmcia/Kconfig +++ b/drivers/pcmcia/Kconfig | |||
@@ -215,7 +215,8 @@ config PCMCIA_PXA2XX | |||
215 | depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \ | 215 | depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \ |
216 | || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \ | 216 | || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \ |
217 | || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \ | 217 | || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \ |
218 | || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI) | 218 | || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI \ |
219 | || MACH_COLIBRI320) | ||
219 | select PCMCIA_SOC_COMMON | 220 | select PCMCIA_SOC_COMMON |
220 | help | 221 | help |
221 | Say Y here to include support for the PXA2xx PCMCIA controller | 222 | Say Y here to include support for the PXA2xx PCMCIA controller |
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index 2fee7ef0c391..9a44a90dcf7a 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile | |||
@@ -71,6 +71,7 @@ pxa2xx-obj-$(CONFIG_MACH_STARGATE2) += pxa2xx_stargate2.o | |||
71 | pxa2xx-obj-$(CONFIG_MACH_VPAC270) += pxa2xx_vpac270.o | 71 | pxa2xx-obj-$(CONFIG_MACH_VPAC270) += pxa2xx_vpac270.o |
72 | pxa2xx-obj-$(CONFIG_MACH_BALLOON3) += pxa2xx_balloon3.o | 72 | pxa2xx-obj-$(CONFIG_MACH_BALLOON3) += pxa2xx_balloon3.o |
73 | pxa2xx-obj-$(CONFIG_MACH_COLIBRI) += pxa2xx_colibri.o | 73 | pxa2xx-obj-$(CONFIG_MACH_COLIBRI) += pxa2xx_colibri.o |
74 | pxa2xx-obj-$(CONFIG_MACH_COLIBRI320) += pxa2xx_colibri.o | ||
74 | 75 | ||
75 | obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_base.o $(pxa2xx-obj-y) | 76 | obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_base.o $(pxa2xx-obj-y) |
76 | 77 | ||
diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/drivers/pcmcia/pxa2xx_colibri.c index 4ed876c4398b..c3f72192af66 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/drivers/pcmcia/pxa2xx_colibri.c | |||
@@ -27,6 +27,13 @@ | |||
27 | #define COLIBRI270_DETECT_GPIO 84 | 27 | #define COLIBRI270_DETECT_GPIO 84 |
28 | #define COLIBRI270_READY_GPIO 1 | 28 | #define COLIBRI270_READY_GPIO 1 |
29 | 29 | ||
30 | #define COLIBRI320_RESET_GPIO 77 | ||
31 | #define COLIBRI320_PPEN_GPIO 57 | ||
32 | #define COLIBRI320_BVD1_GPIO 53 | ||
33 | #define COLIBRI320_BVD2_GPIO 79 | ||
34 | #define COLIBRI320_DETECT_GPIO 81 | ||
35 | #define COLIBRI320_READY_GPIO 29 | ||
36 | |||
30 | static struct { | 37 | static struct { |
31 | int reset_gpio; | 38 | int reset_gpio; |
32 | int ppen_gpio; | 39 | int ppen_gpio; |
@@ -186,6 +193,14 @@ static int __init colibri_pcmcia_init(void) | |||
186 | colibri_pcmcia_gpio.bvd2_gpio = COLIBRI270_BVD2_GPIO; | 193 | colibri_pcmcia_gpio.bvd2_gpio = COLIBRI270_BVD2_GPIO; |
187 | colibri_pcmcia_gpio.detect_gpio = COLIBRI270_DETECT_GPIO; | 194 | colibri_pcmcia_gpio.detect_gpio = COLIBRI270_DETECT_GPIO; |
188 | colibri_pcmcia_gpio.ready_gpio = COLIBRI270_READY_GPIO; | 195 | colibri_pcmcia_gpio.ready_gpio = COLIBRI270_READY_GPIO; |
196 | /* Colibri PXA320 */ | ||
197 | } else if (machine_is_colibri320()) { | ||
198 | colibri_pcmcia_gpio.reset_gpio = COLIBRI320_RESET_GPIO; | ||
199 | colibri_pcmcia_gpio.ppen_gpio = COLIBRI320_PPEN_GPIO; | ||
200 | colibri_pcmcia_gpio.bvd1_gpio = COLIBRI320_BVD1_GPIO; | ||
201 | colibri_pcmcia_gpio.bvd2_gpio = COLIBRI320_BVD2_GPIO; | ||
202 | colibri_pcmcia_gpio.detect_gpio = COLIBRI320_DETECT_GPIO; | ||
203 | colibri_pcmcia_gpio.ready_gpio = COLIBRI320_READY_GPIO; | ||
189 | } | 204 | } |
190 | 205 | ||
191 | ret = platform_device_add_data(colibri_pcmcia_device, | 206 | ret = platform_device_add_data(colibri_pcmcia_device, |
@@ -209,6 +224,6 @@ module_init(colibri_pcmcia_init); | |||
209 | module_exit(colibri_pcmcia_exit); | 224 | module_exit(colibri_pcmcia_exit); |
210 | 225 | ||
211 | MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); | 226 | MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); |
212 | MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270"); | 227 | MODULE_DESCRIPTION("PCMCIA support for Toradex Colibri PXA270/PXA320"); |
213 | MODULE_ALIAS("platform:pxa2xx-pcmcia"); | 228 | MODULE_ALIAS("platform:pxa2xx-pcmcia"); |
214 | MODULE_LICENSE("GPL"); | 229 | MODULE_LICENSE("GPL"); |