Commit 984d963e authored by David Brownell's avatar David Brownell Committed by Kevin Hilman

move dm355 mmc pinmux out of PSC helper

Move DM355 MMC/SD pinmux to the device setup code; it shouldn't
be coupled to clock activation.  This is a small cleanup which
doesn't yet support options like not muxing all MMCSD1 pins when
they're not needed (e.g. hard-wired to an SDIO WLAN adapter).
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent fd609c27
......@@ -28,6 +28,7 @@
#include <mach/emac.h>
#include <mach/i2c.h>
#include <mach/cpu.h>
#include <mach/mux.h>
#include "clock.h"
......@@ -163,6 +164,17 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
case 1:
if (!cpu_is_davinci_dm355())
break;
/* REVISIT we may not need all these pins if e.g. this
* is a hard-wired SDIO device...
*/
davinci_cfg_reg(DM355_SD1_CMD);
davinci_cfg_reg(DM355_SD1_CLK);
davinci_cfg_reg(DM355_SD1_DATA0);
davinci_cfg_reg(DM355_SD1_DATA1);
davinci_cfg_reg(DM355_SD1_DATA2);
davinci_cfg_reg(DM355_SD1_DATA3);
pdev = &davinci_mmcsd1_device;
clockname = "MMCSDCLK1";
break;
......@@ -171,6 +183,9 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
mmcsd0_resources[0].start = DM355_MMCSD0_BASE;
mmcsd0_resources[0].end = DM355_MMCSD0_BASE + SZ_4K - 1;
mmcsd0_resources[2].start = IRQ_DM355_SDIOINT0;
/* expose all 6 MMC0 signals: CLK, CMD, DATA[0..3] */
davinci_cfg_reg(DM355_MMCSD0);
}
pdev = &davinci_mmcsd0_device;
clockname = cpu_is_davinci_dm355() ? "MMCSDCLK0" : "MMCSDCLK";
......
......@@ -86,15 +86,6 @@ static void dm355_psc_mux(unsigned int id)
* while declaring what pins/irqs/edmas/... we care about.
*/
switch (id) {
case DM355_LPSC_MMC_SD1: /* MMC1 */
/* expose DATA[0..3], CMD, CLK */
davinci_cfg_reg(DM355_SD1_CLK);
davinci_cfg_reg(DM355_SD1_CMD);
davinci_cfg_reg(DM355_SD1_DATA3);
davinci_cfg_reg(DM355_SD1_DATA2);
davinci_cfg_reg(DM355_SD1_DATA1);
davinci_cfg_reg(DM355_SD1_DATA0);
break;
case DM355_LPSC_McBSP1: /* ASP1 */
/* our ASoC code currently doesn't use these IRQs */
#if 0
......@@ -110,9 +101,6 @@ static void dm355_psc_mux(unsigned int id)
davinci_writel(tmp, DM355_EDMA_EVTMUX);
break;
case DAVINCI_LPSC_MMC_SD: /* MMC0 */
/* expose all 6 MMC0 signals: CLK, CMD, DATA[0..3] */
davinci_cfg_reg(DM355_MMCSD0);
/* support EMDA for MMC0 RX */
tmp = davinci_readl(DM355_EDMA_EVTMUX);
tmp &= ~BIT(2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment