omap_ctrl_writel(reg, OMAP243X_CONTROL_DEVCONF1);
}
- /* REVISIT: Loop back clock not needed for 2430? */
- if (!cpu_is_omap2430()) {
+ if (c->mmc->slots[0].internal_clock) {
reg = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
reg |= OMAP2_MMCSDIO1ADPCLKISEL;
omap_ctrl_writel(reg, OMAP2_CONTROL_DEVCONF0);
struct twl_mmc_controller *c = &hsmmc[1];
if (power_on) {
- u32 reg;
+ if (c->mmc->slots[0].internal_clock) {
+ u32 reg;
- reg = omap_ctrl_readl(control_devconf1_offset);
- reg |= OMAP2_MMCSDIO2ADPCLKISEL;
- omap_ctrl_writel(reg, control_devconf1_offset);
+ reg = omap_ctrl_readl(control_devconf1_offset);
+ reg |= OMAP2_MMCSDIO2ADPCLKISEL;
+ omap_ctrl_writel(reg, control_devconf1_offset);
+ }
ret = twl_mmc_set_voltage(c, vdd);
} else {
ret = twl_mmc_set_voltage(c, 0);
MMC_VDD_29_30 |
MMC_VDD_30_31 | MMC_VDD_31_32;
mmc->slots[0].wires = c->wires;
+ mmc->slots[0].internal_clock = !c->ext_clock;
mmc->dma_mask = 0xffffffff;
/* note: twl4030 card detect GPIOs normally switch VMMCx ... */
u8 wires; /* 1/4/8 wires */
int gpio_cd; /* or -EINVAL */
int gpio_wp; /* or -EINVAL */
+ int ext_clock:1; /* use external pin for input clock */
};
#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \