Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756057AbcKBUDQ (ORCPT ); Wed, 2 Nov 2016 16:03:16 -0400 Received: from mail-db5eur01on0087.outbound.protection.outlook.com ([104.47.2.87]:10624 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753009AbcKBUDO (ORCPT ); Wed, 2 Nov 2016 16:03:14 -0400 X-Greylist: delayed 14498 seconds by postgrey-1.27 at vger.kernel.org; Wed, 02 Nov 2016 16:03:13 EDT From: Bough Chen To: "Leonardo G. Veiga" , "ulf.hansson@linaro.org" , "A.S. Dong" CC: "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stefan@agner.ch" , "raul.munoz@toradex.com" , "leonardo.veiga@toradex.com" Subject: RE: [PATCH] sdhci-esdhc-imx: fix bus-width for 1-bit operation. Thread-Topic: [PATCH] sdhci-esdhc-imx: fix bus-width for 1-bit operation. Thread-Index: AQHSNFl5m+pZvjYKKEOY1ktSwSAoQ6DFGesg Date: Wed, 2 Nov 2016 04:27:36 +0000 Message-ID: References: <1478015905-31262-1-git-send-email-leogveiga@gmail.com> In-Reply-To: <1478015905-31262-1-git-send-email-leogveiga@gmail.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=haibo.chen@nxp.com; x-originating-ip: [199.59.231.64] x-ms-office365-filtering-correlation-id: 26ab7b86-9653-486f-bfa1-08d402d89311 x-microsoft-exchange-diagnostics: 1;AM3PR04MB1427;7:viee9w+O0reH1fJNmrBln3NBN9GJrrosbfWuQxo1FejUJh6QFsTnUcvHDRt91HQGm1oVUj7E4iFhPO5suH+OZpHFsDT8ZNAqossw4zegBRp1YrPai3xL8wMhLno6amrtaDKauELAv/kHjQfT0wN7pIgkz9YRpaQi2Db7VeP62QEUlfdabMLOO7kWtgPorjvsfoA4feKySEkQwShJSwg3ZbtAI1SGKJH8ZqvUcCjdSN3n6YdtFfXKCntOHOxiFhO1SHxjjsaIIC2xSaPmaCrMClsTYHq6RGpARO0p463XYOeyg4jXoxgXGN6Npmwp5uPqkTNPz/fSx5vlPeDnDX8BTq9D6o/aroK18R7TL7Yt/8k= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM3PR04MB1427; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(6045074)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6046074)(6072074);SRVR:AM3PR04MB1427;BCL:0;PCL:0;RULEID:;SRVR:AM3PR04MB1427; x-forefront-prvs: 0114FF88F6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(377454003)(13464003)(199003)(189002)(2950100002)(305945005)(5002640100001)(101416001)(6116002)(7846002)(5001770100001)(7736002)(50986999)(97736004)(54356999)(76176999)(6636002)(5660300001)(9686002)(3280700002)(76576001)(19580395003)(4326007)(19580405001)(2501003)(2906002)(68736007)(2900100001)(7696004)(81166006)(81156014)(66066001)(106116001)(92566002)(189998001)(102836003)(87936001)(106356001)(3660700001)(105586002)(33656002)(8676002)(77096005)(230783001)(3846002)(10400500002)(15975445007)(8936002)(122556002)(74316002)(86362001)(586003)(11100500001)(422495003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR04MB1427;H:AM4PR0401MB2324.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2016 04:27:36.8116 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR04MB1427 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uA2K4UCO010933 Content-Length: 2247 Lines: 61 +Aisheng. Best Regards Haibo Chen > -----Original Message----- > From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc- > owner@vger.kernel.org] On Behalf Of Leonardo G. Veiga > Sent: Tuesday, November 01, 2016 11:58 PM > To: ulf.hansson@linaro.org > Cc: linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org; > stefan@agner.ch; raul.munoz@toradex.com; leonardo.veiga@toradex.com > Subject: [PATCH] sdhci-esdhc-imx: fix bus-width for 1-bit operation. > > From: Leonardo Graboski Veiga > > The 1-bit operation mode, enabled by seeting the 'bus-width' property of the > device tree 'esdhc' node to <1>, not work while using SD card. > > The behavior is only noticed when only the data pin 0 is connected to the > hardware. A series of kernel errors are printed to the console, all of them > returning the following error message followed by some explanation: > mmcblk0: error -84 transferring data > > If four data lines are connected, it ignores the device-tree property and works > in 4-bit mode of operation without errors. The hardware used for testing does > not support 8-bit mode. > > Check the 'bus-width' property and if set to <1>, enable the > SDHCI_QUIRK_FORCE_1_BIT_DATA quirk. > > Signed-off-by: Leonardo Graboski Veiga > --- > drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci- > esdhc-imx.c > index c9fbc4c3..88d7d22 100644 > --- a/drivers/mmc/host/sdhci-esdhc-imx.c > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c > @@ -1003,6 +1003,10 @@ sdhci_esdhc_imx_probe_dt(struct platform_device > *pdev, > host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; > } > > + if (!of_property_read_u32(np, "bus-width", &boarddata- > >max_bus_width) > + && boarddata->max_bus_width == 1) > + host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA; > + > /* call to generic mmc_of_parse to support additional capabilities */ > ret = mmc_of_parse(host->mmc); > if (ret) > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the > body of a message to majordomo@vger.kernel.org More majordomo info at > http://vger.kernel.org/majordomo-info.html