Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752506AbcDSDEd (ORCPT ); Mon, 18 Apr 2016 23:04:33 -0400 Received: from mail-db3on0093.outbound.protection.outlook.com ([157.55.234.93]:31904 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752130AbcDSDEb (ORCPT ); Mon, 18 Apr 2016 23:04:31 -0400 X-Greylist: delayed 2018 seconds by postgrey-1.27 at vger.kernel.org; Mon, 18 Apr 2016 23:04:31 EDT From: Po Liu To: Mark Brown , Scott Wood CC: "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Yao Yuan Subject: RE: [PATCH] dspi: config dspi master regmap with right mode depend on BE or LE Thread-Topic: [PATCH] dspi: config dspi master regmap with right mode depend on BE or LE Thread-Index: AQHRlXVj4SR4p/hUykKzGp2joAqiCJ+Pil+AgAERYnA= Date: Tue, 19 Apr 2016 02:30:50 +0000 Message-ID: References: <1460545402-8162-1-git-send-email-po.liu@nxp.com> <20160418101117.GP3217@sirena.org.uk> In-Reply-To: <20160418101117.GP3217@sirena.org.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; x-originating-ip: [199.59.225.131] x-ms-office365-filtering-correlation-id: 0e68b2a9-04a5-4c22-4a5a-08d367fa9f8d x-microsoft-exchange-diagnostics: 1;VI1PR0401MB1933;5:kLmfMKGfYYxwnuUCAEQKVCBqcCAUvwPytpNUSNaJAb3njTXoVzESBtjAqmxO0+MetBPfGcisXmGg6wWvMyc3k722/cyVqGAMrgM79Syms92tPVmTelXp5BMCYadTCb+j5rxKOBngU5BCrY6X+q8RLIy7EsPoLhRezYyAtsT+1InkVsm87bUEDww0/s+6XjU+;24:WsGk7WvF8GRPYCvhDLcL+yjbIxpdG40OX6kG/79Ict8meMYmLA5JEn63fYwFG8dIFtERq2UirmivVsl1nsvsWplP1k3uNlAnC19IY5KzY9U=;7:wm5mUCqX8lDtmcilutoFGK7A1WdC7G9xPdwv6JtvWlOeXmDNd4wGe+2uuiOZoU8amuJlLpA5aowWHYiOaBpresjo+1P+5r795O9ht3Lir5pdETjqsA0WUp1fO/JkiSdmU84NfM0dPub3EzRwS1T6onp/b59lZlvZG3Tzgh1Muui2zNl21QDuz+jut6S9zd6JEqQFoiWF5C7tqtMkRvyzMxUNPidkqYem9dtcuK5X4sU= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0401MB1933; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(9101521026)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026);SRVR:VI1PR0401MB1933;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0401MB1933; x-forefront-prvs: 0917DFAC67 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(24454002)(377454003)(13464003)(45984002)(76576001)(4326007)(5004730100002)(3280700002)(92566002)(1220700001)(1096002)(106116001)(3660700001)(86362001)(122556002)(87936001)(33656002)(74316001)(2906002)(189998001)(66066001)(586003)(3846002)(102836003)(77096005)(10400500002)(5001770100001)(5008740100001)(81166005)(76176999)(19580405001)(50986999)(9686002)(2950100001)(5002640100001)(19580395003)(5003600100002)(54356999)(6116002)(2900100001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0401MB1933;H:VI1PR0401MB1709.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2016 02:30:50.4131 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB1933 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 base64 to 8bit by mail.home.local id u3J34d9v024161 Content-Length: 1479 Lines: 35 Hi Mark and Scott, Thank you very much both! The default dspi in the .dtsi setting to be Big endian as default. But it will hang at cpu setting big endian mode. After setting _format_endian = REGMAP_ENDIAN_LITTLE will fix it only in big endian mode. We'll check it more about the val_format_endian_default. Best regards, Liu Po Best regards, Liu Po EXT:8038 -----Original Message----- From: Mark Brown [mailto:broonie@kernel.org] Sent: Monday, April 18, 2016 6:11 PM To: Scott Wood Cc: Po Liu; linux-spi@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH] dspi: config dspi master regmap with right mode depend on BE or LE On Sun, Apr 17, 2016 at 02:41:40AM +0000, Scott Wood wrote: > Looking more closely, the binding has a big-endian property. It says > the default if that property is absent is native endian, which is > insane. Fix the binding to say that little endian is the default > (this change shouldn't break any existing trees), and make sure that's > what the code implements. I think you need val_format_endian_default, > not val_format_endian. The binding defaults to little endian and (in implmentation terms) always has done though that used to be unintentional. There *are* a reasonable number of devices out there which are native endian, for example most of the MIPS chips switch the endianness of the entire chip rather than just the CPU, but most of the current usage has been on ARM devices which only switch the core.