Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102175
b: refs/heads/master
c: 9da3cba
h: refs/heads/master
i:
  102173: 3a942c8
  102171: 4a87582
  102167: ec263a4
  102159: e2d4f29
  102143: 3327e60
v: v3
  • Loading branch information
Ville Syrjala authored and Pierre Ossman committed Jul 15, 2008
1 parent a9f6e67 commit 3c844b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 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: 5385edc50063a2175383ef5e90aa67fb6ab1beae
refs/heads/master: 9da3cbaf2881df97e502593c49c93f55eb696091
20 changes: 14 additions & 6 deletions trunk/drivers/mmc/host/at91_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,19 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command

if (data) {

if ( cpu_is_at91rm9200() && (data->blksz & 0x3) ) {
pr_debug("Unsupported block size\n");
cmd->error = -EINVAL;
mmc_request_done(host->mmc, host->request);
return;
if (cpu_is_at91rm9200() || cpu_is_at91sam9261()) {
if (data->blksz & 0x3) {
pr_debug("Unsupported block size\n");
cmd->error = -EINVAL;
mmc_request_done(host->mmc, host->request);
return;
}
if (data->flags & MMC_DATA_STREAM) {
pr_debug("Stream commands not supported\n");
cmd->error = -EINVAL;
mmc_request_done(host->mmc, host->request);
return;
}
}

block_length = data->blksz;
Expand Down Expand Up @@ -577,7 +585,7 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command
mr |= AT91_MCI_PDCMODE;
at91_mci_write(host, AT91_MCI_MR, mr);

if (!cpu_is_at91rm9200())
if (!(cpu_is_at91rm9200() || cpu_is_at91sam9261()))
at91_mci_write(host, AT91_MCI_BLKR,
AT91_MCI_BLKR_BCNT(blocks) |
AT91_MCI_BLKR_BLKLEN(block_length));
Expand Down

0 comments on commit 3c844b3

Please sign in to comment.