From patchwork Mon Aug 18 07:48:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiubo Li X-Patchwork-Id: 4732711 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8346EC0338 for ; Mon, 18 Aug 2014 07:53:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2A0420122 for ; Mon, 18 Aug 2014 07:53:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C06112011E for ; Mon, 18 Aug 2014 07:53:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750951AbaHRHxb (ORCPT ); Mon, 18 Aug 2014 03:53:31 -0400 Received: from mail-bn1blp0182.outbound.protection.outlook.com ([207.46.163.182]:21132 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750765AbaHRHxa (ORCPT ); Mon, 18 Aug 2014 03:53:30 -0400 Received: from BN3PR0301CA0040.namprd03.prod.outlook.com (25.160.180.178) by BN1PR0301MB0610.namprd03.prod.outlook.com (25.160.170.25) with Microsoft SMTP Server (TLS) id 15.0.1010.18; Mon, 18 Aug 2014 07:53:27 +0000 Received: from BY2FFO11FD037.protection.gbl (2a01:111:f400:7c0c::159) by BN3PR0301CA0040.outlook.office365.com (2a01:111:e400:4000::50) with Microsoft SMTP Server (TLS) id 15.0.1010.18 via Frontend Transport; Mon, 18 Aug 2014 07:53:27 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD037.mail.protection.outlook.com (10.1.14.222) with Microsoft SMTP Server (TLS) id 15.0.1010.11 via Frontend Transport; Mon, 18 Aug 2014 07:53:26 +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 s7I7rNgE015255; Mon, 18 Aug 2014 00:53:24 -0700 From: Xiubo Li To: , CC: , , Xiubo Li Subject: [PATCH] spi: fsl-dspi: Convert to use regmap framework's endianness method. Date: Mon, 18 Aug 2014 15:48:20 +0800 Message-ID: <1408348100-28819-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)(199003)(189002)(48376002)(74502001)(21056001)(50466002)(74662001)(104166001)(104016003)(31966008)(85306004)(107046002)(95666004)(106466001)(105606002)(229853001)(81542001)(62966002)(81342001)(86362001)(87936001)(93916002)(97736001)(36756003)(83072002)(68736004)(85852003)(46102001)(64706001)(92566001)(19580405001)(4396001)(92726001)(102836001)(50226001)(77982001)(19580395003)(84676001)(15975445006)(83322001)(89996001)(44976005)(87286001)(88136002)(6806004)(77156001)(26826002)(47776003)(76482001)(80022001)(50986999)(20776003)(99396002)(79102001)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR0301MB0610; H:tx30smr01.am.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:; 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: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Signed-off-by: Xiubo Li Cc: Chao Fu Acked-by: Chao Fu --- This is depended on the following patches, which has been applied into Regmap-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/spi/spi-fsl-dspi.txt | 7 ++++++- drivers/spi/spi-fsl-dspi.c | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt index 5376de4..cbbe16e 100644 --- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt +++ b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt @@ -10,7 +10,12 @@ Required properties: - pinctrl-names: must contain a "default" entry. - spi-num-chipselects : the number of the chipselect signals. - bus-num : the slave chip chipselect signal number. -- big-endian : if DSPI modudle is big endian, the bool will be set in node. + +Optional property: +- big-endian: If present the dspi device's registers are implemented + in big endian mode, otherwise in native mode(same with CPU), for more + detail please see: Documentation/devicetree/bindings/regmap/regmap.txt. + Example: dspi0@4002c000 { diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 5021ddf..ebc4d1f 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -493,9 +493,6 @@ static int dspi_probe(struct platform_device *pdev) } dspi_regmap_config.lock_arg = dspi; - dspi_regmap_config.val_format_endian = - of_property_read_bool(np, "big-endian") - ? REGMAP_ENDIAN_BIG : REGMAP_ENDIAN_DEFAULT; dspi->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "dspi", base, &dspi_regmap_config); if (IS_ERR(dspi->regmap)) {