Commit 8542e589 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-mmc

* 'devel' of master.kernel.org:/home/rmk/linux-2.6-mmc:
  [ARM] 3565/1: AT91RM9200 MMC update
  [MMC] Convert all hosts except mmci to use data->blksz
parents 6f3cafce b44fb7a0
This diff is collapsed.
...@@ -228,7 +228,7 @@ static int imxmci_busy_wait_for_status(struct imxmci_host *host, ...@@ -228,7 +228,7 @@ static int imxmci_busy_wait_for_status(struct imxmci_host *host,
static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data)
{ {
unsigned int nob = data->blocks; unsigned int nob = data->blocks;
unsigned int blksz = 1 << data->blksz_bits; unsigned int blksz = data->blksz;
unsigned int datasz = nob * blksz; unsigned int datasz = nob * blksz;
int i; int i;
......
...@@ -584,10 +584,10 @@ mmc_omap_prepare_dma(struct mmc_omap_host *host, struct mmc_data *data) ...@@ -584,10 +584,10 @@ mmc_omap_prepare_dma(struct mmc_omap_host *host, struct mmc_data *data)
int sync_dev = 0; int sync_dev = 0;
data_addr = io_v2p((u32) host->base) + OMAP_MMC_REG_DATA; data_addr = io_v2p((u32) host->base) + OMAP_MMC_REG_DATA;
frame = 1 << data->blksz_bits; frame = data->blksz;
count = sg_dma_len(sg); count = sg_dma_len(sg);
if ((data->blocks == 1) && (count > (1 << data->blksz_bits))) if ((data->blocks == 1) && (count > data->blksz))
count = frame; count = frame;
host->dma_len = count; host->dma_len = count;
...@@ -776,7 +776,7 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req) ...@@ -776,7 +776,7 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req)
} }
block_size = 1 << data->blksz_bits; block_size = data->blksz;
OMAP_MMC_WRITE(host->base, NBLK, data->blocks - 1); OMAP_MMC_WRITE(host->base, NBLK, data->blocks - 1);
OMAP_MMC_WRITE(host->base, BLEN, block_size - 1); OMAP_MMC_WRITE(host->base, BLEN, block_size - 1);
......
...@@ -268,7 +268,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) ...@@ -268,7 +268,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
} }
DBG("blksz %04x blks %04x flags %08x\n", DBG("blksz %04x blks %04x flags %08x\n",
1 << data->blksz_bits, data->blocks, data->flags); data->blksz, data->blocks, data->flags);
DBG("tsac %d ms nsac %d clk\n", DBG("tsac %d ms nsac %d clk\n",
data->timeout_ns / 1000000, data->timeout_clks); data->timeout_ns / 1000000, data->timeout_clks);
...@@ -282,7 +282,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) ...@@ -282,7 +282,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
writew(mode, host->ioaddr + SDHCI_TRANSFER_MODE); writew(mode, host->ioaddr + SDHCI_TRANSFER_MODE);
writew(1 << data->blksz_bits, host->ioaddr + SDHCI_BLOCK_SIZE); writew(data->blksz, host->ioaddr + SDHCI_BLOCK_SIZE);
writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT); writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT);
if (host->flags & SDHCI_USE_DMA) { if (host->flags & SDHCI_USE_DMA) {
...@@ -294,7 +294,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) ...@@ -294,7 +294,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
writel(sg_dma_address(data->sg), host->ioaddr + SDHCI_DMA_ADDRESS); writel(sg_dma_address(data->sg), host->ioaddr + SDHCI_DMA_ADDRESS);
} else { } else {
host->size = (1 << data->blksz_bits) * data->blocks; host->size = data->blksz * data->blocks;
host->cur_sg = data->sg; host->cur_sg = data->sg;
host->num_sg = data->sg_len; host->num_sg = data->sg_len;
...@@ -335,7 +335,7 @@ static void sdhci_finish_data(struct sdhci_host *host) ...@@ -335,7 +335,7 @@ static void sdhci_finish_data(struct sdhci_host *host)
blocks = 0; blocks = 0;
else else
blocks = readw(host->ioaddr + SDHCI_BLOCK_COUNT); blocks = readw(host->ioaddr + SDHCI_BLOCK_COUNT);
data->bytes_xfered = (1 << data->blksz_bits) * (data->blocks - blocks); data->bytes_xfered = data->blksz * (data->blocks - blocks);
if ((data->error == MMC_ERR_NONE) && blocks) { if ((data->error == MMC_ERR_NONE) && blocks) {
printk(KERN_ERR "%s: Controller signalled completion even " printk(KERN_ERR "%s: Controller signalled completion even "
......
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