Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751229AbaJJAgW (ORCPT ); Thu, 9 Oct 2014 20:36:22 -0400 Received: from mail-vc0-f181.google.com ([209.85.220.181]:41356 "EHLO mail-vc0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751032AbaJJAgU (ORCPT ); Thu, 9 Oct 2014 20:36:20 -0400 MIME-Version: 1.0 In-Reply-To: References: <1412618020-22278-1-git-send-email-sonnyrao@chromium.org> Date: Thu, 9 Oct 2014 17:36:19 -0700 X-Google-Sender-Auth: BmHK2wJWTJpKdEwYVmlOqMzKNsM Message-ID: Subject: Re: [PATCH] mmc: dw_mmc: Reset DMA before enabling IDMAC From: Doug Anderson To: Alim Akhtar Cc: =?UTF-8?B?RWRkaWUgQ2FpKOiUoeaeqyk=?= , Ulf Hansson , "linux-mmc@vger.kernel.org" , Heiko Stuebner , Sonny Rao , Seungwon Jeon , "linux-kernel@vger.kernel.org" , Addy Ke , Jaehoon Chung , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alim, On Thu, Oct 9, 2014 at 3:19 PM, Alim Akhtar wrote: > Thats fine, I think every vendor (most of them) has a custom > implementation of dw_mmc, but they do have VERID register to check the > dw_mmc version. > The reason why I asked is, I have seen inconsistency in card > enumeration on few controller version, and this patch alone does not > help, and adding a call to dw_mci_idmac_reset() after DMA reset is > needed. And this is what is recommended in the synopsys's data book > also. > Do you see any issue/side effect after adding dw_mci_idmac_reset()? A quick test shows no problem with adding this to Sonny's patch: diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 66dc8fe..588b5b8 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -481,6 +481,7 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len) /* Make sure to reset DMA in case we did PIO before this */ dw_mci_ctrl_reset(host, SDMMC_CTRL_DMA_RESET); + dw_mci_idmac_reset(host); /* Select IDMAC interface */ temp = mci_readl(host, CTRL); I'll start reboot tests now to see how it behaves... I think Sonny is out of the office for a few days so we might need to wait for a spin, but I'll run with that change in the meantime and see how it behaves for me. Thanks! -Doug -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/