From patchwork Mon Aug 18 08:12:50 2014
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Xiubo Li
X-Patchwork-Id: 380739
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 1266814009B
for ;
Mon, 18 Aug 2014 18:17:11 +1000 (EST)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1751951AbaHRIRJ (ORCPT
);
Mon, 18 Aug 2014 04:17:09 -0400
Received: from mail-bn1lp0145.outbound.protection.outlook.com
([207.46.163.145]:22434
"EHLO na01-bn1-obe.outbound.protection.outlook.com"
rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP
id S1751878AbaHRIRI (ORCPT );
Mon, 18 Aug 2014 04:17:08 -0400
Received: from BN3PR0301CA0062.namprd03.prod.outlook.com (25.160.152.158) by
BY2PR0301MB0614.namprd03.prod.outlook.com (25.160.125.24) with
Microsoft SMTP
Server (TLS) id 15.0.1010.18; Mon, 18 Aug 2014 08:17:04 +0000
Received: from BL2FFO11FD024.protection.gbl (2a01:111:f400:7c09::100) by
BN3PR0301CA0062.outlook.office365.com (2a01:111:e400:401e::30) with
Microsoft SMTP Server (TLS) id 15.0.1010.18 via Frontend Transport;
Mon, 18 Aug 2014 08:17:03 +0000
Received: from tx30smr01.am.freescale.net (192.88.168.50) by
BL2FFO11FD024.mail.protection.outlook.com (10.173.161.103) with
Microsoft SMTP Server (TLS) id 15.0.1010.11 via Frontend Transport;
Mon, 18 Aug 2014 08:17:03 +0000
Received: from titan.ap.freescale.net ([10.192.208.233])
by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id
s7I8GxOf011721; Mon, 18 Aug 2014 01:17:01 -0700
From: Xiubo Li
To: , ,
CC: , Xiubo Li
Subject: [PATCH] watchdog: imx2_wdt: Convert to use regmap framework's
endianness method.
Date: Mon, 18 Aug 2014 16:12:50 +0800
Message-ID: <1408349570-13979-1-git-send-email-Li.Xiubo@freescale.com>
X-Mailer: git-send-email 1.8.5
X-EOPAttributedMessage: 0
X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:CAL; IPV:NLI;
EFV:NLI; SFV:NSPM;
SFS:(10019005)(6009001)(189002)(199003)(77156001)(85306004)(89996001)(79102001)(95666004)(107046002)(36756003)(77982001)(4396001)(84676001)(15975445006)(80022001)(105606002)(19580405001)(19580395003)(21056001)(44976005)(229853001)(104016003)(106466001)(83322001)(88136002)(87936001)(6806004)(48376002)(93916002)(64706001)(50466002)(102836001)(86362001)(20776003)(92566001)(92726001)(2201001)(50986999)(104166001)(26826002)(85852003)(97736001)(99396002)(68736004)(83072002)(87286001)(50226001)(81342001)(76482001)(47776003)(81542001)(74502001)(74662001)(46102001)(31966008)(62966002)(2101003);
DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR0301MB0614;
H:tx30smr01.am.freescale.net;
FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en;
MIME-Version: 1.0
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:;
X-Forefront-PRVS: 03077579FF
Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not
designate 192.88.168.50 as permitted sender)
receiver=protection.outlook.com;
client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net;
Authentication-Results: spf=fail (sender IP is 192.88.168.50)
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
Signed-off-by: Xiubo Li
Reviewed-by: Guenter Roeck
---
This is depended on the following regmap framework patches, which have
just been merged into linux-next tree:
https://lkml.org/lkml/2014/7/15/6
https://lkml.org/lkml/2014/7/15/5
https://lkml.org/lkml/2014/7/15/7
Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt | 3 ++-
drivers/watchdog/imx2_wdt.c | 6 ------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt b/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
index e52ba2d..8dab6fd 100644
--- a/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
@@ -7,7 +7,8 @@ Required properties:
Optional property:
- big-endian: If present the watchdog device's registers are implemented
- in big endian mode, otherwise in little mode.
+ in big endian mode, otherwise in native mode(same with CPU), for more
+ detail please see: Documentation/devicetree/bindings/regmap/regmap.txt.
Examples:
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 68c3d37..f37bb05 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -191,12 +191,10 @@ static struct regmap_config imx2_wdt_regmap_config = {
static int __init imx2_wdt_probe(struct platform_device *pdev)
{
- struct device_node *np = pdev->dev.of_node;
struct imx2_wdt_device *wdev;
struct watchdog_device *wdog;
struct resource *res;
void __iomem *base;
- bool big_endian;
int ret;
u32 val;
@@ -204,10 +202,6 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)
if (!wdev)
return -ENOMEM;
- big_endian = of_property_read_bool(np, "big-endian");
- if (big_endian)
- imx2_wdt_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))