Commit a6c668fb authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Chris Ball

mmc: omap: Remove always set use_dma flag from struct mmc_omap_host

Because use_dma is set only in mmc_omap_probe and unset nowhere there is no
need to carry that flag in struct mmc_omap_host for mmc_omap_prepare_data
function.
Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Tested-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarChris Ball <chris@printf.net>
parent 64ac16ec
...@@ -152,7 +152,6 @@ struct mmc_omap_host { ...@@ -152,7 +152,6 @@ struct mmc_omap_host {
u32 total_bytes_left; u32 total_bytes_left;
unsigned features; unsigned features;
unsigned use_dma:1;
unsigned brs_received:1, dma_done:1; unsigned brs_received:1, dma_done:1;
unsigned dma_in_use:1; unsigned dma_in_use:1;
spinlock_t dma_lock; spinlock_t dma_lock;
...@@ -944,7 +943,7 @@ static void ...@@ -944,7 +943,7 @@ static void
mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req) mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req)
{ {
struct mmc_data *data = req->data; struct mmc_data *data = req->data;
int i, use_dma, block_size; int i, use_dma = 1, block_size;
unsigned sg_len; unsigned sg_len;
host->data = data; host->data = data;
...@@ -969,15 +968,12 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req) ...@@ -969,15 +968,12 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req)
sg_len = (data->blocks == 1) ? 1 : data->sg_len; sg_len = (data->blocks == 1) ? 1 : data->sg_len;
/* Only do DMA for entire blocks */ /* Only do DMA for entire blocks */
use_dma = host->use_dma;
if (use_dma) {
for (i = 0; i < sg_len; i++) { for (i = 0; i < sg_len; i++) {
if ((data->sg[i].length % block_size) != 0) { if ((data->sg[i].length % block_size) != 0) {
use_dma = 0; use_dma = 0;
break; break;
} }
} }
}
host->sg_idx = 0; host->sg_idx = 0;
if (use_dma) { if (use_dma) {
...@@ -1369,7 +1365,6 @@ static int mmc_omap_probe(struct platform_device *pdev) ...@@ -1369,7 +1365,6 @@ static int mmc_omap_probe(struct platform_device *pdev)
host->id = pdev->id; host->id = pdev->id;
host->irq = irq; host->irq = irq;
host->use_dma = 1;
host->phys_base = res->start; host->phys_base = res->start;
host->iclk = clk_get(&pdev->dev, "ick"); host->iclk = clk_get(&pdev->dev, "ick");
if (IS_ERR(host->iclk)) if (IS_ERR(host->iclk))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment