]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
mmc: dw_mmc: fix the wrong AND operation
authorJaehoon Chung <jh80.chung@samsung.com>
Fri, 13 May 2016 14:37:44 +0000 (23:37 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Mon, 27 Jun 2016 00:43:26 +0000 (09:43 +0900)
These condition checking are wrong.
Original Author's intention might be "&" instead of "&&".
It can know whether receive or transmit data request with
BIT[4]/BIT[5] of RINTSTS register.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
drivers/mmc/dw_mmc.c

index 74a2663c8bf976f27b6cce2a5fe2f863cf54b8da..af6e04aa28b6926006a408ee5a3efabdad31b825 100644 (file)
@@ -121,7 +121,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data)
 
                if (host->fifo_mode && size) {
                        if (data->flags == MMC_DATA_READ) {
-                               if ((dwmci_readl(host, DWMCI_RINTSTS) &&
+                               if ((dwmci_readl(host, DWMCI_RINTSTS) &
                                     DWMCI_INTMSK_RXDR)) {
                                        len = dwmci_readl(host, DWMCI_STATUS);
                                        len = (len >> DWMCI_FIFO_SHIFT) &
@@ -133,7 +133,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data)
                                                     DWMCI_INTMSK_RXDR);
                                }
                        } else {
-                               if ((dwmci_readl(host, DWMCI_RINTSTS) &&
+                               if ((dwmci_readl(host, DWMCI_RINTSTS) &
                                     DWMCI_INTMSK_TXDR)) {
                                        len = dwmci_readl(host, DWMCI_STATUS);
                                        len = fifo_depth - ((len >>