Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932249AbbHJIQc (ORCPT ); Mon, 10 Aug 2015 04:16:32 -0400 Received: from mail-bl2on0117.outbound.protection.outlook.com ([65.55.169.117]:41568 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754290AbbHJIQX (ORCPT ); Mon, 10 Aug 2015 04:16:23 -0400 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; From: Haibo Chen To: , , , , , , , , , CC: , , , , , , , 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 Content-Type: text/plain 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?= =?us-ascii?Q?k/bFGvyxHKFXdZWnRJUcr4LBi9PjoXlivhZ5emYznkoOLGLdBTf1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OqSmsL/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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2164 Lines: 54 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; -- 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/