diff options
-rw-r--r-- | drivers/mmc/host/at91_mci.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index d3e96ff41428..f8c3f7c330e3 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c | |||
@@ -520,11 +520,19 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command | |||
520 | 520 | ||
521 | if (data) { | 521 | if (data) { |
522 | 522 | ||
523 | if ( cpu_is_at91rm9200() && (data->blksz & 0x3) ) { | 523 | if (cpu_is_at91rm9200() || cpu_is_at91sam9261()) { |
524 | pr_debug("Unsupported block size\n"); | 524 | if (data->blksz & 0x3) { |
525 | cmd->error = -EINVAL; | 525 | pr_debug("Unsupported block size\n"); |
526 | mmc_request_done(host->mmc, host->request); | 526 | cmd->error = -EINVAL; |
527 | return; | 527 | mmc_request_done(host->mmc, host->request); |
528 | return; | ||
529 | } | ||
530 | if (data->flags & MMC_DATA_STREAM) { | ||
531 | pr_debug("Stream commands not supported\n"); | ||
532 | cmd->error = -EINVAL; | ||
533 | mmc_request_done(host->mmc, host->request); | ||
534 | return; | ||
535 | } | ||
528 | } | 536 | } |
529 | 537 | ||
530 | block_length = data->blksz; | 538 | block_length = data->blksz; |
@@ -577,7 +585,7 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command | |||
577 | mr |= AT91_MCI_PDCMODE; | 585 | mr |= AT91_MCI_PDCMODE; |
578 | at91_mci_write(host, AT91_MCI_MR, mr); | 586 | at91_mci_write(host, AT91_MCI_MR, mr); |
579 | 587 | ||
580 | if (!cpu_is_at91rm9200()) | 588 | if (!(cpu_is_at91rm9200() || cpu_is_at91sam9261())) |
581 | at91_mci_write(host, AT91_MCI_BLKR, | 589 | at91_mci_write(host, AT91_MCI_BLKR, |
582 | AT91_MCI_BLKR_BCNT(blocks) | | 590 | AT91_MCI_BLKR_BCNT(blocks) | |
583 | AT91_MCI_BLKR_BLKLEN(block_length)); | 591 | AT91_MCI_BLKR_BLKLEN(block_length)); |