From patchwork Fri May 9 02:04:32 2014
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Xiubo Li
X-Patchwork-Id: 347290
Return-Path:
X-Original-To: incoming-dt@patchwork.ozlabs.org
Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by ozlabs.org (Postfix) with ESMTP id BB8871400B7
for ;
Fri, 9 May 2014 12:51:22 +1000 (EST)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1756128AbaEICuj (ORCPT
);
Thu, 8 May 2014 22:50:39 -0400
Received: from mail-bn1blp0190.outbound.protection.outlook.com
([207.46.163.190]:43618
"EHLO na01-bn1-obe.outbound.protection.outlook.com"
rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP
id S1752577AbaEICuf (ORCPT );
Thu, 8 May 2014 22:50:35 -0400
Received: from BY2PR03CA054.namprd03.prod.outlook.com (10.141.249.27) by
BY2PR03MB506.namprd03.prod.outlook.com (10.141.143.18) with Microsoft
SMTP Server (TLS) id 15.0.934.12; Fri, 9 May 2014 02:50:32 +0000
Received: from BN1AFFO11FD012.protection.gbl (2a01:111:f400:7c10::194) by
BY2PR03CA054.outlook.office365.com (2a01:111:e400:2c5d::27) with
Microsoft SMTP Server (TLS) id 15.0.939.12 via Frontend Transport;
Fri, 9 May 2014 02:50:31 +0000
Received: from az84smr01.freescale.net (192.88.158.2) by
BN1AFFO11FD012.mail.protection.outlook.com (10.58.52.72) with
Microsoft SMTP Server (TLS) id 15.0.939.9 via Frontend Transport;
Fri, 9 May 2014 02:50:31 +0000
Received: from rock.ap.freescale.net (rock.ap.freescale.net [10.193.20.106])
by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id
s492oGqR004875; Thu, 8 May 2014 19:50:26 -0700
From: Xiubo Li
To: , ,
, ,
, ,
, ,
CC: , ,
, ,
"Xiubo Li"
Subject: [PATCHv4 1/2] dt/bindings: Add the DT binding documentation for
endianness
Date: Fri, 9 May 2014 10:04:32 +0800
Message-ID: <1399601073-19278-2-git-send-email-Li.Xiubo@freescale.com>
X-Mailer: git-send-email 1.8.0
In-Reply-To: <1399601073-19278-1-git-send-email-Li.Xiubo@freescale.com>
References: <1399601073-19278-1-git-send-email-Li.Xiubo@freescale.com>
X-EOPAttributedMessage: 0
X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI;
SFV:NSPM;
SFS:(10009001)(6009001)(189002)(199002)(77156001)(19580395003)(44976005)(20776003)(47776003)(6806004)(19580405001)(83322001)(68736004)(69596002)(64706001)(36756003)(80022001)(76482001)(46102001)(77982001)(21056001)(86362001)(93916002)(50226001)(4396001)(48376002)(74662001)(31966008)(74502001)(50466002)(87936001)(88136002)(87286001)(79102001)(83072002)(89996001)(92726001)(85852003)(2201001)(92566001)(76176999)(2009001)(99396002)(50986999)(77096999)(81542001)(62966002)(81342001);
DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB506; H:az84smr01.freescale.net;
FPR:;
MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en;
MIME-Version: 1.0
X-Forefront-PRVS: 02065A9E77
Received-SPF: Fail (: domain of freescale.com does not designate
192.88.158.2 as permitted sender) receiver=; client-ip=192.88.158.2;
helo=az84smr01.freescale.net;
Authentication-Results: spf=fail (sender IP is 192.88.158.2)
smtp.mailfrom=Li.Xiubo@freescale.com;
X-OriginatorOrg: freescale.com
Sender: devicetree-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: devicetree@vger.kernel.org
Device-Tree binding for device endianness
The endianness mode of CPU & Device scenarios:
Index CPU Device Endianness properties
------------------------------------------------------------
1 LE LE -
2 LE BE 'big-endian{,-*}'
3 BE BE -
4 BE LE 'little-endian{,-*}'
{big,little}-endian{,-*}: these are boolean properties, if absent
meaning that the CPU and the Device are in the same endianness mode.
Signed-off-by: Xiubo Li
---
.../devicetree/bindings/endianness/endianness.txt | 48 ++++++++++++++++++++++
1 file changed, 48 insertions(+)
create mode 100644 Documentation/devicetree/bindings/endianness/endianness.txt
diff --git a/Documentation/devicetree/bindings/endianness/endianness.txt b/Documentation/devicetree/bindings/endianness/endianness.txt
new file mode 100644
index 0000000..cc5f7f8
--- /dev/null
+++ b/Documentation/devicetree/bindings/endianness/endianness.txt
@@ -0,0 +1,48 @@
+Device-Tree binding for device endianness
+
+The endianness mode of CPU & Device scenarios:
+Index CPU Device Endianness properties
+------------------------------------------------------------
+1 LE LE -
+2 LE BE 'big-endian{,-*}'
+3 BE BE -
+4 BE LE 'little-endian{,-*}'
+
+For one device driver, which will run in different scenarios above
+on different SoCs using the devicetree, we need one way to simplify
+this.
+
+Required properties:
+- {big,little}-endian{,-*}: these are boolean properties, if absent
+ meaning that the CPU and the Device are in the same endianness mode.
+
+Examples:
+Scenario 1 : CPU in LE mode & device in LE mode.
+dev: dev@40031000 {
+ compatible = "name";
+ reg = <0x40031000 0x1000>;
+ ...
+};
+
+Scenario 2 : CPU in LE mode & device in BE mode.
+dev: dev@40031000 {
+ compatible = "name";
+ reg = <0x40031000 0x1000>;
+ ...
+ big-endian{,-*};
+};
+
+Scenario 3 : CPU in BE mode & device in BE mode.
+dev: dev@40031000 {
+ compatible = "name";
+ reg = <0x40031000 0x1000>;
+ ...
+};
+
+Scenario 4 : CPU in BE mode & device in LE mode.
+dev: dev@40031000 {
+ compatible = "name";
+ reg = <0x40031000 0x1000>;
+ ...
+ little-endian{,-*};
+};