From patchwork Wed Jun 10 08:50:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haibo Chen X-Patchwork-Id: 6577871 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 8382AC0020 for ; Wed, 10 Jun 2015 08:53:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97525205DC for ; Wed, 10 Jun 2015 08:53:48 +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 B55EE205C1 for ; Wed, 10 Jun 2015 08:53:47 +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 1Z2biw-0000fk-S1; Wed, 10 Jun 2015 08:51:02 +0000 Received: from mail-bn1bn0104.outbound.protection.outlook.com ([157.56.110.104] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z2bgt-0006ul-Vc for linux-arm-kernel@lists.infradead.org; Wed, 10 Jun 2015 08:48:57 +0000 Received: from BLUPR0301CA0007.namprd03.prod.outlook.com (10.162.113.145) by CY1PR03MB1421.namprd03.prod.outlook.com (10.163.17.143) with Microsoft SMTP Server (TLS) id 15.1.184.17; Wed, 10 Jun 2015 08:48:33 +0000 Received: from BN1AFFO11FD013.protection.gbl (2a01:111:f400:7c10::146) by BLUPR0301CA0007.outlook.office365.com (2a01:111:e400:5259::17) with Microsoft SMTP Server (TLS) id 15.1.190.14 via Frontend Transport; Wed, 10 Jun 2015 08:48:27 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; lists.infradead.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 BN1AFFO11FD013.mail.protection.outlook.com (10.58.52.73) with Microsoft SMTP Server (TLS) id 15.1.190.9 via Frontend Transport; Wed, 10 Jun 2015 08:48:26 +0000 Received: from b51421-server.ap.freescale.net (b51421-server.ap.freescale.net [10.193.102.119]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t5A8mAXd027809; Wed, 10 Jun 2015 01:48:24 -0700 From: Haibo Chen To: Subject: [PATCH 4/6] mmc: sdhci-esdhc-imx: config watermater levles and burst lengths Date: Wed, 10 Jun 2015 16:50:42 +0800 Message-ID: <1433926244-29244-5-git-send-email-haibo.chen@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433926244-29244-1-git-send-email-haibo.chen@freescale.com> References: <1433926244-29244-1-git-send-email-haibo.chen@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD013; 1:k3VbIUK/MP1ushd4AddKMPRvnexU9RhwAHvnZWQyFbUL8pRzUmxCmjEz+sOtxwLMbI77xIm3jlEJ9cYb0UyseiqWIPJAOlF3Ddcp3DMSrd6w4NuFraRSDEp+9ua4KiuZORKYMTkXWJrHQ1Tj23rpGiUwOewPsmfrtFfzw3dG4zjXdtoLB3SwC1wd7moepkfvcPYTbSUbl0aS7tI1bZpuG3O95ZLEgXq3c8+hszyLKbAyCnmqqRFGbBbEtnmW37olZjAruZD6fDGlkdLglKqa5rUZ5rCSkQ0zXfF34VqfvQfVfLKRgBUsDtEzk/uFHnfvH5ZoIrm56UXJU6POcn2VtA== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(6806004)(19580395003)(105606002)(36756003)(19580405001)(47776003)(5001960100002)(575784001)(50986999)(110136002)(50226001)(48376002)(87936001)(77096005)(230783001)(92566002)(104016003)(189998001)(2351001)(106466001)(86362001)(77156002)(2950100001)(76176999)(229853001)(62966003)(46102003)(33646002)(50466002)(129583001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR03MB1421; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1421; 2:Bb7e65U31b5AdvVsmSZQY8so+rNs9LjyF/ftddFF4TIUG4sJiQ6LY7kIgjjrB+Yf; 2:weThpVTPd1GyAU5lI15X97qBy2bCvQlh3NRU4DGqV/hJbkRMzk46xh/ZW9uuG0bcTsYqLszuUjkZ3P0yQ8mXc+otT/sWVHuuoEfL8Y3YaJxastKqKoyTvaRNnH4kngTJbLg3EvSPP14CXaEDOHmlUn+TQ1WfMJ3xoycNp6EPYYeYjMlcTf9i4mE5oLhfSPkfXy4AMMIGpz+4Pu8ofWHWL7A9CHp3Y0TRXI9weKoBfck=; 6:XABHURsoTenKwhJxzrZ1Wp8S5t39ZDq693S7qwJ8jtyODXEoOGe/T5LMuDcaWKN6fFITXmcQ5UrsuTRBy4dJIsKIeGhmG+UkFCQI9bzz7taT0GADO6Ykdtaw+P/Pkkm8acIhdIz9hYTt80O1T1DX4pDqD6gT+fizmx+yN5YDDwjWCm9z+V8n8lozKD+8L4tZODOKcINTttGMzTJt2eQEguFY3nY4QKGBDZL+cqty3aBviDAtnpGOpGlHUlgtMfXBpB29bN5g06SVdZUe3+UzSj5aEHEe8I/6HZOR9ZddzElA+abgdsMiJtmfb70Y5cdeF9YGNuQEGqwTP6MDDh4VgQ==; 3:leyxFL3qSxWXbNqEmxFBRjR0qj4WoeCTWdwvWeIcVAcHYr7AClYp5cnGMRJTJHE4FXY3OhVhlmHLNHIEA+OHtQ+FRjO2/2u5IHepBtFi66qyrqOUOItrPQi6+5Qdk5owFwzj1P1IwEBWiWryzIa6tCcbsG2g/UMoX7eM24O+sZSZ9ufKmrqnJSnZpRQsOQIdZCaAefHCtOsnbcCrHDqdiLAFQD0qy7shMY8JKuRvOsaqgcTrdExWpN0tHaR9e5582G0LR6dp2LHJcrp2swTpIOE0DOSilovbYdA8u2RDhuORB4ZSIRY7vE2zPi+fyHmK X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1421; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520003)(3002001); SRVR:CY1PR03MB1421; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB1421; X-Forefront-PRVS: 06036BD506 X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1421; 9:Y3RczGoWCybXMLeftjP8kjtbNBhcApCMNr3lbkeQKtsr7w14khWOZ8QRk8Cmwi4sn+vXH2D7cVaaCJcc1M8Ws1PNdSF6h8YnBVYYMG4FHoY5fGGvi76yjkIK6tREVe+R0ZrVbf0V8L+WsYC7XQ4db5K6dnR5pjXYwtAWn5j5ufFtSN+F70KxjfVzrZA8bfDN1fQbhJ/u2WgNXaNlbtG1y/phOAap7Mehm5aQKnbBdY4Iwc5hx7z2Avpmu8AEkWMYmQm8sqQ+HoG5p8rchITTZDlyTWm4AtjTHSsstVpRn/miRrCSJxwiX0kMvIesxPZ+TrSrkSkNAugHAQxZa9IwNgzAtPtZLSMMNF7cgMOjWci/smyDmcGdRgx5OTmeRejuDrBylHuEjFuUJ2dGeA/8Jb8yQKgHvrHRxkVMP/TiB79z/3933mRxF/k0z9mc/82TfipQXL256xX80B77m0lNp2OUrjzSWGQWqN0TRGNBU1qVnNeQ8JSeB31aGfq3xQ10FAJJSs7853jf7XcknYXDpgQ++XN86t8J03HMutaecM2PMYX2qWu1DuyQRp1qtAVDW6Y9Ak38la86lUDgHPhZ7mYXETM8vMM5CKN7sW76bVT9oM6t3E3CnKhUoDWpqGU7Vr5UuIC+zhP0tRDuCd6rSo6TrMNH4GRL4r35LPwoF8ZDal3hNYfswT9ozunthqGho6+BI0VnIclS5i6GXYel/w9Xa4DXn3xgUO0NS192eux37ewWSA/BX2fkYbYc7DsN7NreBARmvXyNth9FT3YjuItBcirzkBq7KPSkX7JqZ0blAlMLb2ZQ/K6lAopOHajLaND9dZA33XdfM16Bv1ExeHJ+pRqgFa4ZBn0CWYviIDXNKkNrX7sniIrK8krZwyddEULwP6UyPXHrlLuT5pQWHw== X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1421; 3:bRUGwxIBYN6hlKlZYxkpVnxnPIVzt6og0rWA/qv6z+Bw8LFiho2qI5dRjAfk9oMwTFZGtH1naVtFYEWTjy6RZqQWfzec99OuDOYvYT4RW7FiqXX/WurXUK1Le3gHWyghmpeAvSGvdo9XAmdvZwEX4A==; 10:6RfMVQBc1ShUUnAB8W1Jk1rcWn1j9Wetl48KsEqtAt0G5EZM0VVWMwmTsp41H/7RUI4ULYWp9vHPR5aB9Etg1bfHOVDoZ8YFt2HRBeE9TD8=; 6:SBE81FknGyxIzMa157vVsqiIQtUdamfBlFlE9ZRfIXzqcoQr99zOV3BIKAtHRF4q X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2015 08:48:26.8373 (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: CY1PR03MB1421 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150610_014856_259113_BD732D01 X-CRM114-Status: GOOD ( 11.11 ) X-Spam-Score: -1.1 (-) Cc: aisheng.dong@freescale.com, ulf.hansson@linaro.org, haibo.chen@freescale.com, chris@printf.net, shawn.guo@linaro.org, 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 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 watermater levle 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, watermater 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;