diff -Naur orig/mmc.c fixed/mmc.c --- orig/mmc.c 2006-03-18 10:22:19.000000000 +0200 +++ fixed/mmc.c 2006-03-18 10:30:32.000000000 +0200 @@ -964,7 +964,7 @@ mmc_decode_scr(card); } - mmc_deselect_cards(host); + //mmc_deselect_cards(host); } static unsigned int mmc_calculate_clock(struct mmc_host *host) diff -Naur orig/omap.c fixed/omap.c --- orig/omap.c 2006-03-18 10:22:10.000000000 +0200 +++ fixed/omap.c 2006-03-18 10:42:48.000000000 +0200 @@ -2,7 +2,7 @@ * linux/drivers/media/mmc/omap.c * * Copyright (C) 2004 Nokia Corporation - * Written by Tuukka Tikkanen and Juha Yrjölä + * Written by Tuukka Tikkanen and Juha Yrjölä * Misc hacks here and there by Tony Lindgren * Other hacks (DMA, SD, etc) by David Brownell * @@ -231,6 +231,9 @@ if (host->data && !(host->data->flags & MMC_DATA_WRITE)) cmdreg |= 1 << 15; + if (cmd->opcode==0) + cmdreg |= 1 << 7; + clk_enable(host->fclk); OMAP_MMC_WRITE(host->base, CTO, 200); @@ -890,7 +893,7 @@ reg &= ~(1 << 5); OMAP_MMC_WRITE(host->base, SDIO, reg); /* Set maximum timeout */ - OMAP_MMC_WRITE(host->base, CTO, 0xff); + OMAP_MMC_WRITE(host->base, CTO, 0xfd); } static inline void set_data_timeout(struct mmc_omap_host *host, struct mmc_request *req) @@ -901,7 +904,7 @@ /* Convert ns to clock cycles by assuming 20MHz frequency * 1 cycle at 20MHz = 500 ns */ - timeout = req->data->timeout_clks + req->data->timeout_ns / 500; + timeout = (req->data->timeout_clks * 10) + (req->data->timeout_ns*10) / 500; /* Some cards require more time to do at least the first read operation */ timeout = timeout << 4; @@ -986,7 +989,7 @@ mmc_omap_sg_to_buf(host); host->dma_in_use = 0; } - mod_timer(&host->xfer_timer, jiffies + msecs_to_jiffies(500)); + mod_timer(&host->xfer_timer, jiffies + msecs_to_jiffies(1500)); pr_debug("MMC%d: %s %s %s, DTO %d cycles + %d ns, " "%d blocks of %d bytes, %d segments\n", @@ -1164,7 +1167,7 @@ case MMC_POWER_UP: case MMC_POWER_ON: mmc_omap_power(host, 1); - dsor |= 1<<11; + dsor = (120 | (1 << 11)); break; } @@ -1484,4 +1487,4 @@ MODULE_DESCRIPTION("OMAP Multimedia Card driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS(DRIVER_NAME); -MODULE_AUTHOR("Juha Yrjölä"); +MODULE_AUTHOR("Juha Yrjölä");