Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322511
b: refs/heads/master
c: 75b53ae
h: refs/heads/master
i:
  322509: e882b3e
  322507: a95d467
  322503: a497618
  322495: 8c7009e
v: v3
  • Loading branch information
Paul Walmsley authored and Chris Ball committed Sep 4, 2012
1 parent 37edfff commit 91616db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3550ccdb9d8d350e526b809bf3dd92b550a74fe1
refs/heads/master: 75b53aee2f4fe6375c6007226bf68d75b5c4a929
14 changes: 11 additions & 3 deletions trunk/drivers/mmc/host/omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ mmc_omap_clk_timer(unsigned long data)
static void
mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
{
int n;
int n, nwords;

if (host->buffer_bytes_left == 0) {
host->sg_idx++;
Expand All @@ -678,15 +678,23 @@ mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
n = 64;
if (n > host->buffer_bytes_left)
n = host->buffer_bytes_left;

nwords = n / 2;
nwords += n & 1; /* handle odd number of bytes to transfer */

host->buffer_bytes_left -= n;
host->total_bytes_left -= n;
host->data->bytes_xfered += n;

if (write) {
__raw_writesw(host->virt_base + OMAP_MMC_REG(host, DATA), host->buffer, n);
__raw_writesw(host->virt_base + OMAP_MMC_REG(host, DATA),
host->buffer, nwords);
} else {
__raw_readsw(host->virt_base + OMAP_MMC_REG(host, DATA), host->buffer, n);
__raw_readsw(host->virt_base + OMAP_MMC_REG(host, DATA),
host->buffer, nwords);
}

host->buffer += nwords;
}

static inline void mmc_omap_report_irq(u16 status)
Expand Down

0 comments on commit 91616db

Please sign in to comment.