From patchwork Wed Jul 29 09:03:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haibo Chen X-Patchwork-Id: 6891301 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9D954C05AC for ; Wed, 29 Jul 2015 09:24:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D83E207D5 for ; Wed, 29 Jul 2015 09:24:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 591432079C for ; Wed, 29 Jul 2015 09:24:10 +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 1ZKNZH-0001As-OJ; Wed, 29 Jul 2015 09:22:31 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZKNZE-00017L-Jc for linux-arm-kernel@bombadil.infradead.org; Wed, 29 Jul 2015 09:22:28 +0000 Received: from mail-by2on0126.outbound.protection.outlook.com ([207.46.100.126] helo=na01-by2-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZKNFN-0002WQ-Ud for linux-arm-kernel@lists.infradead.org; Wed, 29 Jul 2015 09:01:59 +0000 Received: from BY2PR03CA051.namprd03.prod.outlook.com (10.141.249.24) by BY1PR03MB1388.namprd03.prod.outlook.com (10.162.127.142) with Microsoft SMTP Server (TLS) id 15.1.225.19; Wed, 29 Jul 2015 09:01:33 +0000 Received: from BY2FFO11OLC003.protection.gbl (2a01:111:f400:7c0c::161) by BY2PR03CA051.outlook.office365.com (2a01:111:e400:2c5d::24) with Microsoft SMTP Server (TLS) id 15.1.225.19 via Frontend Transport; Wed, 29 Jul 2015 09:01:33 +0000 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; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11OLC003.mail.protection.outlook.com (10.1.15.183) with Microsoft SMTP Server (TLS) id 15.1.231.11 via Frontend Transport; Wed, 29 Jul 2015 09:01:33 +0000 Received: from b51421-server.ap.freescale.net (b51421-server.ap.freescale.net [10.193.102.57]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t6T90uDw011542; Wed, 29 Jul 2015 02:01:27 -0700 From: Haibo Chen To: , , , , , , , , , 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 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/bAkIPRMjc93qg3t85UPtzCxieoGuPQCTTMRdiAX1XVqELlACq7NmitwV6PlKxctpbYk72DjPPWjCGSwv1fnkxUVd9rCCrV4brb1TV98wXpnCBphuIoOl1QCv2vrfoHBiwcSIobpoxfJQ+FW03yJzRCYv6Fui3xPL5t1X7jCOxWv37wBake5hc1J1Tm6cz/8qe11yI9HEbGVuodbMPDOa8UsuUwCqTXHlfwVreNUZuKupUZwf6ZQD/C+MhOsE0eq4UZmfjGPXmpj9E5/Bt3n1Cg4q6oMTzfODCetXlc5mHoKVpHLAVfDcHUjo5ARqJWw6Y1rfXsvRbVZVisYt7Uh5KbglKDLp8vULPmA8s9Hm4gIFr0Gr1CQihHjY6PoL+A1CPOW6YLbs/O0qc7nKsTegXsKllkD58NX5is22eVOCA3X0UUvsTNPz1n20hoNQLKREI5XS+EiKIx1lo84BPAXnkUp72djZQrcKFqLGlTD0Bzm+dEnicWx/+m1peq9IIOAbqchL2xQgc0p8FIyOoKf5PPtlI52TQomufCwRVcX7Nx1mXpbAk8fb3xkr8TCHM+WbOCn7NG4bq8tdzGZXAC44o0KRqRj2D8V8tgiZeevSifqe45eLT9dHqbulFD6YFyI70Hj3Bc1kHm5d7v2a7xGDXE0g82InldztCkn7a/ODeDLZvZDV54WEP9u0qCvIKO3lianjkVxKhLnRn0MDGWub54wRRW13/Au1R+hWIHMq9RG2hoFq3sI78RbK/2XV/5RxoPiU3Z7RO1dvVw== X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1388; 5:rPzC1o1KV9Mg/2pSKjAUIEUdLUf0lCt/O7JQWp7+2yjotsVCE+Jng7C6qmM5S98TSLas6OkbgdY3tfNReSOoRWjM38qAaDlGQeNzmMZrR+Ho/1QS0y7BA463xQ1D8FNBa2tdzxAql0r9MUqLDrjSVQ==; 24:+FxH7fo6nz1z7ITbLpd34zys89oV0gPH3ArAQzQS/yK9b5fyingLmzxMud47Ot+DsXqXBBRTnhj9wTmIlfNz7LxtlRB7s66MAZfhp0NX3YI=; 20:UVpyA7LPwmn7thioSlOMpR8T3DerYJU0T60GgnWsKtLIpWuS/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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150729_100158_276691_F5BE3E6C X-CRM114-Status: GOOD ( 23.72 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fabio.estevam@freescale.com, devicetree@vger.kernel.org, haibo.chen@freescale.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, johan.derycke@barco.com, b29396@freescale.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 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;