From patchwork Mon Aug 10 08:18:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haibo Chen X-Patchwork-Id: 6980681 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 092349F39D for ; Mon, 10 Aug 2015 08:19:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1F20820610 for ; Mon, 10 Aug 2015 08:19:10 +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 4A8622060F for ; Mon, 10 Aug 2015 08:19:09 +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 1ZOiGm-0007rh-LD; Mon, 10 Aug 2015 08:17:20 +0000 Received: from mail-bl2on0148.outbound.protection.outlook.com ([65.55.169.148] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZOiGB-0007NK-I3 for linux-arm-kernel@lists.infradead.org; Mon, 10 Aug 2015 08:16:45 +0000 Received: from CH1PR03CA008.namprd03.prod.outlook.com (10.255.156.153) by BLUPR03MB1380.namprd03.prod.outlook.com (10.163.81.139) with Microsoft SMTP Server (TLS) id 15.1.225.19; Mon, 10 Aug 2015 08:16:21 +0000 Received: from BN1AFFO11FD010.protection.gbl (10.255.156.132) by CH1PR03CA008.outlook.office365.com (10.255.156.153) with Microsoft SMTP Server (TLS) id 15.1.225.19 via Frontend Transport; Mon, 10 Aug 2015 08:16:20 +0000 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; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD010.mail.protection.outlook.com (10.58.52.70) with Microsoft SMTP Server (TLS) id 15.1.243.9 via Frontend Transport; Mon, 10 Aug 2015 08:16:20 +0000 Received: from b51421-server.ap.freescale.net (b51421-server.ap.freescale.net [10.193.102.57]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t7A8FmJm017011; Mon, 10 Aug 2015 01:16:15 -0700 From: Haibo Chen To: , , , , , , , , , Subject: [PATCH v5 5/6] mmc: sdhci-esdhc-imx: set back the burst_length_enable bit to 1 Date: Mon, 10 Aug 2015 16:18:07 +0800 Message-ID: <1439194688-18335-6-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; BN1AFFO11FD010; 1:8hncnG8edSgbqSy5FQkEOk32UzUiNt3ZJPPGaYuqgkPVoO7LJSUPdigwoliOIpBGyf/PjqRfMjDrXh8JVOFkN/IS4ph2C4ve4PgysUn0o9POhGhQSTO1gkCHCs9B/2B4/wxTWqas0VJj4enrdggIsP6ADoY2EHLUOsVGUdQXmBLqInuNZZfVl7L+v0NOYZ9zXh4utc+/2rQgdDoZcj790eJH5I2v9s+cvPQjJ56WP+mTAFi4IBKiBAS3CNov1LDyeURzJVwV6luBp00/Tv9f/AjZ9FsPxyj28ceZfWf8OQH24cGU/S+Z3l/AJRRXfhR8GfWCX4jkeU7X4vuSLNxsAw== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(199003)(189002)(85426001)(33646002)(189998001)(36756003)(50226001)(5001830100001)(230783001)(48376002)(50466002)(46102003)(64706001)(229853001)(104016003)(5003940100001)(47776003)(4001540100001)(87936001)(19580405001)(2201001)(92566002)(81156007)(106466001)(62966003)(4001450100002)(77156002)(2950100001)(97736004)(76176999)(68736005)(19580395003)(105606002)(69596002)(5001770100001)(77096005)(50986999)(86362001)(5001860100001)(6806004)(5001960100002)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB1380; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1380; 2:gfuOQ7MezDbr47CLi89aICzUa77RCRvKWUWnSRqUz1pLqXmj85CSELSUkAKk0JQQfmh5imgmiOG4OtOyFK5tBGQaBkkwcJJMDTPasZ7vNA/yb/cuPqWwPwBcgBPpiYW+8cZQLmJ+7yjyHUtJVaVQmQTcJM5EcGWykXEOsqp3O7w=; 3:Sm5tjLKjXgmYGAaooqnozAluC2ZelCzVRIo+g5qioHgjbcqAG/NN2hDJY+CN684TNSCGNbubx5iMqkGSSarXNLBqewqDAkuG9F5UkgL9kpD9J+5Szy0RRUN+FlsylpKg5f6XBC2YcxkJDXjEiz44HBlGI6cN1uy/F8+DZnPOEF0v88CFGjqbqM9E+1BKYKboUmzza+lzj8IZsEweOa9jN02mJlCTwyq0UUTt2eyFn7k=; 25:cy04o8pC1/cK7SridyiZVfKsqPexekr0SIk5HEa1SPpEpAphU2R6pjSkyl13PHKWL3ZgzDrK++GG4ih1SU8k25u+KvC74YdWCTH5sXV0wbQ5uOIW+2g8kvvV835+4GiEGMl6h/qEXZyp5lrf7bx/gYr33OOgfthPurL7Cr8fd8FQ2nwGH43w+Cu2DCBf0QAjGanNmQCG8vaLa5JI6N+qM3BCrzLJhlqUFB9gFYbDSBNswP1VHSFd5l/ZWD6dqs6WnCLFFmiIJJ0RR5YbN+/QXg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1380; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1380; 20:/kF9sMQDKwDWPgzt8V9K4I23c5zbc8f/ERIWnGVNPyDO9uFiRqye26PGj4LcqmDCehT3UIuftaaQOqO7pLwwwErTizNA6Ng5itrIvQS4H2sx7TP7VBNiH2p8QO8M4/MXRT/bGII8+nrffhfq5u3IFnk1PQuyzrtUnKnKihGvbKMiKWyjOYZW0cmM65FawAu2rWsbpF1qvlQIuh7MPlpjXYOqyIJN+WFl191RUacSmhikMX0vIHPsI/4Xq6CNpuKQLBlBL1qBVATaJDQOJ4mw1BX72ISRvVOLxia10q7YE0Jb96aEWfW9T3aKZbt8Zgi/lAVxWA7hHuCNRMc+QwcNynWraHBdQJwCJyejl5Ja6KU=; 4:cml3pIPDoynnk7hy4padQci63mx3qDIuH44wRqLmNnacJnBvM/ewoJ5Q49jjKhFH6VhvfhtyZCQ7fLTah6UDfgfA15v2fAOa5BOeMsHsHiz1G4D0vDoW+2z57CYdP4R6HP5znubdDgS6LkkEsBk6xJDLa9vRPgW5asBsN/iNn4i/HsEqxAu+xAjBBXwPkLjug5vlelXapF0GoWqz3Udi5rrnJ43ZmgBwiHQwGG7qX9aek2Bd+hnHUBuaUh5DNYLtaijFtPJf+xgR//yMP1T+r9s2a1P43aLjQKbmx/HNS10= 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:BLUPR03MB1380; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1380; X-Forefront-PRVS: 06640999CA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB1380; 23:L3TCuvUN0rLA0YQ9Mo29Ty+Bo6cJyyntovdFPgmyk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ygdHxEhUAEP9hWR7TRJY?= =?us-ascii?Q?h9kSpGxlSokOeZiFh9AK6V2NsYl1SerISHOqSmsL/T5klJ+FKIs3VfTbexyW?= =?us-ascii?Q?6DkObMVr1YR/KFb58/Qf8VrTRi2l93ak/EViLlu9M40cSdhYeUdKVWeYZRfX?= =?us-ascii?Q?LQVcoaQ7JqS1s+h6yy0bd+QSwjzIqVHEKfKnv+JVmRvz/q4tkA7rRmpXk5xf?= =?us-ascii?Q?gEPhD6KWM9CD+xZhVrSc7xev+X/sV6YqRKA9DwSywLE3rw5dlC2LFdaKN8fr?= =?us-ascii?Q?CZeTlRZUMzUdseysvv9Evx4B1WOoJx3G7dr?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1380; 5:7AAe4b7dIX1zhZcqnqQuyqqxW8r9yWxo+VOZrHf92n6Hfnpt+cLGBA3aa5gGvsO5wmkgEBaHuU91tQogaPHtwAwFVVbadbw/e7MfHws1XQ4s1sN7ettVUa2MNwRsRyY8eWOr8JXhTW1hl6D3kBZ1QQ==; 24:p/nwIRXgkd6xfB8x1u493GfVW4c6t3iVpQSZmH7Oz4vQgxPxgyvShtmvfAp/eph4FClG4UtpGUyWfCu6R9xNPmPs0ekwMwH1bCP32hchRT4=; 20:w29TUh3xEewBwTxHzh6uZsUdrAu0CTUSoZQs6kLQ5PMoF192iTqnQq3ZP1HtTO2+5tVETRI9jGyNxLM6UK65MQ== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2015 08:16:20.4222 (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: BLUPR03MB1380 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150810_011644_060166_770C082D X-CRM114-Status: GOOD ( 15.24 ) 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, mkl@pengutronix.de, johan.derycke@barco.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=-4.2 required=5.0 tests=BAD_ENC_HEADER,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 Currently we find that if a usdhc is choosed to boot system, then ROM code will set the burst length enable bit of this usdhc as 0. This will make performance drop a lot if this usdhc's burst length is configed. So this patch set back the burst_length_enable bit as 1, which is the default value, and means burst length is enabled for INCR. Signed-off-by: Haibo Chen --- drivers/mmc/host/sdhci-esdhc-imx.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 03c9f33..d7ec993 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -32,6 +32,7 @@ #include "sdhci-esdhc.h" #define ESDHC_CTRL_D3CD 0x08 +#define ESDHC_BURST_LEN_EN_INCR (1 << 27) /* VENDOR SPEC register */ #define ESDHC_VENDOR_SPEC 0xc0 #define ESDHC_VENDOR_SPEC_SDIO_QUIRK (1 << 1) @@ -1165,6 +1166,21 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN; host->mmc->caps |= MMC_CAP_1_8V_DDR; + /* + * ROM code will change the bit burst_length_enable setting + * to zero if this usdhc is choosed to boot system. Change + * it back here, otherwise it will impact the performance a + * lot. This bit is used to enable/disable the burst length + * for the external AHB2AXI bridge, it's usefully especially + * for INCR transfer because without burst length indicator, + * the AHB2AXI bridge does not know the burst length in + * advance. And without burst length indicator, AHB INCR + * transfer can only be converted to singles on the AXI side. + */ + writel(readl(host->ioaddr + SDHCI_HOST_CONTROL) + | ESDHC_BURST_LEN_EN_INCR, + host->ioaddr + SDHCI_HOST_CONTROL); + if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200)) host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;