From patchwork Fri Oct 10 00:36:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 5063121 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8DE079F295 for ; Fri, 10 Oct 2014 00:36:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A574220212 for ; Fri, 10 Oct 2014 00:36:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C83142017D for ; Fri, 10 Oct 2014 00:36:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751115AbaJJAgV (ORCPT ); Thu, 9 Oct 2014 20:36:21 -0400 Received: from mail-vc0-f177.google.com ([209.85.220.177]:54291 "EHLO mail-vc0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbaJJAgU (ORCPT ); Thu, 9 Oct 2014 20:36:20 -0400 Received: by mail-vc0-f177.google.com with SMTP id hq11so1898488vcb.36 for ; Thu, 09 Oct 2014 17:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=8oLW7xpCLqwHcHKf9TO0xpYvcaOmi28I9RCG6j7IMRI=; b=cfRrihqgxHYK/oMx4RzNrt9GAYQhm1mhOXtCO1u9AMmaUuS+JIzge6jzEb+B249mxn xhv1aCCEKZk4diQAC6mFYBS/3ugS/yNnvmLyTWYg4IddE91uN7uRVVJYWqyjRRfAgjBi EjznSuuODypPG12kTZKirWjAiFXq6sMCbM/7lWGvwrc6erZQAk56Kli0xySMB3PYHeNu y4/XlHnV6Hmj3VadBPc/eiJj3wgBqlcEVCyivR/ZAv01Q2oI64lS9Y254yjxFlLh/7TZ fUltEoCI53N/rzqNYIU51RDuYJKZyd5UjRatVjix+pzCjVQzt6u641VOSi+P+7T6p8wV 0cig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=8oLW7xpCLqwHcHKf9TO0xpYvcaOmi28I9RCG6j7IMRI=; b=JzGg98MsSdqkcHdRfQEVUq50c90PLp44Vm1FOvSruL0uoPK+lBxiWsBu1G3xf7DJxj 0vPbo+VLzmnb1wyhtT/MkuNt6afv/JGq2l0F0cbvGSfbZPyUQRq0C41M2R0la+8FAaPG cf304nPkMWc3b1mg+9oUChF1o2cVXkzmYe2Zc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=8oLW7xpCLqwHcHKf9TO0xpYvcaOmi28I9RCG6j7IMRI=; b=T65TcEEyOdQkamN48LLlsxD2rINcwydCJ9PEnk7B7RLAJrmFH/JiT6exVzzIdYasaW GzPbCSqXiyubHoAFAEBeWMyH7jkZjBaRer6HI5pREpKOOxs2j+9zovzBLXLJIe0XADTW 2P7QcmtOnBKcZ6qF87/HFhC4Qpyl+wg9i0XT8dJS7uyHHCU4DcxDiAAYVYvRH6cSyfUA 4yasyM36ExY6CLYK9Vq8N7RJhyrlEB30WDugLL59dyUSPZ+CwvvN9LzLo1Gtv40xt10d KyB+nCDPhNyomJ33bYaqy/cj9oK5Xty0zxBA4EuOkyM2fDJjo4pWKwgPCBbNTs3v5irk cjLA== X-Gm-Message-State: ALoCoQnr2W+4TfUDUP2n4Y9oBkCImoaxahHZEA0pi3LS2VdlkkujRcvGl8zqJ6W0ou5MvYQyZpq9 MIME-Version: 1.0 X-Received: by 10.220.100.10 with SMTP id w10mr1849008vcn.2.1412901379223; Thu, 09 Oct 2014 17:36:19 -0700 (PDT) Received: by 10.52.166.202 with HTTP; Thu, 9 Oct 2014 17:36:19 -0700 (PDT) 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" Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 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-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 */