diff options
author | Sudhakar Rajashekhara <sudhakar.raj@ti.com> | 2009-08-13 15:16:23 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-08-26 04:55:55 -0400 |
commit | 700691f27ed9b0891cece9032e4de8c0b482c625 (patch) | |
tree | e4f7cefe7307679799383ad58ead918d415f7bab /arch/arm/mach-davinci/da850.c | |
parent | 5cbdf276bd9d9cd3cb9616f8253390096c1a237f (diff) |
davinci: Add MMC/SD support for da850/omap-l138
There are two instances of MMC/SD on da850/omap-l138.
Connector for the first instance is available on the
EVM. This patch adds support for this instance.
This patch also adds support for card detect and write
protect switches on da850/omap-l138 EVM.
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/da850.c')
-rw-r--r-- | arch/arm/mach-davinci/da850.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index e6e605bf1516..9debd57deb71 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -304,6 +304,12 @@ static struct clk lcdc_clk = { | |||
304 | .psc_ctlr = 1, | 304 | .psc_ctlr = 1, |
305 | }; | 305 | }; |
306 | 306 | ||
307 | static struct clk mmcsd_clk = { | ||
308 | .name = "mmcsd", | ||
309 | .parent = &pll0_sysclk2, | ||
310 | .lpsc = DA8XX_LPSC0_MMC_SD, | ||
311 | }; | ||
312 | |||
307 | static struct davinci_clk da850_clks[] = { | 313 | static struct davinci_clk da850_clks[] = { |
308 | CLK(NULL, "ref", &ref_clk), | 314 | CLK(NULL, "ref", &ref_clk), |
309 | CLK(NULL, "pll0", &pll0_clk), | 315 | CLK(NULL, "pll0", &pll0_clk), |
@@ -343,6 +349,7 @@ static struct davinci_clk da850_clks[] = { | |||
343 | CLK("davinci_emac.1", NULL, &emac_clk), | 349 | CLK("davinci_emac.1", NULL, &emac_clk), |
344 | CLK("davinci-mcasp.0", NULL, &mcasp_clk), | 350 | CLK("davinci-mcasp.0", NULL, &mcasp_clk), |
345 | CLK("da8xx_lcdc.0", NULL, &lcdc_clk), | 351 | CLK("da8xx_lcdc.0", NULL, &lcdc_clk), |
352 | CLK("davinci_mmc.0", NULL, &mmcsd_clk), | ||
346 | CLK(NULL, NULL, NULL), | 353 | CLK(NULL, NULL, NULL), |
347 | }; | 354 | }; |
348 | 355 | ||
@@ -434,9 +441,18 @@ static const struct mux_config da850_pins[] = { | |||
434 | MUX_CFG(DA850, LCD_HSYNC, 19, 0, 15, 2, false) | 441 | MUX_CFG(DA850, LCD_HSYNC, 19, 0, 15, 2, false) |
435 | MUX_CFG(DA850, LCD_VSYNC, 19, 4, 15, 2, false) | 442 | MUX_CFG(DA850, LCD_VSYNC, 19, 4, 15, 2, false) |
436 | MUX_CFG(DA850, NLCD_AC_ENB_CS, 19, 24, 15, 2, false) | 443 | MUX_CFG(DA850, NLCD_AC_ENB_CS, 19, 24, 15, 2, false) |
444 | /* MMC/SD0 function */ | ||
445 | MUX_CFG(DA850, MMCSD0_DAT_0, 10, 8, 15, 2, false) | ||
446 | MUX_CFG(DA850, MMCSD0_DAT_1, 10, 12, 15, 2, false) | ||
447 | MUX_CFG(DA850, MMCSD0_DAT_2, 10, 16, 15, 2, false) | ||
448 | MUX_CFG(DA850, MMCSD0_DAT_3, 10, 20, 15, 2, false) | ||
449 | MUX_CFG(DA850, MMCSD0_CLK, 10, 0, 15, 2, false) | ||
450 | MUX_CFG(DA850, MMCSD0_CMD, 10, 4, 15, 2, false) | ||
437 | /* GPIO function */ | 451 | /* GPIO function */ |
438 | MUX_CFG(DA850, GPIO2_15, 5, 0, 15, 8, false) | 452 | MUX_CFG(DA850, GPIO2_15, 5, 0, 15, 8, false) |
439 | MUX_CFG(DA850, GPIO8_10, 18, 28, 15, 8, false) | 453 | MUX_CFG(DA850, GPIO8_10, 18, 28, 15, 8, false) |
454 | MUX_CFG(DA850, GPIO4_0, 10, 28, 15, 8, false) | ||
455 | MUX_CFG(DA850, GPIO4_1, 10, 24, 15, 8, false) | ||
440 | #endif | 456 | #endif |
441 | }; | 457 | }; |
442 | 458 | ||
@@ -491,6 +507,13 @@ const short da850_lcdcntl_pins[] __initdata = { | |||
491 | -1 | 507 | -1 |
492 | }; | 508 | }; |
493 | 509 | ||
510 | const short da850_mmcsd0_pins[] __initdata = { | ||
511 | DA850_MMCSD0_DAT_0, DA850_MMCSD0_DAT_1, DA850_MMCSD0_DAT_2, | ||
512 | DA850_MMCSD0_DAT_3, DA850_MMCSD0_CLK, DA850_MMCSD0_CMD, | ||
513 | DA850_GPIO4_0, DA850_GPIO4_1, | ||
514 | -1 | ||
515 | }; | ||
516 | |||
494 | /* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */ | 517 | /* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */ |
495 | static u8 da850_default_priorities[DA850_N_CP_INTC_IRQ] = { | 518 | static u8 da850_default_priorities[DA850_N_CP_INTC_IRQ] = { |
496 | [IRQ_DA8XX_COMMTX] = 7, | 519 | [IRQ_DA8XX_COMMTX] = 7, |