From patchwork Fri Mar 27 10:52:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Borleis X-Patchwork-Id: 6105011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 045019F2A9 for ; Fri, 27 Mar 2015 10:52:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 21EC6203B7 for ; Fri, 27 Mar 2015 10:52:36 +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 2EE54203A4 for ; Fri, 27 Mar 2015 10:52:35 +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 1YbRqC-0003IL-V1; Fri, 27 Mar 2015 10:50:16 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YbRq0-0002FZ-SW for linux-arm-kernel@lists.infradead.org; Fri, 27 Mar 2015 10:50:05 +0000 Received: from gallifrey.ext.pengutronix.de ([2001:6f8:1178:4:5054:ff:fe8d:eefb] helo=localhost) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1YbRpe-0003Bo-Ir; Fri, 27 Mar 2015 11:49:42 +0100 From: Juergen Borleis Organization: Pengutronix e.K. To: linux-mmc@vger.kernel.org Subject: [RFC] i.MX25/35/SDHCI: switch off DMA usage Date: Fri, 27 Mar 2015 11:52:04 +0100 User-Agent: KMail/1.9.10 (enterprise35 0.20100827.1168748) MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201503271152.04348.jbe@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:4:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: jbe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150327_035005_202050_A2E041A4 X-CRM114-Status: GOOD ( 13.29 ) X-Spam-Score: -0.0 (/) Cc: Ulf Hansson , Chris Ball , linux-kernel@vger.kernel.org, kernel@pengutronix.de, Shawn Guo , Aisheng Dong , 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 DMA and the required overhead on very small data blocks seems an expensive operation. Due to erratum ENGCM07207 for i.MX25 and i.MX35 SoCs the support for multiblock transfers is disabled which results into a huge amount of single 512 byte sector transfers and interrupts. This slows down the transmission speed to below 500 kiB/s (even at 50 MHz SD card clock). Using PIO instead of DMA to avoid ENGCM07207 happens and re-enabling multiblock transfers again improve the transmission capability up to about 2.5 MiB/s. I'm still not sure if ENGCM07207 is related to DMA only and can not happen when PIO is used instead. Someone out there with experience regarding this topic? --- drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 10ef8244a239..f5fd569a17c3 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -976,8 +976,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) if (imx_data->socdata->flags & ESDHC_FLAG_ENGCM07207) /* Fix errata ENGcm07207 present on i.MX25 and i.MX35 */ - host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK - | SDHCI_QUIRK_BROKEN_ADMA; + host->quirks |= + SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_DMA; /* * The imx6q ROM code will change the default watermark level setting