summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2016-05-13 23:37:44 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2016-06-27 09:43:26 +0900
commitca2ec9adc951cc3798e9b0c3773cdcc613232a22 (patch)
tree8c8834f3c23c6dfc5a82e0a7a3000cf862bc4328 /drivers/mmc
parent4141e85bcd79c0b9b16def710e527f165107b7af (diff)
downloadu-boot-imx-ca2ec9adc951cc3798e9b0c3773cdcc613232a22.zip
u-boot-imx-ca2ec9adc951cc3798e9b0c3773cdcc613232a22.tar.gz
u-boot-imx-ca2ec9adc951cc3798e9b0c3773cdcc613232a22.tar.bz2
mmc: dw_mmc: fix the wrong AND operation
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/dw_mmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 74a2663..af6e04a 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -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 >>