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: 5063141 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C3622C11AC for ; Fri, 10 Oct 2014 00:39:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDA132024F for ; Fri, 10 Oct 2014 00:39:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D27952024C for ; Fri, 10 Oct 2014 00:39:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XcOCK-0002aM-OE; Fri, 10 Oct 2014 00:36:44 +0000 Received: from mail-vc0-x232.google.com ([2607:f8b0:400c:c03::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XcOCH-0002WE-QU for linux-arm-kernel@lists.infradead.org; Fri, 10 Oct 2014 00:36:42 +0000 Received: by mail-vc0-f178.google.com with SMTP id hq12so1871333vcb.37 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=BM607rpa5h8rqfVspZPiEJImdgpioTe7+kURbT6RhqWWlU79VMrnAKYr1MqHsqcXDx H6ZYxu5JBTHaA/9lMScNg0zMIseWoyqmXeZDCeEFeGaNR/XpJb0QKe73N5GrJxZl6bBq nse+d9Fv7cSlZ120sOk2Kkgu1TTa/S2MjSJ3xFCQmqFAqABNUVeOAVSUr6a97IDZsjaF TSr7LKHU1CAFu53g9jg5KDxTdNFeLIKq0p+I8wuhl6YVQeu5TjWO9iqMBj6qMDSzQW9h xY38IxRZedbhi8/DwxYl5ZPdkP7+8jbJGjpsXNP0Fz7/135uHnACFgbRZ7a4n1a9JGiJ Y6BA== X-Gm-Message-State: ALoCoQl/foV0I43lXmBnvLShqS+phVXMcQiQLbGOx3Oxgau2u7lbcQpHe9wpHgoLvyE4jNxpShgu 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141009_173641_963514_E4D4C720 X-CRM114-Status: GOOD ( 14.64 ) X-Spam-Score: -0.8 (/) Cc: Ulf Hansson , Heiko Stuebner , Addy Ke , Seungwon Jeon , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jaehoon Chung , =?UTF-8?B?RWRkaWUgQ2FpKOiUoeaeqyk=?= , Sonny Rao , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 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 */