at91_mci: Fix byte mode transitions.
authorVille Syrjala <syrjala@sci.fi>
Mon, 9 Jun 2008 19:06:45 +0000 (22:06 +0300)
committerPierre Ossman <drzeus@drzeus.cx>
Tue, 15 Jul 2008 12:14:43 +0000 (14:14 +0200)
The byte mode support fails to clear the byte mode bit in the command
register, possibly leaving byte mode enabled with the counters programmed
in non-byte mode.

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>
drivers/mmc/host/at91_mci.c

index f8c3f7c330e32d38d13ebbe2f049fe3840cbde1c..16df235fcc2e15a43a19c9f8e78fe0111cc6acaf 100644 (file)
@@ -579,7 +579,7 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command
                ier = AT91_MCI_CMDRDY;
        } else {
                /* zero block length and PDC mode */
-               mr = at91_mci_read(host, AT91_MCI_MR) & 0x7fff;
+               mr = at91_mci_read(host, AT91_MCI_MR) & 0x5fff;
                mr |= (data->blksz & 0x3) ? AT91_MCI_PDCFBYTE : 0;
                mr |= (block_length << 16);
                mr |= AT91_MCI_PDCMODE;