aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/mmci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/mmci.c')
-rw-r--r--drivers/mmc/mmci.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c
index 634ef53e85a5..9fef29d978b5 100644
--- a/drivers/mmc/mmci.c
+++ b/drivers/mmc/mmci.c
@@ -97,6 +97,13 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
97 if (data->flags & MMC_DATA_READ) { 97 if (data->flags & MMC_DATA_READ) {
98 datactrl |= MCI_DPSM_DIRECTION; 98 datactrl |= MCI_DPSM_DIRECTION;
99 irqmask = MCI_RXFIFOHALFFULLMASK; 99 irqmask = MCI_RXFIFOHALFFULLMASK;
100
101 /*
102 * If we have less than a FIFOSIZE of bytes to transfer,
103 * trigger a PIO interrupt as soon as any data is available.
104 */
105 if (host->size < MCI_FIFOSIZE)
106 irqmask |= MCI_RXDATAAVLBLMASK;
100 } else { 107 } else {
101 /* 108 /*
102 * We don't actually need to include "FIFO empty" here 109 * We don't actually need to include "FIFO empty" here
@@ -124,15 +131,10 @@ mmci_start_command(struct mmci_host *host, struct mmc_command *cmd, u32 c)
124 } 131 }
125 132
126 c |= cmd->opcode | MCI_CPSM_ENABLE; 133 c |= cmd->opcode | MCI_CPSM_ENABLE;
127 switch (cmd->flags & MMC_RSP_MASK) { 134 if (cmd->flags & MMC_RSP_PRESENT) {
128 case MMC_RSP_NONE: 135 if (cmd->flags & MMC_RSP_136)
129 default: 136 c |= MCI_CPSM_LONGRSP;
130 break;
131 case MMC_RSP_LONG:
132 c |= MCI_CPSM_LONGRSP;
133 case MMC_RSP_SHORT:
134 c |= MCI_CPSM_RESPONSE; 137 c |= MCI_CPSM_RESPONSE;
135 break;
136 } 138 }
137 if (/*interrupt*/0) 139 if (/*interrupt*/0)
138 c |= MCI_CPSM_INTERRUPT; 140 c |= MCI_CPSM_INTERRUPT;