Message ID | 1431623933-3473-2-git-send-email-Frank.Li@freescale.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <rtc-linux+bncBDMYB2E7SQCRBJGS2OVAKGQE5NKIKOQ@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pd0-x23a.google.com (mail-pd0-x23a.google.com [IPv6:2607:f8b0:400e:c02::23a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8A45B140283 for <incoming@patchwork.ozlabs.org>; Fri, 15 May 2015 04:27:51 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b=ApB8C6wv; dkim-atps=neutral Received: by pdev10 with SMTP id v10sf23484723pde.1 for <incoming@patchwork.ozlabs.org>; Thu, 14 May 2015 11:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=VN4hliW2IKWOJm6VMWTHp7D/ZzlDcwbns/PDwpbnPdk=; b=ApB8C6wvKB1BdiEDfmYQFnLLlkKgjmEnMqcUtjrcAwNERv92yVm+hjbqvDNc5L2knQ YSCC7HjRKCIA7DSjKStAHpBNDp2Vo3P9DJKHPtd99GjON2rLpaJlyDBpI6j+2ytQ5x+v TbbIdsRtnHPy+F/KH9zyf5ur+oFInn2heea+83GebwrcRHHh1QMPt4z0kbuh/oMnqXdU MGfcNnKIFxUCKrNe5LvrAr+99pduk4f33cWFalFhSeqCbPU6GAsmdtHN7RHmHhzUCgCr fjwtw7u+MHXAog1rsvvbxXNGacLQOT87zxDUEkoODUZPb3wX9SzceZ9VF+Vq2ifod+/d x2yw== X-Received: by 10.140.107.226 with SMTP id h89mr102423qgf.32.1431628068724; Thu, 14 May 2015 11:27:48 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.140.16.108 with SMTP id 99ls1410017qga.9.gmail; Thu, 14 May 2015 11:27:48 -0700 (PDT) X-Received: by 10.236.63.66 with SMTP id z42mr7947009yhc.2.1431628068481; Thu, 14 May 2015 11:27:48 -0700 (PDT) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0110.outbound.protection.outlook.com. [157.56.110.110]) by gmr-mx.google.com with ESMTPS id ye6si2663450pbc.2.2015.05.14.11.27.48 for <rtc-linux@googlegroups.com> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 May 2015 11:27:48 -0700 (PDT) Received-SPF: pass (google.com: domain of Frank.Li@freescale.com designates 157.56.110.110 as permitted sender) client-ip=157.56.110.110; Received: from BY2PR03CA009.namprd03.prod.outlook.com (10.255.93.26) by BY1PR03MB1355.namprd03.prod.outlook.com (10.162.109.25) with Microsoft SMTP Server (TLS) id 15.1.166.22; Thu, 14 May 2015 18:27:39 +0000 Received: from BN1BFFO11OLC002.protection.gbl (10.255.93.4) by BY2PR03CA009.outlook.office365.com (10.255.93.26) with Microsoft SMTP Server (TLS) id 15.1.160.19 via Frontend Transport; Thu, 14 May 2015 18:27:39 +0000 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; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11OLC002.mail.protection.outlook.com (10.58.145.13) with Microsoft SMTP Server (TLS) id 15.1.160.8 via Frontend Transport; Thu, 14 May 2015 18:27:39 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t4EIRUpI019483; Thu, 14 May 2015 11:27:35 -0700 From: <Frank.Li@freescale.com> To: <lznuaa@gmail.com>, <shawn.guo@linaro.org>, <dmitry.torokhov@gmail.com>, <robh+dt@kernel.org> CC: <linux-arm-kernel@lists.infradead.org>, <linux-input@vger.kernel.org>, <rtc-linux@googlegroups.com>, <linux-pm@vger.kernel.org>, <devicetree@vger.kernel.org>, Frank Li <Frank.Li@freescale.com> Subject: [rtc-linux] [PATCH 1/7] arm: imx: power-off: change to syscon to access register Date: Fri, 15 May 2015 01:18:47 +0800 Message-ID: <1431623933-3473-2-git-send-email-Frank.Li@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431623933-3473-1-git-send-email-Frank.Li@freescale.com> References: <1431623933-3473-1-git-send-email-Frank.Li@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11OLC002; 1:bpyMij0N4XLyscCOWzlz2FhaogDqaTj9oA8LM6yMnfJ+QzhKbbQvJjx5DctkafOA8diGPEEk7dQCnytKor3+bAs6hFdd8CXMpFGhUgTcsEnC7IbTSSySBPHQWVKnpTOpoNIhuQYREMqR75Kqe/V/Gdy7uGbsDnnhwAvT3O/2s1Uqf9FiInp4PYhiU5eDXa8Jihe2wl81Yq+g2Twq7elwKkWDMSdKE++WOCtLn1WZcjOowTts0KVT1iCKvQIR8L8elmCNRAJ1tHlm4TROG28sMYQHBhVcKbnNdOMxmy6JtzAmo3yvOMxPO5kDZfKDMLXTY5zPUrr7ar/JAdj/80yoOQ== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(77096005)(229853001)(6806004)(85426001)(107886002)(106466001)(5001960100002)(104016003)(48376002)(2201001)(86152002)(46102003)(50986999)(76176999)(189998001)(47776003)(5001770100001)(92566002)(50226001)(36756003)(50466002)(62966003)(77156002)(2950100001)(19580395003)(87936001)(86362001)(19580405001)(105606002)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR03MB1355; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1355; 2:Yh7lkxaQh+X5DRLy+AJecsVn1ppITAukTimGt3mGjGyj9bzTbNKccF9Da9a/BZQJ; 2:UPsrjdAUUku4PDq+IQ0NH0+98+MQ/tldCF8emeF2zjn+4SgFA9/4fWibpML9Zl2g1cqVzS0ZzNIMGbKOij/t/V5RqglmPmSom5z3EzkxSLDVYRnFA26X/AHHGuJOsrg2MLz4Z/GGDnlLYaHU8pbG+ih4KtoOgVgeY7JVneMki0XjxgxmUQa7VoViB5dlfXcX3wGCFAlGjG1ImzLxXMk1Aivmc678xQ0yDJnmZVVVNv8=; 6:NE55iQAQiCJHhONkVfzXQlU4GKUPgUZKNGWfLF5rcY2US6SDhTJfeu6+j8ZmrexrgBc+WAk3EL87acNi6s0htdf/HV+0tlgsXTtp+byIKuSTtDR3aaLmhjVjJqhfA6KRppOd9d1L4StxXRp5uzz6erWmgpeDjZaJimybN61bCCkByY1yX3KHqcrSOPrv2sO3xpk1AUHJhstXjo09HX0u3uGN0rFROUq7qdXliRgFPqAkKnfuEr7GOjRFAvi53j1k1QV3AE74GBpcyu+m2gWbkH0yaGtYsGh3MCPmymdr2gyj29lcPeUcHN4NvVVjPY2V+rp0j2vaQz5eFz0dJcbaJw==; 3:GBFqRlzmoky9dQ2+AppxG8os0fmAUy8E71zVs6ew+R7h90W1pNCSRp1dAczXZE/f4G+l0mN0xF4VFmvH5n0FFWndTvnVIpfMjJYxj/s717BwQxuzEEF0xgy6bz1Pba5qabRB2tt9HOvSa024DVAkY9UZBI3EQ+n6jD3AqCGNNUIhu9H6+OpSKeEgK/gGGSQRpBj6pogomcSV1yg/ZS5MBocYF7v2hEae5NxhQ2o9SPaYUfMCOg4Wtcr6mlcr07ZpuuY1o/JbCerUirgb/lzzV+zPaboyDwniYqGgM8U1vxQ= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1355; X-Microsoft-Antispam-PRVS: <BY1PR03MB1355BFF17D597E6F040D8C0A82D80@BY1PR03MB1355.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BY1PR03MB1355; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1355; X-Forefront-PRVS: 0576145E86 X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1355; 9:OpUOrfNM79aCK6sc2BRDTTFCnfexTWVbIC/V/Mz70c+nRwkDiT5vPbfL0CujRTofFG5iZD2uoM6KkalBqfs5eSdWpNk4AokJ0lRB/SpS77gDLbDdURGCVnuPpUUZ8S7NxG96CjcHZm2WDZ463xBrvPvp7SbURWL6x9IR6Cqgt2ZMg7yIcDHUWWpVk/a7xSHPCUOUWNFZBSdXdab8V9DFRJaaI1Vn/o1eq8dpju+tUtNDbt4EajH9slAZk7IOq61wyROg8OV9HVKMrfje+GXf9jJE0SBgz3vGgjEqiq7UgQUcTGXsCk8ED/GooAUxY7NC/cwRQT79HQeiWyjUldDFRM0BP3hxYGHMt8ecBUJHKRiCHaznSUAwGYgLRNWW94t9hpsCHW1ze0b4s/JOcwr/Ngw6DOFJC5XfWyqwIn9isgSyhpjh+b7TPYIbjD5jKgvc4YAsH51pyC6YvV9UmcDnpLGqpgYHfF2Onq+dYeI7sej2IzvNleCL8XAodRKTrQoRC1o5IRw0MzHLaOcGEk1e1kXC4kKqECV4+bKmAHnw1tqamEUQ1mGvazMcsumuVoSo68JQQlQ6jwOMrQrEx8mlMXlhbYKzOknVz+2DHc6Z6fvNkEqhhjxqHMPyF/TkUoBFWNNkAV2GaIn1Sdem+zv9narZEHTSJI81vsuVBybAJNxdVPKS7ZJ59oePspDdGzppXb0P+qdwJu5PW17Hp3BhH6byn29C1DMaZpk2gHSiaZTGCPYR8xoPUyeY4z2ylyfE3fAyWHQcj8Yu5xouYoxfGy5CY3foXk2E+SoZaTveDyUxOgzqGP3g9D9PIkdQGomk/YEshtxOzvJiKnEdw6w9dVPY7nMIDNcdyf8dh6cyuYItNLMeZgEgU9wceTpF0yiYzlbW1nhVZWP7tAvWduiQxrxtL/PMRg3rt5wtmDTfK2k= X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1355; 3:38N+B7td4Q1ytuv1bD53/sL1nFmEYE4kuSqhn7ZGuYiYIrzenTgK6gr1TVVn91Ju9xrD0AhwsLLsI8n07muH3Aif75/2KeCUQyLcNTHSmj26lHRbbg2BQZlI1zBKEdlMO/YYiaEEkeOppSc+MYkLRg==; 10:UFGxYiD6crsB9Pxq4ZOvGQ2wGo5n14/1B8+4FILbSapFZABLXp8XDBu2EPq0++DTVbaNicsc3h1M3xMWIM5id6P07tH8+gW/gzPUqn7gydg=; 6:r3Cc35+WKDIql5zadm5s8XzfzlJpFIsBGXQdODdtT6+07hsvlv7VA90w4Qlc+6bH X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2015 18:27:39.0985 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1355 X-Original-Sender: frank.li@freescale.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of Frank.Li@freescale.com designates 157.56.110.110 as permitted sender) smtp.mail=Frank.Li@freescale.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: <rtc-linux.googlegroups.com> X-Google-Group-Id: 712029733259 List-Post: <http://groups.google.com/group/rtc-linux/post>, <mailto:rtc-linux@googlegroups.com> List-Help: <http://groups.google.com/support/>, <mailto:rtc-linux+help@googlegroups.com> List-Archive: <http://groups.google.com/group/rtc-linux Sender: rtc-linux@googlegroups.com List-Subscribe: <http://groups.google.com/group/rtc-linux/subscribe>, <mailto:rtc-linux+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+712029733259+unsubscribe@googlegroups.com>, <http://groups.google.com/group/rtc-linux/subscribe> |
diff --git a/drivers/power/reset/imx-snvs-poweroff.c b/drivers/power/reset/imx-snvs-poweroff.c index ad6ce50..b4881d7 100644 --- a/drivers/power/reset/imx-snvs-poweroff.c +++ b/drivers/power/reset/imx-snvs-poweroff.c @@ -22,21 +22,30 @@ #include <linux/of.h> #include <linux/of_address.h> #include <linux/platform_device.h> +#include <linux/mfd/syscon.h> +#include <linux/regmap.h> -static void __iomem *snvs_base; +static struct regmap *snvs; + +#define SNVS_LPCR 0x38 static void do_imx_poweroff(void) { - u32 value = readl(snvs_base); - /* set TOP and DP_EN bit */ - writel(value | 0x60, snvs_base); + regmap_update_bits(snvs, SNVS_LPCR, 0x60, 0x60); } static int imx_poweroff_probe(struct platform_device *pdev) { - snvs_base = of_iomap(pdev->dev.of_node, 0); - if (!snvs_base) { + struct device_node *nd; + + nd = of_get_parent(pdev->dev.of_node); + if (!nd) + return -ENODEV; + snvs = syscon_node_to_regmap (nd); + of_node_put(nd); + + if (!snvs) { dev_err(&pdev->dev, "failed to get memory\n"); return -ENODEV; }