From: Jaehoon Chung Date: Wed, 11 Jan 2012 09:28:21 +0000 (+0000) Subject: mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8234e86960b07f5a3cf9973de3f9ba9a50450464;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation In FIFOTH register, the RX_WMark field (bits[27:16]) defaults to FIFO_DEPTH - 1. When reading it, bits[26:16] were being used, so fix it to use the mask 0xfff instead of 0x7ff. Signed-off-by: Jaehoon Chung Reviewed-by: James Hogan Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 94e223825a45..0e342793ff14 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1949,7 +1949,7 @@ static int dw_mci_probe(struct platform_device *pdev) * should put it in the platform data. */ fifo_size = mci_readl(host, FIFOTH); - fifo_size = 1 + ((fifo_size >> 16) & 0x7ff); + fifo_size = 1 + ((fifo_size >> 16) & 0xfff); } else { fifo_size = host->pdata->fifo_depth; }