Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752632AbbHEKga (ORCPT ); Wed, 5 Aug 2015 06:36:30 -0400 Received: from mail-by2on0103.outbound.protection.outlook.com ([207.46.100.103]:12106 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752138AbbHEKgZ (ORCPT ); Wed, 5 Aug 2015 06:36:25 -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 v4 6/6] mmc: sdhci-esdhc-imx: set back the burst_length_enable bit to 1 Date: Wed, 5 Aug 2015 18:38:42 +0800 Message-ID: <1438771122-8601-7-git-send-email-haibo.chen@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438771122-8601-1-git-send-email-haibo.chen@freescale.com> References: <1438771122-8601-1-git-send-email-haibo.chen@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD001;1:aNS3nd7KgqUEcOaaNPT+aPynRryQlAqh2ydHFNDiZm2S/oKqte6LyNTCF4ZtIWN4LYk4i7uqicLZzIfrF3HYjn9acOvhGH9qQTMLv2SOdQa9qnu+O1dAc+4nsooVfRXMCFowpKZ8kVo3QaCN/1lEcM+DKqTIszxGT0UorSVLTImqNpTcSY1em8BAVBkyvEcfeyN3txehfHUOraZQF3kRcqM7eQXTWscY1M3aEsZ5mWBTWc16x4Lfdou9E8iYky1Mxn/3Rpu54/vIdlVi0AQt6qTwCVuoLftMgsaIRUND/pvJ4WGhU9lAIXDrYpMjbtUaczYtFRgH47pmDd3isPp9NA== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(5001960100002)(77156002)(2950100001)(85426001)(33646002)(48376002)(62966003)(229853001)(4001450100002)(106466001)(50226001)(189998001)(105606002)(6806004)(77096005)(19580405001)(92566002)(68736005)(104016003)(230783001)(4001540100001)(50466002)(36756003)(47776003)(64706001)(76176999)(86362001)(50986999)(46102003)(2201001)(5001770100001)(5001830100001)(5003940100001)(69596002)(5001860100001)(19580395003)(87936001)(97736004)(81156007)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB1312;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1312;2:Nah3nYZSJSijs1vZkhlf+mJ5zUuuXxfvTrCwVsMbzwQSnv8SBqY2nCOCFuTZMpzfrqpEAAZ62xWSgPO6chOu3TlVEr3FdVd+MsVnd44TukjTaaAXh/9lrO4mQs19qCkH22HvDO0maxweGF7jaeJT77aAKdZlV3dvJtLbW4aABLk=;3:NfLtlhPFlQ5EgWzWtw4fNrZSCA7zQa/1V+CXWcyhjUt0k2/Z9rIj528VzCgXrhI4o4lnqQ3SjWJZlfXEtB2RH6nygieR4DxXGYT2LT5umAmFDKN7qWHt8S3kZ8bG4Lks8awrRfbiVQo69u189HiCU/+KXlLGcq/QPA3tAwOmfC5TB5ssyBHB86lcGhdq6JdTmV3HZEU99H3zvmSy6W9FSxvxpQe1oySQYQwmKj3hCzE=;25:hGY6/hdM/DMxHh14GOR79c//4z++sgWG81HADs4SYBzWBu5AeB+WQo2DtBXQONdPYtMgeH785YkpS81diDrPvyJPmoac27cwRS/K7yJYYGCaBh1FLSv5Md5+SdKu5PUfBEmVwWd4GpIJqLGRRLTCZ0nWc9wQbqTOVdVnOLFUWo1ebXWBuaiN1FEomm8uexKLXVremYWx9o8H4GL/vIX+Xumx1cJgNJR94bw7OU0cJq778xAb4hbx/xIvI8/oocbTTWks16WozBCwgaj9LfjhiA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1312; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1312;20:z5kHTpptSlUKKyfMziPonayZ5Isdigc8mVJCBd1oQhB+4E/jnn5vPi2HyacY9nsUxsdvHFq/asxYWT+FTg1a1yWaBzlADGHgAAU7NWF8UAKn34H03mhyc4lxv0VRnfihHTElGXhhZ/yhVYQnMa1NN4slrMOWDkK7Bq81Z07G6yDQUPbwOfFhuqEuikT8LNxy5yfIdN6j1NwLdJO7H1vDWW6WVN89duXizX19gH9Pe9bYNxxbEFNYQ763KB4XHx6IxC3krjL722PVvPzvBKJDgwd/gFopCUyp98lWEvwZ74OT2/UsMFaW4IldRamHTbIffRdZNfGs6qxAKiDlaQWbnvUd3yTXneA8Llxu8Z4DmKg=;4:V4LeBh8qstltGuLKmjgkIB2Yni3SKVdYyXB63K9ojRXj/I67KNO/nqjMy4rUSlUJUDiLM3xrL4GrQZkyo3JcQiDnFqyA0NVFsA4nSUr/S9jfiYZ79eRyNKKa+Ir8ADscoaNwEZdPnrpa9/vrxW9ycd69t6peVL5bPeWOSxx7Fz95+ABCFMb2GXh88llsLvOlRElJU4hWYNbg4w45O8DmvjipgJUdhbAKlrjOeMxph+mTAT1AAYiGAEFNygKiTN8MCjWXqu3GBH3YsxEHPHBdU5ckZJ8JvpS+i+ZUyjA03KM= 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:DM2PR0301MB1312;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1312; X-Forefront-PRVS: 06592CCE58 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB1312;23:T+FDvikJt+ytaWjTTWyhOBpKjW9leirMhvokEvM?= =?us-ascii?Q?c0p+D3dY3Nzp3IFHMAru3SBJW/5vmZCmVL0EJTlGfcEqNMIS5kV58fN1w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rrHxZNywWALaZ8gzZ6+qaT97J825scmCj9mztxYmkVHHsh?= =?us-ascii?Q?SuQfqg2//SvmxxuWMBketqnE09Kzh7gih2ieN6qdIpM2JGM0mOXI6HtGl18Q?= =?us-ascii?Q?wlE1vuL4hbn+06UenSwDTxcp/e9FpNrAw4IcWm+oy+v6IaZ4+ir7pEJP/ubd?= =?us-ascii?Q?0CXkAXgCKSjQNdbCjXIMYQ/SETXelW7/BXpWQCNl51pFBRpkGuADzMLAXnVZ?= =?us-ascii?Q?hWZe0GAh0eqPFs5rWhXUrO0AXfoCzoQFxkCP7?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1312;5:Hmbh2mXCqoEU+SyApBhDCCmKAxJbKoPtCuvZyDK/d88096j9HVfWElNBXGkEiPVKxIcPP45KSgSG2hHK2u+y/jJzz6J+OgsqZxfxuOMmpo+MX/ojiu6HbrcBc1NE2Q/afX4fwaF9jXuWJ+eUnT8mtg==;24:9/jCm6yqZJc8xCp/bRiXUUEQnHd1IDVBUFQHJ4X4Af+gnH8jWMv3bkFRNOJsr8X/RpM3P832k9PwtU0BzMuUhkrJT4NKcZv2OzDf2BKv2zs=;20:c+NbTvrC0sMkEL+FWTLWkK+aluFUW49IOOZs2DREscSAXBgxcHRQPNSF5VlBtCUYXdC62G3++mHilsgA9wj8Tw== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2015 10:36:22.3901 (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: DM2PR0301MB1312 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 97aa944..3334762 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/