Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932330AbbHJIRE (ORCPT ); Mon, 10 Aug 2015 04:17:04 -0400 Received: from mail-bl2on0120.outbound.protection.outlook.com ([65.55.169.120]:22336 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932157AbbHJIQ2 (ORCPT ); Mon, 10 Aug 2015 04:16:28 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none; From: Haibo Chen To: , , , , , , , , , CC: , , , , , , , Subject: [PATCH v5 6/6] mmc: sdhci-esdhc-imx: change default watermark level and burst length Date: Mon, 10 Aug 2015 16:18:08 +0800 Message-ID: <1439194688-18335-7-git-send-email-haibo.chen@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1439194688-18335-1-git-send-email-haibo.chen@freescale.com> References: <1439194688-18335-1-git-send-email-haibo.chen@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD014;1:4+AQrh4WVtDdnVrriKzoVLaHq3QBXjQrWM2JBzRP930QXsT81aXnS/kAq/sm2Bda0N+g6DDlUfVpmepNCek6vr4gmXuiuDG46QNaNkzPDEuRghcl12N91lA6pLGMLVmE/AgG0dYZSPO4RJE/TVtD9HBUe5Poejj+/5XaX9xAj9QdCWJjTbgsGgGipTE2ol9ksVxmWyYusPsdgQniaz4SmgepCWX5qdHoQ4KdWiGGmlB8VSx91cC/FfAuqk+3Ztkdnp+pX9DFxoMYOVpvqOT14OdETPZTpEIFIrkiRXkMolOK361QbmKS/ZRnF95s+jf3jgSZuTJs7lPDCnSZRl5qqA== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(86362001)(33646002)(85426001)(77096005)(69596002)(104016003)(5001860100001)(64706001)(68736005)(76176999)(5003940100001)(5001830100001)(4001540100001)(230783001)(87936001)(2950100001)(50986999)(97736004)(2201001)(50226001)(229853001)(81156007)(5001770100001)(4001450100002)(6806004)(106466001)(19580405001)(77156002)(92566002)(48376002)(62966003)(46102003)(105606002)(47776003)(50466002)(19580395003)(36756003)(189998001)(5001960100002)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR03MB1418;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1418;2:7RX/2kkTivRmiWhRkcpa0aerRfwlL0lIDdYAKNKo25f2LRA5g/tALLADTLysULmciM8s03PPQI+cIKnyMIsLWO8XcaMEqfkvhn1hdFNmiEs2nB+rp0N3iAnBZGQawCXMETou4EESbKH8+eBI5yZcXzIi9EahJoMS5NmkhPktIuA=;3:WmPv6i6JIRRv1A1GKJVVbZj1e0znz+lteZhSgZRCTeutgA0XZ8YXY5iJ+RHACNj/TqaxfSb2unNmkhDLgNS1NzuFllsWqICaHC7qNIgfvk4eCudXTyRfiTrXv8BtlX8kt8C3Q+7jvpqhwF5aiQQ5lKvZM6Pjk5SMPtlsy/Oh3jrIT2af5osP4wOR9z//lgk7bGvz7rXcbC3JvVQmhym+OvdKaaOTWzaTP6ZTBg0dGRI=;25:RAQgFfzSj4fQvGt51Rea5cBak94eIFGLwinFRHmyfV/R2kYKSKxePcBEBGvEdZVNsH9ZWSuLBHP5NZe8nPzT51jVg3jHEiU28cePMxtmoOmrP2P+6PXOWFtVUo4YN/4Q8vi1syxeghO49PNLxHThFo0B9WdIdQkbY41+/EX1Z3JlPJhX1xrHqM349kxRDuQ9RoWI98LSrekXtLsTT+EWZMweRPu1mIrDLJcB5yp+Vox5Cw0eJ7zAJVOOqTFV/AmdThIrK4R2Q76SHh4sR9AmBw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1418; X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1418;20:wk3uewkh+eB3hstf711cdTWZUG1I8Z+R6LCuVyJ3urMWEJ2CanebtVeC0N1U3xRn5hzq62l3EvjAT4PdrkXbtkG6JBADnxRz4OFD2qzAqq5KM/sjTIi5RI9cCONn/pzMYcT/hSOtiCO/0XEHK0WuJJni92AulbXkKM93l9NLnU/WsSdytRWo5bNW+Jen31Z4PFPekJOFN4YSXSsmWpUgHjb2idvDOn+ABsNkEZdfUtqphx6BjAB5W4xSXLOoFjbY3julr8TltXLM/il0f9j0k9tJyjeSYsIyZLdMzHx0lwwYtrEjtt6g4gcyWnghqy2a6YqebaS/oKJXYteUTJeO+jdCflBW/s7t/5pmc45S8gU=;4:0hEMs5i3A78+G/z7sP0ZaPM1pF+kkkUgNqo62XY4Ut1ymM7ziwSOpcK0rWQFLhG9yJqjhyP3PNRRgbPz9uID9AMpDfsrA2nKG2j0LHAPAe+xbAk3ef9X5MvrJ3Uoi05OMBiFtTzY2tw0blBryiFvpFqtXdvJIC4KURiHcnyl0BL87DLrx2s2TiuBlCMWxNsJgFqmlyihkmBaIPAJ1c9N4OmNphnvMPCT+fPQsoZhUuy2CwFcZPvVGG8TlgiMnA6/+ylWfVezGXkJvVjwATK2sXmk5NsNzwoKZDadPyyrxDQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BY1PR03MB1418;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1418; X-Forefront-PRVS: 06640999CA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR03MB1418;23:Or+GVH7644WTjSDaetlCiRG6OBfSxDC31zgdQfIDf?= =?us-ascii?Q?fHzr/8A62oVVgH1MxD+4LtmpIJVKjsAIawrhbdKzR7QFQbD6Vb77DCrcDhKw?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11ykmphI5zsuqR/UGurv8xQjWRBn9Zg26u0ry?= =?us-ascii?Q?FQZVC+vjVg4z+mEQYJ89p9c59DwEQY3Go1fxLmNa6xGzSEND4vNwEA+7Yo4+?= =?us-ascii?Q?PkGlNIYTbS29PG3EF54i2GQjKop81tq93qNIFGUwRKchUg+CntWqtOGxn10R?= =?us-ascii?Q?ZhCe7qUBPGHx9+U+x6XMg95CJ75pl7s6IgzvsPgBKckX2uksxXI75NuvZTrh?= =?us-ascii?Q?Rq4d7yXuinc3MP7VHSXKPpHgP1yZmVHDsdO?= X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1418;5:d9+Ezq95dwRmrnG1ccAWzqJDbt3T3iV6UbBZoYY0KN304tgWYvbNIZGj20oRCb3I8Tc9q3djBQm7IuQ1G36FQ17P2XfVYwAjSBE2fo/6SXS/VwAs4YVs7yjP3O3cFxspHaNzSEH7phdRdvyw/fOBHg==;24:VmJwIZyjdagNAYbCGhL7e+nWAhyWleZUnL6aRm4/KcaK7Du5l7dcjgj8dua7NYqy/Z+mAvSq0Ot7Hg1zGOJ7lpLb5TaNHnRVOrqahWOhBPE=;20:M76zhJbDeMOuzwsmKOBdPKY7s2uxQ1FF6gZCKx2AtNAZNDbsAhetRhoRVe9v3Ed2XEIMGZ6FvuBk6G5yaS2u5g== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2015 08:16:25.1798 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1418 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1821 Lines: 44 By default, for all imx SoC types, the watermark level is 16, and the burst length is 8. But if the SDIO/SD/MMC I/O speed is fast enough, this default watermark level and burst length will be the performance bottleneck. For example, i.MX7D support eMMC HS400 mode, this mode can run in 8 bit, 200MHZ DDR mode. So the I/O speed improve a lot compare to SD3.0. The default burst length is 8, if we don't change this value, in HS400 mode, when we do eMMC read operation, we can find that the clock signal will stop for a period of time. This means the speed of data moving on AHB bus is slower than I/O speed. So we should improve the speed of data moving on AHB bus. This patch set the default burst length as 16, and set the default watermark level as 64. The test result is the clock signal has no stop during the eMMC HS400 operation. Signed-off-by: Haibo Chen --- drivers/mmc/host/sdhci-esdhc-imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index d7ec993..1b31d36 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1162,7 +1162,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) * to something insane. Change it back here. */ if (esdhc_is_usdhc(imx_data)) { - writel(0x08100810, host->ioaddr + ESDHC_WTMK_LVL); + writel(0x10401040, host->ioaddr + ESDHC_WTMK_LVL); + host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN; host->mmc->caps |= MMC_CAP_1_8V_DDR; -- 1.9.1 -- 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/