|
@@ -687,7 +687,13 @@ void mmc_set_timing(struct mmc_host *host, unsigned int timing)
|
|
*/
|
|
*/
|
|
static void mmc_power_up(struct mmc_host *host)
|
|
static void mmc_power_up(struct mmc_host *host)
|
|
{
|
|
{
|
|
- int bit = fls(host->ocr_avail) - 1;
|
|
|
|
|
|
+ int bit;
|
|
|
|
+
|
|
|
|
+ /* If ocr is set, we use it */
|
|
|
|
+ if (host->ocr)
|
|
|
|
+ bit = ffs(host->ocr) - 1;
|
|
|
|
+ else
|
|
|
|
+ bit = fls(host->ocr_avail) - 1;
|
|
|
|
|
|
host->ios.vdd = bit;
|
|
host->ios.vdd = bit;
|
|
if (mmc_host_is_spi(host)) {
|
|
if (mmc_host_is_spi(host)) {
|