aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorDirk Opfer <dirk@opfer-online.de>2005-11-08 19:15:50 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-11-08 19:15:50 +0000
commit4c18ad20493c9eac6e7d0c2a05156acfc02d9b6b (patch)
treed5c2d29082678b5ad87e83700e1cbac04afc2749 /arch/arm/mach-pxa
parenta63ae4427c6af66d6eda26e5da8fed53f8fbede3 (diff)
[ARM] 3124/1: Sharp SL-6000x: SharpSL PCMCIA Updates
Patch from Dirk Opfer This patch updates the tosa machine to use the new SharpSL PCMCIA layer introduced with Patch #3093/1 Depends on #3093/1 Signed-off-by: Dirk Opfer <Dirk@Opfer-Online.de> Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/tosa.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index f3e01891e85..c312054dfb8 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -98,6 +98,9 @@ struct platform_device tosascoop_jc_device = {
.resource = tosa_scoop_jc_resources,
};
+/*
+ * PCMCIA
+ */
static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = {
{
.dev = &tosascoop_device.dev,
@@ -111,6 +114,33 @@ static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = {
},
};
+static void tosa_pcmcia_init(void)
+{
+ /* Setup default state of GPIO outputs
+ before we enable them as outputs. */
+ GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
+ GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
+ GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) |
+ GPIO_bit(GPIO53_nPCE_2);
+
+ pxa_gpio_mode(GPIO48_nPOE_MD);
+ pxa_gpio_mode(GPIO49_nPWE_MD);
+ pxa_gpio_mode(GPIO50_nPIOR_MD);
+ pxa_gpio_mode(GPIO51_nPIOW_MD);
+ pxa_gpio_mode(GPIO55_nPREG_MD);
+ pxa_gpio_mode(GPIO56_nPWAIT_MD);
+ pxa_gpio_mode(GPIO57_nIOIS16_MD);
+ pxa_gpio_mode(GPIO52_nPCE_1_MD);
+ pxa_gpio_mode(GPIO53_nPCE_2_MD);
+ pxa_gpio_mode(GPIO54_pSKTSEL_MD);
+}
+
+static struct scoop_pcmcia_config tosa_pcmcia_config = {
+ .devs = &tosa_pcmcia_scoop[0],
+ .num_devs = 2,
+ .pcmcia_init = tosa_pcmcia_init,
+};
+
/*
* USB Device Controller
*/
@@ -249,10 +279,9 @@ static void __init tosa_init(void)
pxa_set_mci_info(&tosa_mci_platform_data);
pxa_set_udc_info(&udc_info);
pxa_set_ficp_info(&tosa_ficp_platform_data);
- platform_add_devices(devices, ARRAY_SIZE(devices));
+ platform_scoop_config = &tosa_pcmcia_config;
- scoop_num = 2;
- scoop_devs = &tosa_pcmcia_scoop[0];
+ platform_add_devices(devices, ARRAY_SIZE(devices));
}
static void __init fixup_tosa(struct machine_desc *desc,