* [PATCH v2] mmc: dw_mmc: clear IDSTS register when initialize IDMAC
@ 2013-04-26 6:35 Joonyoung Shim
2013-04-26 7:38 ` Seungwon Jeon
0 siblings, 1 reply; 3+ messages in thread
From: Joonyoung Shim @ 2013-04-26 6:35 UTC (permalink / raw)
To: linux-mmc; +Cc: jh80.chung, tgih.jun, cjb, will.newton
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(+)
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);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH v2] mmc: dw_mmc: clear IDSTS register when initialize IDMAC
2013-04-26 6:35 [PATCH v2] mmc: dw_mmc: clear IDSTS register when initialize IDMAC Joonyoung Shim
@ 2013-04-26 7:38 ` Seungwon Jeon
2013-04-29 4:59 ` Jaehoon Chung
0 siblings, 1 reply; 3+ messages in thread
From: Seungwon Jeon @ 2013-04-26 7:38 UTC (permalink / raw)
To: 'Joonyoung Shim', linux-mmc; +Cc: jh80.chung, cjb, will.newton
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mmc: dw_mmc: clear IDSTS register when initialize IDMAC
2013-04-26 7:38 ` Seungwon Jeon
@ 2013-04-29 4:59 ` Jaehoon Chung
0 siblings, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2013-04-29 4:59 UTC (permalink / raw)
To: Seungwon Jeon
Cc: 'Joonyoung Shim', linux-mmc, jh80.chung, cjb, will.newton
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-29 4:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-26 6:35 [PATCH v2] mmc: dw_mmc: clear IDSTS register when initialize IDMAC Joonyoung Shim
2013-04-26 7:38 ` Seungwon Jeon
2013-04-29 4:59 ` Jaehoon Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).