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: 4140061
Return-Path:
X-Original-To: patchwork-linux-arm@patchwork.kernel.org
Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org
Received: from mail.kernel.org (mail.kernel.org [198.145.19.201])
by patchwork1.web.kernel.org (Postfix) with ESMTP id CD6B79F391
for ;
Fri, 9 May 2014 02:54:17 +0000 (UTC)
Received: from mail.kernel.org (localhost [127.0.0.1])
by mail.kernel.org (Postfix) with ESMTP id EE99F202DD
for ;
Fri, 9 May 2014 02:54:16 +0000 (UTC)
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.9])
(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.kernel.org (Postfix) with ESMTPS id 3024F202EC
for ;
Fri, 9 May 2014 02:54:16 +0000 (UTC)
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux))
id 1Wiatt-0007cM-2i; Fri, 09 May 2014 02:51:05 +0000
Received: from mail-bn1blp0186.outbound.protection.outlook.com
([207.46.163.186] helo=na01-bn1-obe.outbound.protection.outlook.com)
by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat
Linux)) id 1Wiatj-0007Ss-Nb
for linux-arm-kernel@lists.infradead.org;
Fri, 09 May 2014 02:50:57 +0000
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: , ,
, ,
, ,
, ,
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
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20140508_195055_980850_15D6C0FF
X-CRM114-Status: UNSURE ( 6.79 )
X-CRM114-Notice: Please train this message.
X-Spam-Score: -0.0 (/)
Cc: devicetree@vger.kernel.org, Xiubo Li ,
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-doc@vger.kernel.org
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id:
List-Unsubscribe:
,
List-Archive:
List-Post:
List-Help:
List-Subscribe:
,
Sender: "linux-arm-kernel"
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,
UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org
X-Virus-Scanned: ClamAV using ClamSMTP
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{,-*};
+};