aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/au1xmmc.c
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2007-07-24 15:11:47 -0400
committerPierre Ossman <drzeus@drzeus.cx>2007-09-23 03:15:12 -0400
commitbe0192aae1aed3fbf172e3f9a22ec75392c1b175 (patch)
treeb70080bf73fad74fe196a568e57b18c6e7ade8ef /drivers/mmc/host/au1xmmc.c
parent255d01af9a990fd5166f04ed0cc0b30b7b67e81e (diff)
mmc: remove confusing flag
The MMC_DATA_MULTI flag never had a proper definition of what it means, so remove it and let the drivers check the block count in the request. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host/au1xmmc.c')
-rw-r--r--drivers/mmc/host/au1xmmc.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index 49b0367e57c8..92c4d0dfee43 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -186,7 +186,7 @@ static void au1xmmc_tasklet_finish(unsigned long param)
186} 186}
187 187
188static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, 188static int au1xmmc_send_command(struct au1xmmc_host *host, int wait,
189 struct mmc_command *cmd, unsigned int flags) 189 struct mmc_command *cmd, struct mmc_data *data)
190{ 190{
191 u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); 191 u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT);
192 192
@@ -211,16 +211,18 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait,
211 return -EINVAL; 211 return -EINVAL;
212 } 212 }
213 213
214 if (flags & MMC_DATA_READ) { 214 if (data) {
215 if (flags & MMC_DATA_MULTI) 215 if (flags & MMC_DATA_READ) {
216 mmccmd |= SD_CMD_CT_4; 216 if (data->blocks > 1)
217 else 217 mmccmd |= SD_CMD_CT_4;
218 mmccmd |= SD_CMD_CT_2; 218 else
219 } else if (flags & MMC_DATA_WRITE) { 219 mmccmd |= SD_CMD_CT_2;
220 if (flags & MMC_DATA_MULTI) 220 } else if (flags & MMC_DATA_WRITE) {
221 mmccmd |= SD_CMD_CT_3; 221 if (data->blocks > 1)
222 else 222 mmccmd |= SD_CMD_CT_3;
223 mmccmd |= SD_CMD_CT_1; 223 else
224 mmccmd |= SD_CMD_CT_1;
225 }
224 } 226 }
225 227
226 au_writel(cmd->arg, HOST_CMDARG(host)); 228 au_writel(cmd->arg, HOST_CMDARG(host));
@@ -673,7 +675,7 @@ static void au1xmmc_request(struct mmc_host* mmc, struct mmc_request* mrq)
673 } 675 }
674 676
675 if (!ret) 677 if (!ret)
676 ret = au1xmmc_send_command(host, 0, mrq->cmd, flags); 678 ret = au1xmmc_send_command(host, 0, mrq->cmd, mrq->data);
677 679
678 if (ret) { 680 if (ret) {
679 mrq->cmd->error = ret; 681 mrq->cmd->error = ret;