Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753305AbbGaPAe (ORCPT ); Fri, 31 Jul 2015 11:00:34 -0400 Received: from mail-by2on0135.outbound.protection.outlook.com ([207.46.100.135]:39183 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751140AbbGaPAc (ORCPT ); Fri, 31 Jul 2015 11:00:32 -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; Date: Fri, 31 Jul 2015 22:51:41 +0800 From: Dong Aisheng To: Haibo Chen CC: , , , , , , , , , , , , , , , Subject: Re: [PATCH v3 5/6] mmc: sdhci-esdhc-imx: config watermark level and burst length Message-ID: <20150731145140.GE27806@shlinux1.ap.freescale.net> References: <1438160637-28061-1-git-send-email-haibo.chen@freescale.com> <1438160637-28061-6-git-send-email-haibo.chen@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1438160637-28061-6-git-send-email-haibo.chen@freescale.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD015;1:VDSPcmFVJ66LIgIw4kH6kKD/FI1GSjbk9L8Kj7ehqJJBl055g/IEZ66paQAi0BGxYrKGmJeBqiCIwGs8zuVYwUwnIMoWriOAGkTfeUfKN7ni/vAvAYlyZgmKFvM3rIk0Assei/COM6uA29MbyfSTKzUwmzD2/RkFQ/H3GRy8kkxRNyWdLSWrqCcSsnXDbttWGOHanClSiPLbgDXYhUx2Cq3xP5DYskbXTpxytLF7+qRF7eEcddFZDMIBsweXz9QDIAsk2hxHmjOaWqINqkCXZ1G/yuxF5UvA18GONKXKQeILuOwDTnm8qXpHZe3Vtf0/XAtSjeewxbCckPt5sTvWeg== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(24454002)(199003)(189002)(46406003)(230783001)(189998001)(6806004)(76176999)(33656002)(5001960100002)(4001450100002)(62966003)(77096005)(46102003)(4001350100001)(77156002)(19580395003)(83506001)(106466001)(110136002)(54356999)(92566002)(47776003)(50986999)(104016003)(86362001)(2950100001)(5003600100002)(50466002)(87936001)(23726002)(85426001)(19580405001)(105606002)(97756001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR03MB1392;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB1392;2:Vs5k9gpc+OKJh2cRKGj8o8pZOr1XlyYLIVKVbBEzahzhU8C2WgaQaf5PE2mbuvHtp/7jIW06q7hEjW+vuuUaWixGvNf4MwSTqCX+4PAEl4iPqWeXGe2j+IvphH74ojFw9fPXkurK5QHS3TmI8yA26+n109TGteqHF/r9EcgEnd8=;3:O8HYqoBPkuHafFaUorCudYUpvVK84+46nIYK+GuZaSu6xR8xqrC44I074lVLfaBbgpdDzXr3uZ07gAvyQKnUB7/Q5u72n0zqZKcoPn66aVE3NUnJQ2zXGJWc9HtZ/waGsRDanAN1gi/04kwD/9qdRvBYGM9JymQFa4eesXSqqGQIP/O9e7KwC1DEJXTCMeLusDkdViteuCs3pK1k1G9GzibLc5/2ymFy55vYaaIUWlI=;25:o/YXo7bnK1xI6jBr7GNlhLU9EaXNPNUA2/fq/MgqM/OAfnfQ8FUFseI0us0C+HwC9AjeluLdIb/TypLSilqeD4QdBhbrrIeZm3w5g/OCtorMZ7gugPZW0bUMnHI//P4fuhMYmvx5sNraiRAs2Eae55oW+FE772sp2oKse0TlCKfdiBZOUlQ7j8C3EeWiYxEjVljvgyjWJUX8pU+nB3y25bCmVy7GMl4AcNQ4jZYN3M5my34kejXZA9MKflVMpqH+SI6IRNC2TlekcRI9qqLi0w== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1392; X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB1392;20:GMKdwNpefjdIldq6uKQgkaoorohHQdyggYrExEpp+KWawjf9PVN60juv6J+k+UrZ2FYAw1mJ6jG02ZzhwAVthptIE6DTFNvhpmC/NKZ4aZoOAQiPwvOv1SCs2F6iTJlVXHEIb1tvn3XRg6xPBTCshdNNcCvBz+oL118tR1J5IijwUY7uRUWWHKcUPR9UJUqupeKv9YZwLrdKYNk9clXwD5V1yP9tqupnBbN4Vqv4gl2wWW9YzM+hlenUBD2L1QRLZHwU3q4B3iZdszj/bYl/Rw+vdThKsAP79qmMhkPRo7lTbsXNXqBDQQexGfUav+ojqJKRmCX3wBsWztxr2U/vImOcXYdmGHwTivhprSF0/ic=;4:mOOFrxUmuDwjEr1+j6ZkyMPPWeMlA4rDy1GnJkagWQd0NsTJ5PtIUj9tVyZ9puM0nks8DfPvpx3x/b/JPtG+W8jXOL0409PtKt55x3b8dFAsS1K1dJA0BgXO1NrxLUVFz/qttK3y9GKo6PsxnfZLnMy5VfSJNbFJbZ2LxrxXc0wTvkaHSe8ryOhFUWBgY8LMsZKXXtqbPIQ0ulAqhG61C/dH+Nt/EvswQD5mt5pn1gBMx6KpV207mga2eYuyWC5WL99rzp9Jh6yN/1DZy4cDiQ3B0/x7+1t6Q7HbU4vS8ls= CY1PR03MB1392: 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:CY1PR03MB1392;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1392; X-Forefront-PRVS: 0654257CF5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR03MB1392;23:ly9Q0BdPRPfcztB5mfjyzdnJjRfX70B0ZSCAlAe6M?= =?us-ascii?Q?bP+lIjNBhH0xAKu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ElAY7jHNlhOwvhJr?= =?us-ascii?Q?Kzczg9H6A7dYERSumxmAbnXiMyYIN8wC7Hets77Jg4oR/sJ3/jEwE9tMTPy3?= =?us-ascii?Q?Qavn+xMAsDlKmluY0w0GeUk?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB1392;5:6/erBc5dPRefr8QIupUsbTJno3Pqr453ZwEVtiDj2HAy+K2EXl689e4N4loUAbXSWunnNl5Yd8m+lsHJdW9GN/rFUzOfHFmB33GE6p8e1zZ2bWIGaAf2nlbGVQTFkvFYuEvk7bDci7odtkzimXnZ9Q==;24:xTj5mg5m+YFEnsp5rFPYY/N9ySCXKrKYa+/bwGfDptNiMdbM0qQcIPIfjpL9y14e583HtJHBcW8fHDpoW/DgOP90zQvMHJxvx2u2MelCOCY=;20:nMbbTV1nbDhgQCM7r7tla3HiRE2QxQHZqBBaw8ue1FYEjvCczzZ2UN8LE41rs9JBo2LPEb33NZjA75fP7BJdMg== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2015 15:00:26.6934 (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: CY1PR03MB1392 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2402 Lines: 64 On Wed, Jul 29, 2015 at 05:03:56PM +0800, Haibo Chen wrote: > 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; > +} Can we using flag to check instead of adding more is_imx_usdhc()? > + > 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; > Regards Dong Aisheng > -- > 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/