Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752552AbbG2JCY (ORCPT ); Wed, 29 Jul 2015 05:02:24 -0400 Received: from mail-by2on0111.outbound.protection.outlook.com ([207.46.100.111]:55504 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751509AbbG2JBf (ORCPT ); Wed, 29 Jul 2015 05:01:35 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none; From: Haibo Chen To: , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 5/6] mmc: sdhci-esdhc-imx: config watermark level and burst length Date: Wed, 29 Jul 2015 17:03:56 +0800 Message-ID: <1438160637-28061-6-git-send-email-haibo.chen@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438160637-28061-1-git-send-email-haibo.chen@freescale.com> References: <1438160637-28061-1-git-send-email-haibo.chen@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC003;1:gXPvQVlrtJ/kum9V6nydVSnq4rr+zOEJUgr/UxbMWA7X457MnFQmIU2B1QNZUr7igu5mvHfyUzz7ZjRm7NKbEC9UstU9Wwc91/FttXBFguR5NwfAkI4ghy/0eRRGkOaIr08350reyLBF+ayrss0IMojDnEMX0TS2aLZWUVcFnRJ3rKy6VC6ckdhDkXvvquHjfOm/MjwJGf0HuAsvNzE8O551S2+qODalkcMgi7v6yKzn+jjGxqqONQu9/M+cP+YCvh/xPBSJO9juc8QZyAnQi3KdO2JEZQucyKAKjfdarMIoPz7T4VBwjnC154Smo8nHH1jXWTQv/YXYCQ/g35RvMQ== X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(6806004)(2950100001)(48376002)(50986999)(105606002)(189998001)(106466001)(92566002)(76176999)(77096005)(87936001)(230783001)(36756003)(62966003)(77156002)(86362001)(5001960100002)(19580395003)(47776003)(4001450100002)(2201001)(104016003)(229853001)(46102003)(85426001)(33646002)(19580405001)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR03MB1388;H:tx30smr01.am.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;BY1PR03MB1388;2:Jyz0uO5JaZu0vhEMoPOWuVeX7gGz26wdEo6O/tqwNy+yrzKehwjfuvdtPTOvxSRl462gfZU6NHPHPJ1IsxjyIBRb4FXZ3g2NaFI1LpR0jXYfGSEROBuciYRP4ro3ZlcTnyXbFWU3whknFsrBDXRF4EWGyWPoQKW6CUgpSNeuvdU=;3:Fwj+rgU+u22MILivGszQsvK/dkFl7pKSGiNT510LECrlsknE4qiqyTyE9CcZycLfztBChl/k2a7cx59CPzpkE/T6Rz/5IZ9VVkOtXDp3TTIdRZk43iMpriPh69obzGiaaVKdWVtyMdmvszmAyIoV+v7FEgCOJPEtuw3wtsHueNKhRGl092sYz212RgjFfL4P6FNBFBZ46WOTcXCr4Nx8Qupf4qN88TL5NxjGhXkwsNU=;25:kpOcoRZQj3jRrLPCQbzJGQmXn+fD4KXp2wid25nlWB1wBiJRXunKtBs5sYBLm+fg//MnHmn6DrEkGfl00X/xvQoQFGaHwWweQb2lqHfzgdNBHmnhCLdJylz5Opxt9DuJdz6GX2W9BRP9tSp9rWllmqbbJIm3ifTrZIUa6T3dNU9emg5cYzFq9vJdKyAb37DJV/ebrIgCtiEbmufH5qUyNRBy3UL918EvHo8gR2U5Ox/C3f8PB6nIyqw5zDDikYua4iNRROJX6AvDW83z2207LQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1388; X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1388;20:5ZCcSIrG5Ccb7GT5YIOQnc937MLBhswfjDD0xCcyPszPaqQL7O4nb9NabWb+Zqyw1uOUZ6mRSxlZJV6ZN2WZdiKpDLFhWXwmGs2WQan6O7icbIpcwqZpGsk3oQesSkg2BQeyVe5O6Bni1cmo+82E0hRcaB7lVJZAso2I28RwxlEvjWQropYhkuvlOVrIYwn8cgQ7hlMEm4bLErQtgZF0Rfu99xY96gmu3KJ6PX543EewnO0ZcLVZ1qjNlvhghSiMGM1+cFLwb1cWzFrxlitSCEcF9+iTa8jw0ShkcPeBsYin6MVUmfUFV0xP8O6z1d1n6uAIFV2EOiiZKIMFmN9lc1SmPdLCVQfsTesA8UFfZY4=;4:0SgQdoIMZWJftdl0MPs+tE1KK4qmAGBh0j9QeT8mIWpLukKWjRxWr55VJA0CT3kf2P3Tlvqb8tM+bYHaKIvn2urSwjWmTDchwWm9Lb3qBtOIbYA8U0tDMMMKWCVHV84Mswtv0eafbH1T6yvFZ/H+Zts3IUWhu/iYEGte21GaGYCK8F3ZdgcqMc0qS9H9P1NdEKfZNrArKhhF4woQli4Z5LJnf5aHGCb26JhNiFgSwlw/YBegdwB9LO1VqdXkFj1x6YTR37LFtdPZCEAJlTkax0pXBbsYkBdGHXewmj4ZZmE= BY1PR03MB1388: X-MS-Exchange-Organization-RulesExecuted 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:BY1PR03MB1388;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1388; X-Forefront-PRVS: 0652EA5565 X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1388;23:/0xGMjz8z6AOentwI9MEk31PADQmvTyRymQLeGOVb8zLUwtbds3U7VNhHpe+pLoEh33MFItTUySvyTLVYChe7FvD7WuB8N3iFVsbNYc+XVDHSjiIg+RO+VDVK2/sXZVlOgosncu/bAkIPRMjc93qg3t85UPtzCxieoGuPQCTTMRdiAX1XVq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KtLIpWuS/j1zieeBmb24jwv9L2Mwimysxt7BnqdpJftqpA== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2015 09:01:33.0551 (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.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1388 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 158f93b..37d0095 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); @@ -1145,7 +1150,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/