From patchwork Mon Aug 25 07:54:37 2014
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Xiubo Li
X-Patchwork-Id: 382647
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 117571400B2
for ;
Mon, 25 Aug 2014 17:59:08 +1000 (EST)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1754596AbaHYH7G (ORCPT
);
Mon, 25 Aug 2014 03:59:06 -0400
Received: from mail-bn1blp0190.outbound.protection.outlook.com
([207.46.163.190]:28241
"EHLO na01-bn1-obe.outbound.protection.outlook.com"
rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP
id S1754490AbaHYH7F (ORCPT );
Mon, 25 Aug 2014 03:59:05 -0400
Received: from BY2PR0301MB0613.namprd03.prod.outlook.com (25.160.125.23) by
BY2PR0301MB0775.namprd03.prod.outlook.com (25.160.64.11) with
Microsoft SMTP
Server (TLS) id 15.0.1005.10; Mon, 25 Aug 2014 07:59:02 +0000
Received: from CH1PR03CA002.namprd03.prod.outlook.com (10.255.156.147) by
BY2PR0301MB0613.namprd03.prod.outlook.com (25.160.125.23) with
Microsoft SMTP
Server (TLS) id 15.0.1015.17; Mon, 25 Aug 2014 07:58:59 +0000
Received: from BN1AFFO11FD014.protection.gbl (10.255.156.132) by
CH1PR03CA002.outlook.office365.com (10.255.156.147) with Microsoft
SMTP
Server (TLS) id 15.0.1015.19 via Frontend Transport; Mon, 25 Aug 2014
07:58:58 +0000
Received: from az84smr01.freescale.net (192.88.158.2) by
BN1AFFO11FD014.mail.protection.outlook.com (10.58.52.74) with
Microsoft SMTP
Server (TLS) id 15.0.1010.11 via Frontend Transport; Mon, 25 Aug 2014
07:58:58 +0000
Received: from titan.ap.freescale.net ([10.192.208.233])
by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id
s7P7wswN001171; Mon, 25 Aug 2014 00:58:55 -0700
From: Xiubo Li
To: , , ,
CC: , ,
Xiubo Li
Subject: [PATCHv2] watchdog: imx2_wdt: Convert to use regmap framework's
endianness method.
Date: Mon, 25 Aug 2014 15:54:37 +0800
Message-ID: <1408953277-2069-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.158.2; CTRY:US; IPV:CAL; IPV:NLI;
EFV:NLI; SFV:NSPM;
SFS:(6009001)(199003)(189002)(89996001)(86362001)(77156001)(50986999)(19580405001)(69596002)(87286001)(105606002)(84676001)(79102001)(87936001)(6806004)(85852003)(19580395003)(92726001)(85306004)(99396002)(93916002)(95666004)(81342001)(2201001)(92566001)(104016003)(81156004)(83322001)(44976005)(104166001)(102836001)(74662001)(47776003)(21056001)(46102001)(20776003)(48376002)(76482001)(4396001)(36756003)(31966008)(80022001)(68736004)(229853001)(90102001)(81542001)(50466002)(88136002)(83072002)(74502001)(50226001)(26826002)(107046002)(97736001)(64706001)(77982001)(106466001)(62966002);
DIR:OUT; SFP:; SCL:1; SRVR:BY2PR0301MB0613; H:az84smr01.freescale.net;
FPR:;
MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en;
MIME-Version: 1.0
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:;UriScan:;
X-Forefront-PRVS: 03142412E2
Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not
designate 192.88.158.2 as permitted sender)
receiver=protection.outlook.com;
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-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;
X-OriginatorOrg: freescale.com
Sender: devicetree-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: devicetree@vger.kernel.org
Regmap framework will contain some patches to handle endianess, and there
does not need any parsing of endianness DT properties of individual driver,
so we can savely remove it here.
Signed-off-by: Xiubo Li
Cc: Markus Pargmann
Reviewed-by: Guenter Roeck
---
Changes in v2:
- Remove useless header file.
Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt | 4 ++--
drivers/watchdog/imx2_wdt.c | 9 +--------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt b/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
index e52ba2d..9e1ebe2 100644
--- a/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
@@ -6,8 +6,8 @@ Required properties:
- interrupts : Should contain WDT interrupt
Optional property:
-- big-endian: If present the watchdog device's registers are implemented
- in big endian mode, otherwise in little mode.
+- big-endian: Boolean property, required if all the i.MX WDT registers
+ are big-endian rather than little-endian.
Examples:
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 68c3d37..afc8738 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -28,7 +28,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -182,7 +181,7 @@ static struct watchdog_ops imx2_wdt_ops = {
.set_timeout = imx2_wdt_set_timeout,
};
-static struct regmap_config imx2_wdt_regmap_config = {
+static const struct regmap_config imx2_wdt_regmap_config = {
.reg_bits = 16,
.reg_stride = 2,
.val_bits = 16,
@@ -191,12 +190,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 +201,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))