diff options
author | Ville Syrjala <syrjala@sci.fi> | 2008-06-09 22:06:44 +0300 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2008-07-15 14:14:42 +0200 |
commit | 9da3cbaf2881df97e502593c49c93f55eb696091 (patch) | |
tree | 95bdc38a44f7b1292b7c3fe5337410153149d0c2 /drivers/mmc | |
parent | 5385edc50063a2175383ef5e90aa67fb6ab1beae (diff) | |
download | talos-obmc-linux-9da3cbaf2881df97e502593c49c93f55eb696091.tar.gz talos-obmc-linux-9da3cbaf2881df97e502593c49c93f55eb696091.zip |
at91_mci: Cover more AT91RM9200 and AT91SAM9261 errata.
According to the documentation the AT91SAM9261 MCI shares the block size
limitations of the AT91RM9200 MCI. Also the errata documentation for
AT91RM9200 and AT91SAM9261 state that stream commands are not supported.
This has not been tested on actual hardware.
Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-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 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)); |