Commit 282a82e8a10ce6ef132d7a809101fdaed951001c
Committed by
Pantelis Antoniou
1 parent
be9f643ae6
Exists in
v2017.01-smarct4x
and in
37 other branches
mmc: set correct block size value in bfin sdh driver
Wait data transfer till the data end bit other than the data block end bit is set. Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Showing 1 changed file with 4 additions and 3 deletions Side-by-side Diff
drivers/mmc/bfin_sdh.c
... | ... | @@ -138,9 +138,9 @@ |
138 | 138 | if (data->flags & MMC_DATA_WRITE) |
139 | 139 | return UNUSABLE_ERR; |
140 | 140 | #ifndef RSI_BLKSZ |
141 | - data_ctl |= ((ffs(data_size) - 1) << 4); | |
141 | + data_ctl |= ((ffs(data->blocksize) - 1) << 4); | |
142 | 142 | #else |
143 | - bfin_write_SDH_BLK_SIZE(data_size); | |
143 | + bfin_write_SDH_BLK_SIZE(data->blocksize); | |
144 | 144 | #endif |
145 | 145 | data_ctl |= DTX_DIR; |
146 | 146 | bfin_write_SDH_DATA_CTL(data_ctl); |
... | ... | @@ -189,7 +189,8 @@ |
189 | 189 | do { |
190 | 190 | udelay(1); |
191 | 191 | status = bfin_read_SDH_STATUS(); |
192 | - } while (!(status & (DAT_BLK_END | DAT_END | DAT_TIME_OUT | DAT_CRC_FAIL | RX_OVERRUN))); | |
192 | + } while (!(status & (DAT_END | DAT_TIME_OUT | DAT_CRC_FAIL | | |
193 | + RX_OVERRUN))); | |
193 | 194 | |
194 | 195 | if (status & DAT_TIME_OUT) { |
195 | 196 | bfin_write_SDH_STATUS_CLR(DAT_TIMEOUT_STAT); |