]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation
authorJaehoon Chung <jh80.chung@samsung.com>
Wed, 11 Jan 2012 09:28:21 +0000 (09:28 +0000)
committerChris Ball <cjb@laptop.org>
Thu, 12 Jan 2012 20:17:16 +0000 (15:17 -0500)
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 <jh80.chung@samsung.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/dw_mmc.c

index 94e223825a45900e6e80e53adc8674bdd70b4966..0e342793ff142f2f2616da2a6bce85542e9e4cf7 100644 (file)
@@ -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;
        }