Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754378AbbFWMQw (ORCPT ); Tue, 23 Jun 2015 08:16:52 -0400 Received: from mail-bn1on0117.outbound.protection.outlook.com ([157.56.110.117]:3776 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752229AbbFWMQn (ORCPT ); Tue, 23 Jun 2015 08:16:43 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; From: Haibo Chen To: , , , , , CC: , Subject: [PATCH v2 3/4] mmc: sdhci-esdhc-imx: config watermark level and burst length Date: Tue, 23 Jun 2015 19:48:02 +0800 Message-ID: <1435060083-2606-4-git-send-email-haibo.chen@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435060083-2606-1-git-send-email-haibo.chen@freescale.com> References: <1435060083-2606-1-git-send-email-haibo.chen@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD035;1:HxpnwSL5NNAvoQAtIx4yrphEqbMh4KRF5FHSSKzZIsCdTlJtlM6YqR7960yukoHjMvtBUSuhbLNwVupnNG3OR6Lg97nKoRzIhnBH/khshonZU4f3npSNeWl+gAtMS3fauLq5mChma6fvgPR2VbbvMItueD+WOCxJ1wLRFUFXCKcjO2gD6Up5lthMWHjDEOtRAGHzsM/dMdMKRSfRtGGWdqoBIX3TzTHKvGj0yIrj1uw9+S0/64VUkNwCvo8buxU1zDgMMlR4Y2pYCG8oUX3KmZdysVWIHgDMY0uvVYhlBvkzmMwTKhPJy7d/VmEGYxF2aJMOxNN/5+3MNJD+raeg1g== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(33646002)(46102003)(105606002)(47776003)(104016003)(36756003)(62966003)(107886002)(2950100001)(77096005)(189998001)(92566002)(229853001)(77156002)(106466001)(5001960100002)(85426001)(50466002)(48376002)(76176999)(230783001)(5001770100001)(6806004)(19580405001)(19580395003)(2201001)(50226001)(87936001)(86362001)(575784001)(50986999)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN1PR03MB249;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BN1PR03MB249;2:HXl8nI3Uk8Im2O6dL8TL0l/apEAd2R37zJ97dbD6qhxTcDrgc36iL0UJ5qDiD7LK;3:/eSiiZRUnn+bRk0W4Xnyt5vI3sQMOkrqNJrkym5Mn3lmvsrB3n1W8A651u3guXGCfhvQMbMKbcfaB7Ub9vir2ElS2HFuvWpJ0bK44fiCsyOCC7m2F2G7Uw6B1W/5bW9pNM2Rn5nSWsLY9PQpyNkbNrU7jW7JLuh9fMubM4sDO+pX+QAOYWytIdfXMpdKB+9eZ3Rt4YTqs5wNUqiIunmM3sVdzpYW8xHfRIRlX5sdI9s=;20:7oUrHs8c2k3r92IdyAOO43VfqvtR3ZSnvIuqUrwJjU3KxGmk0l8WmBzpYOKM7zdsuRxC9pjXUR4YRkeDbL/6AichO37rmOUjRXSJt94ujxQ5RaQP4yxKUOcPpgD+7oC3Qg6A9p0HKdXBjHzHHt9lVc4IsMOE40NSoNKXWkTl3XjrLzzCY5fKkBtFt9UtvuRB2QsFw0niYuQHFogLwNkXW0g7fkx7hDg4CBlL/6YLuitwUftiMvD92k+RtqmaWjDDb1RcwK9MfUrGE5T+m1+9wyZshbe15yjguov1JiruPhkosRaONLBy/iPaHxTdO09nj3mGl9Cx3R7UF2XdBfoeDr4UaCMwsWboXYjudvSrQQU=;4:vkwJPZC+JkPRiooaAvZAv4fzX/04ZNpwoy6qLYgL5ROMzTu8ugd3a1Yf4FTeJSxQ3+WVJNUpx5Zf7e8BtIeASB3mS+veJrkdojnm53vV79YnB3Jc1vwl7DftQmI4ZmLjqDu5WJJM+wxOhTR2oSEI3Qpnh+9INDhteBMlT+I/d8gKPcdqKoomq0P2inCUxQ9IUC3lNbmiKxTtmr5kCc3vc2nPcZ0lkdg20R9oUv7Q6QQQLM8XrOYCF/6Xkz3071b1sqSdrfMTJ3B2lIPDat54RKdlJEAdnY43tnKloTRaZvc= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB249; 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:BN1PR03MB249;BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB249; X-Forefront-PRVS: 06167FAD59 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1PR03MB249;23:pqiN8YVGVbHUzyCFxAkWgmTDxynMWEhkdteNd3NOyw?= =?us-ascii?Q?aiPT9DOaQLr36RRZK/qXLm0fT66362rH75urMmH/nUpuNYWFZhJ7iqGOcMhw?= =?us-ascii?Q?WzTkwSlLBuHdpn+KlWCUSqoQZoccl22iV4UziXk9RswSy4W1IXOLhp6AAUF/?= =?us-ascii?Q?NPZg/UbA/n7mChS8m3/6YE9+x3Nuknc3im/UXZQ5TV1ycGfrpt+sGmlBJTP1?= =?us-ascii?Q?H8bcEwUlo8rqcE5k//VqZZVd8MF6CqZ+daCcjvU9+GyEvw5EGSyr3iMsuR9A?= =?us-ascii?Q?ZtrkMUWKDrHlo3JMFAISHQwskrsksoQTmumL08FXzOjbKTiBJ0rVFHK/y4nB?= =?us-ascii?Q?d8G4T7QfEdxKqbn+J9zV6rQK9+fBWn7hMWBpcWHVaWKaXmp6HkEf+9VuCwXH?= =?us-ascii?Q?T4sa5fS+zs9kFi5jCdLZ/DgIpGUkrE9Zz6TC0QqvY2Rlh5P5SD9lQ2RLvQlx?= =?us-ascii?Q?c3JWO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freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2015 11:45:26.0316 (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: BN1PR03MB249 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2149 Lines: 56 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. For imx7d usdhc, this patch set the burst length as 16, and set watermark level as 64. The test result is the clock signal has no stop during the eMMC HS400 operation. For other imx usdhc, remain the default value: burst length as 8, watermark level as 16. Signed-off-by: Haibo Chen --- drivers/mmc/host/sdhci-esdhc-imx.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index f7ec66e..1f0e0d9 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -239,6 +239,11 @@ static inline int is_imx6q_usdhc(struct pltfm_imx_data *data) return data->socdata == &usdhc_imx6q_data; } +static inline int is_imx7d_usdhc(struct pltfm_imx_data *data) +{ + return data->socdata == &usdhc_imx7d_data; +} + static inline int esdhc_is_usdhc(struct pltfm_imx_data *data) { return !!(data->socdata->flags & ESDHC_FLAG_USDHC); @@ -1075,7 +1080,11 @@ 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); + if (is_imx7d_usdhc(imx_data)) + writel(0x10401040, host->ioaddr + ESDHC_WTMK_LVL); + else + writel(0x08100810, 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/