gpio_free(pdata->slots[0].switch_pin);
}
+/*
+ * Start clock to the card
+ */
+static void omap_hsmmc_start_clock(struct omap_hsmmc_host *host)
+{
+ OMAP_HSMMC_WRITE(host->base, SYSCTL,
+ OMAP_HSMMC_READ(host->base, SYSCTL) | CEN);
+}
+
/*
* Stop clock to the card
*/
break;
}
- OMAP_HSMMC_WRITE(host->base, SYSCTL,
- OMAP_HSMMC_READ(host->base, SYSCTL) & ~CEN);
+ omap_hsmmc_stop_clock(host);
+
OMAP_HSMMC_WRITE(host->base, SYSCTL,
(calc_divisor(ios) << 6) | (DTO << 16));
OMAP_HSMMC_WRITE(host->base, SYSCTL,
&& time_before(jiffies, timeout))
;
- OMAP_HSMMC_WRITE(host->base, SYSCTL,
- OMAP_HSMMC_READ(host->base, SYSCTL) | CEN);
+ omap_hsmmc_start_clock(host);
con = OMAP_HSMMC_READ(host->base, CON);
if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN)
&& time_before(jiffies, timeout))
msleep(1);
- OMAP_HSMMC_WRITE(host->base, SYSCTL,
- OMAP_HSMMC_READ(host->base, SYSCTL) | CEN);
+ omap_hsmmc_start_clock(host);
if (do_send_init_stream)
send_init_stream(host);