aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/dw_mmc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 72dc3cde646d..7baed457dc3b 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1547,12 +1547,11 @@ static void dw_mci_cmd_interrupt(struct dw_mci *host, u32 status)
1547static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) 1547static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
1548{ 1548{
1549 struct dw_mci *host = dev_id; 1549 struct dw_mci *host = dev_id;
1550 u32 status, pending; 1550 u32 pending;
1551 unsigned int pass_count = 0; 1551 unsigned int pass_count = 0;
1552 int i; 1552 int i;
1553 1553
1554 do { 1554 do {
1555 status = mci_readl(host, RINTSTS);
1556 pending = mci_readl(host, MINTSTS); /* read-only mask reg */ 1555 pending = mci_readl(host, MINTSTS); /* read-only mask reg */
1557 1556
1558 /* 1557 /*
@@ -1570,7 +1569,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
1570 1569
1571 if (pending & DW_MCI_CMD_ERROR_FLAGS) { 1570 if (pending & DW_MCI_CMD_ERROR_FLAGS) {
1572 mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS); 1571 mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS);
1573 host->cmd_status = status; 1572 host->cmd_status = pending;
1574 smp_wmb(); 1573 smp_wmb();
1575 set_bit(EVENT_CMD_COMPLETE, &host->pending_events); 1574 set_bit(EVENT_CMD_COMPLETE, &host->pending_events);
1576 } 1575 }
@@ -1578,7 +1577,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
1578 if (pending & DW_MCI_DATA_ERROR_FLAGS) { 1577 if (pending & DW_MCI_DATA_ERROR_FLAGS) {
1579 /* if there is an error report DATA_ERROR */ 1578 /* if there is an error report DATA_ERROR */
1580 mci_writel(host, RINTSTS, DW_MCI_DATA_ERROR_FLAGS); 1579 mci_writel(host, RINTSTS, DW_MCI_DATA_ERROR_FLAGS);
1581 host->data_status = status; 1580 host->data_status = pending;
1582 smp_wmb(); 1581 smp_wmb();
1583 set_bit(EVENT_DATA_ERROR, &host->pending_events); 1582 set_bit(EVENT_DATA_ERROR, &host->pending_events);
1584 if (!(pending & (SDMMC_INT_DTO | SDMMC_INT_DCRC | 1583 if (!(pending & (SDMMC_INT_DTO | SDMMC_INT_DCRC |
@@ -1589,7 +1588,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
1589 if (pending & SDMMC_INT_DATA_OVER) { 1588 if (pending & SDMMC_INT_DATA_OVER) {
1590 mci_writel(host, RINTSTS, SDMMC_INT_DATA_OVER); 1589 mci_writel(host, RINTSTS, SDMMC_INT_DATA_OVER);
1591 if (!host->data_status) 1590 if (!host->data_status)
1592 host->data_status = status; 1591 host->data_status = pending;
1593 smp_wmb(); 1592 smp_wmb();
1594 if (host->dir_status == DW_MCI_RECV_STATUS) { 1593 if (host->dir_status == DW_MCI_RECV_STATUS) {
1595 if (host->sg != NULL) 1594 if (host->sg != NULL)
@@ -1613,7 +1612,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
1613 1612
1614 if (pending & SDMMC_INT_CMD_DONE) { 1613 if (pending & SDMMC_INT_CMD_DONE) {
1615 mci_writel(host, RINTSTS, SDMMC_INT_CMD_DONE); 1614 mci_writel(host, RINTSTS, SDMMC_INT_CMD_DONE);
1616 dw_mci_cmd_interrupt(host, status); 1615 dw_mci_cmd_interrupt(host, pending);
1617 } 1616 }
1618 1617
1619 if (pending & SDMMC_INT_CD) { 1618 if (pending & SDMMC_INT_CD) {