diff options
author | Markos Chandras <markos.chandras@imgtec.com> | 2013-03-12 06:53:11 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-03-22 12:45:32 -0400 |
commit | 1fb5f68addde6d8b79dd7d747814aa1770e6cf21 (patch) | |
tree | 4235b02a134189904e258e705d728cf6d613583d /drivers/mmc | |
parent | 63008768d2663723b6acea2f8739e1c8460da726 (diff) |
mmc: dw_mmc: Don't loop when handling an interrupt
There is no reason to loop when handling an interrupt. The "if" clauses
will handle all of them sequentially. This also eliminates the extra loop
we used to take with no pending interrupts and we ended up breaking out
of the while loop.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 7716a08675fc..e7be4023382c 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c | |||
@@ -1573,11 +1573,11 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) | |||
1573 | { | 1573 | { |
1574 | struct dw_mci *host = dev_id; | 1574 | struct dw_mci *host = dev_id; |
1575 | u32 pending; | 1575 | u32 pending; |
1576 | unsigned int pass_count = 0; | ||
1577 | int i; | 1576 | int i; |
1578 | 1577 | ||
1579 | do { | 1578 | pending = mci_readl(host, MINTSTS); /* read-only mask reg */ |
1580 | pending = mci_readl(host, MINTSTS); /* read-only mask reg */ | 1579 | |
1580 | if (pending) { | ||
1581 | 1581 | ||
1582 | /* | 1582 | /* |
1583 | * DTO fix - version 2.10a and below, and only if internal DMA | 1583 | * DTO fix - version 2.10a and below, and only if internal DMA |
@@ -1589,9 +1589,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) | |||
1589 | pending |= SDMMC_INT_DATA_OVER; | 1589 | pending |= SDMMC_INT_DATA_OVER; |
1590 | } | 1590 | } |
1591 | 1591 | ||
1592 | if (!pending) | ||
1593 | break; | ||
1594 | |||
1595 | if (pending & DW_MCI_CMD_ERROR_FLAGS) { | 1592 | if (pending & DW_MCI_CMD_ERROR_FLAGS) { |
1596 | mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS); | 1593 | mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS); |
1597 | host->cmd_status = pending; | 1594 | host->cmd_status = pending; |
@@ -1652,7 +1649,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) | |||
1652 | } | 1649 | } |
1653 | } | 1650 | } |
1654 | 1651 | ||
1655 | } while (pass_count++ < 5); | 1652 | } |
1656 | 1653 | ||
1657 | #ifdef CONFIG_MMC_DW_IDMAC | 1654 | #ifdef CONFIG_MMC_DW_IDMAC |
1658 | /* Handle DMA interrupts */ | 1655 | /* Handle DMA interrupts */ |