aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorBridge Wu <bridge.wu@marvell.com>2007-12-21 06:27:08 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-26 10:07:53 -0500
commit5a1f21b1e546fafe840944f02949c1a8a8725132 (patch)
tree0d91ffd374c961507f6579b249c4ad9aa75e6b8b /arch/arm
parent8d33b05581d1bc66e2356957bb2739e177a9cc36 (diff)
[ARM] pxa: mmc: add 3rd host controller support for pxa310
This patch is to add the third mmc controller support _only_ for pxa310. On zylonite, the third controller support one slot. Signed-off-by: Bridge Wu <bridge.wu@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-pxa/devices.c39
-rw-r--r--arch/arm/mach-pxa/devices.h1
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c1
-rw-r--r--arch/arm/mach-pxa/zylonite.c4
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa300.c12
5 files changed, 56 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index bc04e87ed3b4..061ec92eb1e2 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -589,4 +589,43 @@ void __init pxa3xx_set_mci2_info(struct pxamci_platform_data *info)
589 pxa_register_device(&pxa3xx_device_mci2, info); 589 pxa_register_device(&pxa3xx_device_mci2, info);
590} 590}
591 591
592static struct resource pxa3xx_resources_mci3[] = {
593 [0] = {
594 .start = 0x42500000,
595 .end = 0x42500fff,
596 .flags = IORESOURCE_MEM,
597 },
598 [1] = {
599 .start = IRQ_MMC3,
600 .end = IRQ_MMC3,
601 .flags = IORESOURCE_IRQ,
602 },
603 [2] = {
604 .start = 100,
605 .end = 100,
606 .flags = IORESOURCE_DMA,
607 },
608 [3] = {
609 .start = 101,
610 .end = 101,
611 .flags = IORESOURCE_DMA,
612 },
613};
614
615struct platform_device pxa3xx_device_mci3 = {
616 .name = "pxa2xx-mci",
617 .id = 2,
618 .dev = {
619 .dma_mask = &pxamci_dmamask,
620 .coherent_dma_mask = 0xffffffff,
621 },
622 .num_resources = ARRAY_SIZE(pxa3xx_resources_mci3),
623 .resource = pxa3xx_resources_mci3,
624};
625
626void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info)
627{
628 pxa_register_device(&pxa3xx_device_mci3, info);
629}
630
592#endif /* CONFIG_PXA3xx */ 631#endif /* CONFIG_PXA3xx */
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
index d78068cc8015..96c7c8909068 100644
--- a/arch/arm/mach-pxa/devices.h
+++ b/arch/arm/mach-pxa/devices.h
@@ -1,5 +1,6 @@
1extern struct platform_device pxa_device_mci; 1extern struct platform_device pxa_device_mci;
2extern struct platform_device pxa3xx_device_mci2; 2extern struct platform_device pxa3xx_device_mci2;
3extern struct platform_device pxa3xx_device_mci3;
3extern struct platform_device pxa_device_udc; 4extern struct platform_device pxa_device_udc;
4extern struct platform_device pxa_device_fb; 5extern struct platform_device pxa_device_fb;
5extern struct platform_device pxa_device_ffuart; 6extern struct platform_device pxa_device_ffuart;
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 124ad5eb7ab0..843ba9bf3df7 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -197,6 +197,7 @@ static struct clk pxa3xx_clks[] = {
197 197
198 PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev), 198 PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev),
199 PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev), 199 PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev),
200 PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev),
200}; 201};
201 202
202void __init pxa3xx_init_irq(void) 203void __init pxa3xx_init_irq(void)
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 33986036f146..b49c69d024c7 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -29,7 +29,7 @@
29 29
30#include "generic.h" 30#include "generic.h"
31 31
32#define MAX_SLOTS 2 32#define MAX_SLOTS 3
33struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; 33struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS];
34 34
35int gpio_backlight; 35int gpio_backlight;
@@ -242,6 +242,8 @@ static void __init zylonite_init_mmc(void)
242{ 242{
243 pxa_set_mci_info(&zylonite_mci_platform_data); 243 pxa_set_mci_info(&zylonite_mci_platform_data);
244 pxa3xx_set_mci2_info(&zylonite_mci2_platform_data); 244 pxa3xx_set_mci2_info(&zylonite_mci2_platform_data);
245 if (cpu_is_pxa310())
246 pxa3xx_set_mci3_info(&zylonite_mci_platform_data);
245} 247}
246#else 248#else
247static inline void zylonite_init_mmc(void) {} 249static inline void zylonite_init_mmc(void) {}
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c
index 38c1ddc6cb1d..0e159a3024c0 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -133,6 +133,14 @@ static mfp_cfg_t pxa310_mfp_cfg[] __initdata = {
133 /* Ethernet */ 133 /* Ethernet */
134 GPIO2_nCS3, 134 GPIO2_nCS3,
135 GPIO102_GPIO, 135 GPIO102_GPIO,
136
137 /* MMC3 */
138 GPIO7_2_MMC3_DAT0,
139 GPIO8_2_MMC3_DAT1,
140 GPIO9_2_MMC3_DAT2,
141 GPIO10_2_MMC3_DAT3,
142 GPIO103_MMC3_CLK,
143 GPIO105_MMC3_CMD,
136}; 144};
137 145
138#define NUM_LCD_DETECT_PINS 7 146#define NUM_LCD_DETECT_PINS 7
@@ -205,5 +213,9 @@ void __init zylonite_pxa300_init(void)
205 if (cpu_is_pxa310()) { 213 if (cpu_is_pxa310()) {
206 pxa3xx_mfp_config(ARRAY_AND_SIZE(pxa310_mfp_cfg)); 214 pxa3xx_mfp_config(ARRAY_AND_SIZE(pxa310_mfp_cfg));
207 gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO102); 215 gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO102);
216
217 /* MMC card detect & write protect for controller 2 */
218 zylonite_mmc_slot[2].gpio_cd = EXT_GPIO(30);
219 zylonite_mmc_slot[2].gpio_wp = EXT_GPIO(31);
208 } 220 }
209} 221}