aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorVikram Pandita <vikram.pandita@ti.com>2009-08-28 14:24:11 -0400
committerTony Lindgren <tony@atomide.com>2009-08-28 14:24:11 -0400
commit57b9daa0e18167e8ba449bc236c3f4a755dd1833 (patch)
treeb3e302c49ff91780b1e1b38cdbb3c7e1cdb550c0 /arch/arm/mach-omap2
parentac2a048c3cc7c76d848093298ffa452558a7b2e8 (diff)
OMAP3: MMC: Add mux for pins
For OMAP3 add MMC1 MMC2 pin mux MMC3 mux is not added as there are multiple configurations possible, so the muxing is left to be done in board file. Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Chikkature Rajashekar <madhu.cr@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/devices.c41
-rw-r--r--arch/arm/mach-omap2/mux.c50
2 files changed, 91 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 894cc355818a..a2e915639b72 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -513,6 +513,47 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
513 omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); 513 omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
514 } 514 }
515 } 515 }
516
517 if (cpu_is_omap3430()) {
518 if (controller_nr == 0) {
519 omap_cfg_reg(N28_3430_MMC1_CLK);
520 omap_cfg_reg(M27_3430_MMC1_CMD);
521 omap_cfg_reg(N27_3430_MMC1_DAT0);
522 if (mmc_controller->slots[0].wires == 4 ||
523 mmc_controller->slots[0].wires == 8) {
524 omap_cfg_reg(N26_3430_MMC1_DAT1);
525 omap_cfg_reg(N25_3430_MMC1_DAT2);
526 omap_cfg_reg(P28_3430_MMC1_DAT3);
527 }
528 if (mmc_controller->slots[0].wires == 8) {
529 omap_cfg_reg(P27_3430_MMC1_DAT4);
530 omap_cfg_reg(P26_3430_MMC1_DAT5);
531 omap_cfg_reg(R27_3430_MMC1_DAT6);
532 omap_cfg_reg(R25_3430_MMC1_DAT7);
533 }
534 }
535 if (controller_nr == 1) {
536 /* MMC2 */
537 omap_cfg_reg(AE2_3430_MMC2_CLK);
538 omap_cfg_reg(AG5_3430_MMC2_CMD);
539 omap_cfg_reg(AH5_3430_MMC2_DAT0);
540
541 /*
542 * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed
543 * in the board-*.c files
544 */
545 if (mmc_controller->slots[0].wires == 4 ||
546 mmc_controller->slots[0].wires == 8) {
547 omap_cfg_reg(AH4_3430_MMC2_DAT1);
548 omap_cfg_reg(AG4_3430_MMC2_DAT2);
549 omap_cfg_reg(AF4_3430_MMC2_DAT3);
550 }
551 }
552
553 /*
554 * For MMC3 the pins need to be muxed in the board-*.c files
555 */
556 }
516} 557}
517 558
518void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, 559void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 43d6b92b65f2..f63f3a237825 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -492,6 +492,56 @@ MUX_CFG_34XX("H16_34XX_SDRC_CKE0", 0x262,
492 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) 492 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
493MUX_CFG_34XX("H17_34XX_SDRC_CKE1", 0x264, 493MUX_CFG_34XX("H17_34XX_SDRC_CKE1", 0x264,
494 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) 494 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
495
496/* MMC1 */
497MUX_CFG_34XX("N28_3430_MMC1_CLK", 0x144,
498 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
499MUX_CFG_34XX("M27_3430_MMC1_CMD", 0x146,
500 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
501MUX_CFG_34XX("N27_3430_MMC1_DAT0", 0x148,
502 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
503MUX_CFG_34XX("N26_3430_MMC1_DAT1", 0x14a,
504 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
505MUX_CFG_34XX("N25_3430_MMC1_DAT2", 0x14c,
506 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
507MUX_CFG_34XX("P28_3430_MMC1_DAT3", 0x14e,
508 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
509MUX_CFG_34XX("P27_3430_MMC1_DAT4", 0x150,
510 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
511MUX_CFG_34XX("P26_3430_MMC1_DAT5", 0x152,
512 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
513MUX_CFG_34XX("R27_3430_MMC1_DAT6", 0x154,
514 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
515MUX_CFG_34XX("R25_3430_MMC1_DAT7", 0x156,
516 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
517
518/* MMC2 */
519MUX_CFG_34XX("AE2_3430_MMC2_CLK", 0x158,
520 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
521MUX_CFG_34XX("AG5_3430_MMC2_CMD", 0x15A,
522 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
523MUX_CFG_34XX("AH5_3430_MMC2_DAT0", 0x15c,
524 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
525MUX_CFG_34XX("AH4_3430_MMC2_DAT1", 0x15e,
526 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
527MUX_CFG_34XX("AG4_3430_MMC2_DAT2", 0x160,
528 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
529MUX_CFG_34XX("AF4_3430_MMC2_DAT3", 0x162,
530 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
531
532/* MMC3 */
533MUX_CFG_34XX("AF10_3430_MMC3_CLK", 0x5d8,
534 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
535MUX_CFG_34XX("AC3_3430_MMC3_CMD", 0x1d0,
536 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLUP)
537MUX_CFG_34XX("AE11_3430_MMC3_DAT0", 0x5e4,
538 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
539MUX_CFG_34XX("AH9_3430_MMC3_DAT1", 0x5e6,
540 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
541MUX_CFG_34XX("AF13_3430_MMC3_DAT2", 0x5e8,
542 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
543MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2,
544 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
495}; 545};
496 546
497#define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) 547#define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins)