diff mbox

[v2] mmc: dw_mmc: clear IDSTS register when initialize IDMAC

Message ID 1366958122-14869-1-git-send-email-jy0922.shim@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Joonyoung Shim April 26, 2013, 6:35 a.m. UTC
If pending interrupt for IDMAC exists when initialize IDMAC, it will
call interrupt handler unnecessarily.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
Changes from previous patch v1:
- Change subject and contents of commit
- Define IDMAC_INT_CLR macro to clear IDSTS register
- It moved to clear IDSTS register in dw_mci_idmac_init()

 drivers/mmc/host/dw_mmc.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Seungwon Jeon April 26, 2013, 7:38 a.m. UTC | #1
On Friday, April 26, 2013, Joonyoung Shim wrote:
> If pending interrupt for IDMAC exists when initialize IDMAC, it will
> call interrupt handler unnecessarily.
> 
> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> ---
> Changes from previous patch v1:
> - Change subject and contents of commit
> - Define IDMAC_INT_CLR macro to clear IDSTS register
> - It moved to clear IDSTS register in dw_mci_idmac_init()

Acked-by: Seungwon Jeon <tgih.jun@samsung.com> 

Thanks,
Seungwon Jeon

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jaehoon Chung April 29, 2013, 4:59 a.m. UTC | #2
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

On 04/26/2013 04:38 PM, Seungwon Jeon wrote:
> On Friday, April 26, 2013, Joonyoung Shim wrote:
>> If pending interrupt for IDMAC exists when initialize IDMAC, it will
>> call interrupt handler unnecessarily.
>>
>> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
>> ---
>> Changes from previous patch v1:
>> - Change subject and contents of commit
>> - Define IDMAC_INT_CLR macro to clear IDSTS register
>> - It moved to clear IDSTS register in dw_mci_idmac_init()
> 
> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> 
> 
> Thanks,
> Seungwon Jeon
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index bc3a1bc..4abb3f8 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -51,6 +51,11 @@ 
 #define DW_MCI_DMA_THRESHOLD	16
 
 #ifdef CONFIG_MMC_DW_IDMAC
+#define IDMAC_INT_CLR		(SDMMC_IDMAC_INT_AI | SDMMC_IDMAC_INT_NI | \
+				 SDMMC_IDMAC_INT_CES | SDMMC_IDMAC_INT_DU | \
+				 SDMMC_IDMAC_INT_FBE | SDMMC_IDMAC_INT_RI | \
+				 SDMMC_IDMAC_INT_TI)
+
 struct idmac_desc {
 	u32		des0;	/* Control Descriptor */
 #define IDMAC_DES0_DIC	BIT(1)
@@ -433,6 +438,7 @@  static int dw_mci_idmac_init(struct dw_mci *host)
 	mci_writel(host, BMOD, SDMMC_IDMAC_SWRESET);
 
 	/* Mask out interrupts - get Tx & Rx complete only */
+	mci_writel(host, IDSTS, IDMAC_INT_CLR);
 	mci_writel(host, IDINTEN, SDMMC_IDMAC_INT_NI | SDMMC_IDMAC_INT_RI |
 		   SDMMC_IDMAC_INT_TI);