From: Grazvydas Ignotas Date: Tue, 30 Jun 2015 00:20:56 +0000 (+0300) Subject: omap_hsmmc: avoid useless dto set X-Git-Tag: sz_173~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39b34387222bfe11f4a7bb72362bb4c9e9911f79;p=pandora-kernel.git omap_hsmmc: avoid useless dto set always setting the same value, which was already set by omap_hsmmc_set_clock() --- diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 40ff0443594b..c0f583a6e09a 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1527,23 +1527,6 @@ static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host, return 0; } -static void set_data_timeout(struct omap_hsmmc_host *host) -{ - uint32_t reg, clkd, dto = 0; - - reg = OMAP_HSMMC_READ(host->base, SYSCTL); - clkd = (reg & CLKD_MASK) >> CLKD_SHIFT; - if (clkd == 0) - clkd = 1; - - /* Use the maximum timeout value allowed in the standard of 14 or 0xE */ - dto = 14; - - reg &= ~DTO_MASK; - reg |= dto << DTO_SHIFT; - OMAP_HSMMC_WRITE(host->base, SYSCTL, reg); -} - /* pandora wifi small transfer hack */ static int check_mmc3_dma_hack(struct omap_hsmmc_host *host, struct mmc_request *req) @@ -1566,18 +1549,11 @@ omap_hsmmc_prepare_data(struct omap_hsmmc_host *host, struct mmc_request *req) if (req->data == NULL) { OMAP_HSMMC_WRITE(host->base, BLK, 0); - /* - * Set an arbitrary 100ms data timeout for commands with - * busy signal. - */ - if (req->cmd->flags & MMC_RSP_BUSY) - set_data_timeout(host); return 0; } OMAP_HSMMC_WRITE(host->base, BLK, (req->data->blksz) | (req->data->blocks << 16)); - set_data_timeout(host); if (host->use_dma) { ret = omap_hsmmc_start_dma_transfer(host, req);