aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBridge Wu <bridge.wu@marvell.com>2007-12-21 06:15:36 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-26 10:07:53 -0500
commit8d33b05581d1bc66e2356957bb2739e177a9cc36 (patch)
tree17812d30092a1e0634e6af50a3764ed9676b9657
parentfafc9d3fa35530c1a14e6743c477d7398b431e74 (diff)
[ARM] pxa: mmc: add 2nd host controller support for pxa3xx
This patch is to add the second mmc controller support for pxa3xx. It's valid for pxa3[0|1|2]0. On zylonite, the second controller has no slot. Signed-off-by: Bridge Wu <bridge.wu@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-pxa/devices.c40
-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.c6
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa300.c8
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa320.c8
-rw-r--r--include/asm-arm/arch-pxa/mmc.h1
7 files changed, 65 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 202d048f1cdd..bc04e87ed3b4 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -549,4 +549,44 @@ struct platform_device pxa3xx_device_ssp4 = {
549 .resource = pxa3xx_resource_ssp4, 549 .resource = pxa3xx_resource_ssp4,
550 .num_resources = ARRAY_SIZE(pxa3xx_resource_ssp4), 550 .num_resources = ARRAY_SIZE(pxa3xx_resource_ssp4),
551}; 551};
552
553static struct resource pxa3xx_resources_mci2[] = {
554 [0] = {
555 .start = 0x42000000,
556 .end = 0x42000fff,
557 .flags = IORESOURCE_MEM,
558 },
559 [1] = {
560 .start = IRQ_MMC2,
561 .end = IRQ_MMC2,
562 .flags = IORESOURCE_IRQ,
563 },
564 [2] = {
565 .start = 93,
566 .end = 93,
567 .flags = IORESOURCE_DMA,
568 },
569 [3] = {
570 .start = 94,
571 .end = 94,
572 .flags = IORESOURCE_DMA,
573 },
574};
575
576struct platform_device pxa3xx_device_mci2 = {
577 .name = "pxa2xx-mci",
578 .id = 1,
579 .dev = {
580 .dma_mask = &pxamci_dmamask,
581 .coherent_dma_mask = 0xffffffff,
582 },
583 .num_resources = ARRAY_SIZE(pxa3xx_resources_mci2),
584 .resource = pxa3xx_resources_mci2,
585};
586
587void __init pxa3xx_set_mci2_info(struct pxamci_platform_data *info)
588{
589 pxa_register_device(&pxa3xx_device_mci2, info);
590}
591
552#endif /* CONFIG_PXA3xx */ 592#endif /* CONFIG_PXA3xx */
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
index e78b48f62b36..d78068cc8015 100644
--- a/arch/arm/mach-pxa/devices.h
+++ b/arch/arm/mach-pxa/devices.h
@@ -1,4 +1,5 @@
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 pxa_device_udc; 3extern struct platform_device pxa_device_udc;
3extern struct platform_device pxa_device_fb; 4extern struct platform_device pxa_device_fb;
4extern struct platform_device pxa_device_ffuart; 5extern struct platform_device pxa_device_ffuart;
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 6271af303cb9..124ad5eb7ab0 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -196,6 +196,7 @@ static struct clk pxa3xx_clks[] = {
196 PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev), 196 PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev),
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}; 200};
200 201
201void __init pxa3xx_init_irq(void) 202void __init pxa3xx_init_irq(void)
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index f72f37f6ff0c..33986036f146 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -233,9 +233,15 @@ static struct pxamci_platform_data zylonite_mci_platform_data = {
233 .get_ro = zylonite_mci_ro, 233 .get_ro = zylonite_mci_ro,
234}; 234};
235 235
236static struct pxamci_platform_data zylonite_mci2_platform_data = {
237 .detect_delay = 20,
238 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
239};
240
236static void __init zylonite_init_mmc(void) 241static void __init zylonite_init_mmc(void)
237{ 242{
238 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);
239} 245}
240#else 246#else
241static inline void zylonite_init_mmc(void) {} 247static 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 cad92d480f2a..38c1ddc6cb1d 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -97,6 +97,14 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
97 GPIO7_MMC1_CLK, 97 GPIO7_MMC1_CLK,
98 GPIO8_MMC1_CMD, /* CMD0 for slot 0 */ 98 GPIO8_MMC1_CMD, /* CMD0 for slot 0 */
99 GPIO15_GPIO, /* CMD1 default as GPIO for slot 0 */ 99 GPIO15_GPIO, /* CMD1 default as GPIO for slot 0 */
100
101 /* MMC2 */
102 GPIO9_MMC2_DAT0,
103 GPIO10_MMC2_DAT1,
104 GPIO11_MMC2_DAT2,
105 GPIO12_MMC2_DAT3,
106 GPIO13_MMC2_CLK,
107 GPIO14_MMC2_CMD,
100}; 108};
101 109
102static mfp_cfg_t pxa300_mfp_cfg[] __initdata = { 110static mfp_cfg_t pxa300_mfp_cfg[] __initdata = {
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c
index 593f7bffb3b4..1036da3315d8 100644
--- a/arch/arm/mach-pxa/zylonite_pxa320.c
+++ b/arch/arm/mach-pxa/zylonite_pxa320.c
@@ -104,6 +104,14 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
104 GPIO22_MMC1_CLK, 104 GPIO22_MMC1_CLK,
105 GPIO23_MMC1_CMD,/* CMD0 for slot 0 */ 105 GPIO23_MMC1_CMD,/* CMD0 for slot 0 */
106 GPIO31_GPIO, /* CMD1 default as GPIO for slot 0 */ 106 GPIO31_GPIO, /* CMD1 default as GPIO for slot 0 */
107
108 /* MMC2 */
109 GPIO24_MMC2_DAT0,
110 GPIO25_MMC2_DAT1,
111 GPIO26_MMC2_DAT2,
112 GPIO27_MMC2_DAT3,
113 GPIO28_MMC2_CLK,
114 GPIO29_MMC2_CMD,
107}; 115};
108 116
109#define NUM_LCD_DETECT_PINS 7 117#define NUM_LCD_DETECT_PINS 7
diff --git a/include/asm-arm/arch-pxa/mmc.h b/include/asm-arm/arch-pxa/mmc.h
index ef4f570381d1..dd30299a3c66 100644
--- a/include/asm-arm/arch-pxa/mmc.h
+++ b/include/asm-arm/arch-pxa/mmc.h
@@ -17,5 +17,6 @@ struct pxamci_platform_data {
17}; 17};
18 18
19extern void pxa_set_mci_info(struct pxamci_platform_data *info); 19extern void pxa_set_mci_info(struct pxamci_platform_data *info);
20extern void pxa3xx_set_mci2_info(struct pxamci_platform_data *info);
20 21
21#endif 22#endif