提交 2f1d7918 编写于 作者: N Nicolas Ferre 提交者: Chris Ball

mmc: atmel-mci: fix multiblock SDIO transfers

Based on report made by Yauhen in:
"MMC: Fix multiblock SDIO transfers in AT91 MCI" patch,
I report those changes to the brother driver: atmel-mci.

So, this patch sets SDIO transfer types: SDIO block and SDIO byte
transfers instead of using ordinary MMC block transfers.
It is checking opcode for SDIO CMD53 and setting transfer
type in MCI_CMDR register properly.
Reported-by: NYauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
Cc: <stable@kernel.org>
Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 a2255ff4
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/mmc/sdio.h>
#include <mach/atmel-mci.h> #include <mach/atmel-mci.h>
#include <linux/atmel-mci.h> #include <linux/atmel-mci.h>
...@@ -532,12 +533,17 @@ static u32 atmci_prepare_command(struct mmc_host *mmc, ...@@ -532,12 +533,17 @@ static u32 atmci_prepare_command(struct mmc_host *mmc,
data = cmd->data; data = cmd->data;
if (data) { if (data) {
cmdr |= MCI_CMDR_START_XFER; cmdr |= MCI_CMDR_START_XFER;
if (data->flags & MMC_DATA_STREAM)
cmdr |= MCI_CMDR_STREAM; if (cmd->opcode == SD_IO_RW_EXTENDED) {
else if (data->blocks > 1) cmdr |= MCI_CMDR_SDIO_BLOCK;
cmdr |= MCI_CMDR_MULTI_BLOCK; } else {
else if (data->flags & MMC_DATA_STREAM)
cmdr |= MCI_CMDR_BLOCK; cmdr |= MCI_CMDR_STREAM;
else if (data->blocks > 1)
cmdr |= MCI_CMDR_MULTI_BLOCK;
else
cmdr |= MCI_CMDR_BLOCK;
}
if (data->flags & MMC_DATA_READ) if (data->flags & MMC_DATA_READ)
cmdr |= MCI_CMDR_TRDIR_READ; cmdr |= MCI_CMDR_TRDIR_READ;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册