From 3c844b3e12ef0ffbf6042f6595f10b707375a9f8 Mon Sep 17 00:00:00 2001 From: Ville Syrjala Date: Mon, 9 Jun 2008 22:06:44 +0300 Subject: [PATCH] --- yaml --- r: 102175 b: refs/heads/master c: 9da3cbaf2881df97e502593c49c93f55eb696091 h: refs/heads/master i: 102173: 3a942c8189ff17c849d90671be038b02f284f117 102171: 4a87582758d9e7e4d5df83c66d7879c559e680d8 102167: ec263a45f2bab5d3381a9e7b30569d3bd213d913 102159: e2d4f297359cda664245bc1e52adae8b9dc3dbc9 102143: 3327e60d011cd0cc051c483398851504a04a5366 v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/at91_mci.c | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index af96442be26b..894c1c6be4b8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5385edc50063a2175383ef5e90aa67fb6ab1beae +refs/heads/master: 9da3cbaf2881df97e502593c49c93f55eb696091 diff --git a/trunk/drivers/mmc/host/at91_mci.c b/trunk/drivers/mmc/host/at91_mci.c index d3e96ff41428..f8c3f7c330e3 100644 --- a/trunk/drivers/mmc/host/at91_mci.c +++ b/trunk/drivers/mmc/host/at91_mci.c @@ -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; @@ -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));