From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753399AbcEZIjM (ORCPT ); Thu, 26 May 2016 04:39:12 -0400 Received: from mail-am1on0068.outbound.protection.outlook.com ([157.56.112.68]:38448 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753191AbcEZIjI convert rfc822-to-8bit (ORCPT ); Thu, 26 May 2016 04:39:08 -0400 From: Meng Yi To: Mark Brown CC: "dri-devel@lists.freedesktop.org" , "David Airlie" , Stefan Agner , "airlied@redhat.com" , "linux-kernel@vger.kernel.org" Subject: RE: fsl-dcu not works on latest "drm-next" Thread-Topic: fsl-dcu not works on latest "drm-next" Thread-Index: AdGlFm3AneZxjhLuSCG3KXnHNBlzPgREwk9wAA88lAAAAHr0gAACZoGAACHbymA= Date: Thu, 26 May 2016 08:23:42 +0000 Message-ID: References: <20160525091834.GQ8206@sirena.org.uk> <20160525104103.GV8206@sirena.org.uk> In-Reply-To: <20160525104103.GV8206@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: [192.158.241.86] x-ms-office365-filtering-correlation-id: 29a7f219-b8d6-4941-59b0-08d3853f0c89 x-microsoft-exchange-diagnostics: 1;HE1PR04MB1052;5:ey4Sh8RpPdm/0sFCl1iaCguZFBm1K8RHZQ3WNrERPpp73iAQWe4yz4nsotoaSWlb6IP2YUOtfvtavU44djYSpb+O+5nTaETLipunIANE+Eiqm3MHN2w7DCPZW+90x4fi0awzR5rBd2CG7+zSleu/kQ==;24:Ug6Nkl1hhXWVZaReAceI3p0d4SBeo/zQ7PTb022iSrIe1rcTMSjBLseeauLVxbCrGPzr+EzHubMR8Cg6FWNiU8tEp8OM40gx9NCauvv/QxQ=;7:z92G51qKo4EIn4DCzndgl5I0CBgCeh/0rkolksKvOsizqtCXghFdKckpnUXZ2o5cYPYNNiK8G862QLZDN5DkjrpFDYRXRSDsWfUGWlNqP54O7qVA0k+e2x+/rDfsW9Nc9wxrpEZF4mmwOerzmVbJNrwrDCoQPkDtT1kKdUDWo0vZ/AgS9oUS73EKhtLbQLZc x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR04MB1052; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026);SRVR:HE1PR04MB1052;BCL:0;PCL:0;RULEID:;SRVR:HE1PR04MB1052; x-forefront-prvs: 0954EE4910 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(4326007)(3280700002)(19580405001)(6116002)(3660700001)(92566002)(86362001)(122556002)(2906002)(77096005)(2950100001)(586003)(102836003)(5002640100001)(1220700001)(74316001)(3846002)(2900100001)(110136002)(5008740100001)(10400500002)(8676002)(189998001)(76576001)(50986999)(76176999)(11100500001)(81166006)(54356999)(8936002)(93886004)(66066001)(5004730100002)(9686002)(87936001)(33656002)(5003600100002);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR04MB1052;H:HE1PR04MB1051.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2016 08:23:42.5541 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB1052 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, > You've not specifically described the problem here - what are the endiannesses > of both the CPU and the device you're talking to? What specifically is the > endianess problem you are seeing, what are you seeing and what do you > expect to see? > The CPU is little endian and the device DCU is big endian, specified big-endian in DTS, And here is my DTS and regmap_config, Specified "big-endian" in DTS, dcu: dcu@2ce0000 { compatible = "fsl,ls1021a-dcu"; reg = <0x0 0x2ce0000 0x0 0x10000>; interrupts = ; clocks = <&platform_clk 0>; clock-names = "dcu"; big-endian; status = "disabled"; }; I can't tell the difference of "reg_format_endian" and " val_format_endian ", so I had tried four conditions. And all failed. static const struct regmap_config fsl_dcu_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, .cache_type = REGCACHE_RBTREE, // .reg_format_endian = REGMAP_ENDIAN_BIG, // .val_format_endian = REGMAP_ENDIAN_BIG, .volatile_reg = fsl_dcu_drm_is_volatile_reg, }; I expect that regmap write as big endian, and I am seeing is regmap write as little endian. Thanks, Best Regards, Meng Yi