Message ID | 1432055082-28983-2-git-send-email-Frank.Li@freescale.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <rtc-linux+bncBDMYB2E7SQCRBZG35WVAKGQERJ225XQ@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pa0-x23f.google.com (mail-pa0-x23f.google.com [IPv6:2607:f8b0:400e:c03::23f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42BD7140D4D for <incoming@patchwork.ozlabs.org>; Wed, 20 May 2015 03:07:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b=tlDhmP4D; dkim-atps=neutral Received: by pablj1 with SMTP id lj1sf5825257pab.1 for <incoming@patchwork.ozlabs.org>; Tue, 19 May 2015 10:07:48 -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=3Ym4gR+kkxU6wW3vMv+F1vPW32QptAuY9vT+RKyFE9c=; b=tlDhmP4DXKPRMyfek9LeeJxtpIzfRyOUHgpBduynN2arSZ/+YLStwrI+PF1JuzhFJG 3XQbEmrgN6xfVQ2rsgTcg7vZam4iYVBIZ0w29OvBB9UUokdHvmi7CIOv6st1vF012JJo BaOhxxsKDm2G11d97Ran0djj6H/yYHkxzRIQaVcFvAmKh9i2SdIoQ9atP//VvnvUXU3P +wCMUhIEoaYLCa1GGQ4wNwN6shD4gsgx6kLD9sf6nGfUWGEGY2vcQhy99IDUxQQZkbYB DHNK0U4olVK9bo86MlybE2GbD6b80p+5cdcqs7kjvxJKnaJ9fYbRLM4ymgHefF0gRWrY BXsg== X-Received: by 10.50.67.100 with SMTP id m4mr319547igt.12.1432055268715; Tue, 19 May 2015 10:07:48 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.107.134.136 with SMTP id q8ls254649ioi.63.gmail; Tue, 19 May 2015 10:07:48 -0700 (PDT) X-Received: by 10.67.13.9 with SMTP id eu9mr39042214pad.18.1432055268459; Tue, 19 May 2015 10:07:48 -0700 (PDT) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0747.outbound.protection.outlook.com. [2a01:111:f400:fc09::747]) by gmr-mx.google.com with ESMTPS id dq2si1989458qcb.3.2015.05.19.10.07.48 for <rtc-linux@googlegroups.com> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 May 2015 10:07:48 -0700 (PDT) Received-SPF: pass (google.com: domain of Frank.Li@freescale.com designates 2a01:111:f400:fc09::747 as permitted sender) client-ip=2a01:111:f400:fc09::747; Received: from CO2PR03CA0016.namprd03.prod.outlook.com (10.141.194.143) by BY1PR03MB1354.namprd03.prod.outlook.com (10.162.109.24) with Microsoft SMTP Server (TLS) id 15.1.166.22; Tue, 19 May 2015 17:07:46 +0000 Received: from BN1BFFO11FD032.protection.gbl (2a01:111:f400:7c10::1:110) by CO2PR03CA0016.outlook.office365.com (2a01:111:e400:1414::15) with Microsoft SMTP Server (TLS) id 15.1.148.16 via Frontend Transport; Tue, 19 May 2015 17:07:46 +0000 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; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD032.mail.protection.outlook.com (10.58.144.95) with Microsoft SMTP Server (TLS) id 15.1.172.14 via Frontend Transport; Tue, 19 May 2015 17:05:48 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t4JH5NNU005054; Tue, 19 May 2015 10:05:29 -0700 From: <Frank.Li@freescale.com> To: <lznuaa@gmail.com>, <shawn.guo@linaro.org>, <dmitry.torokhov@gmail.com>, <robh+dt@kernel.org>, <a.zummo@towertech.it>, <p.zabel@pengutronix.de>, <alexandre.belloni@free-electrons.com> 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 v2 1/7] arm: imx: power-off: change to syscon to access register Date: Wed, 20 May 2015 01:04:36 +0800 Message-ID: <1432055082-28983-2-git-send-email-Frank.Li@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432055082-28983-1-git-send-email-Frank.Li@freescale.com> References: <1432055082-28983-1-git-send-email-Frank.Li@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD032; 1:Zgxwr/uyvfVjIYC9W0Bfo2wAsm4tEK9vIotm7M7xiCgqwPPMefCe+HqWYeImnyBfUbGmUWLAAmrN8SoCXjNgfJXXcQqfk6+j1qfP3g7DuNeAHvQXT0dIUzXNOUro5tT8UlkUHTL7tFV3Yg9GYOsAchGWjCKGZxjJSNchJ93mqYluEQ0Gu2rVGNDjO7RAuqzO6q4Y6ln70Rfev0vcTTcK1cwTETewkVsveM2uWJnMftM71NW3L26yrfIdyD5iUe5I+1jBaic3XRey4Tvt8CQVd+AkQLhe7sBTsgMd7SWpnn5sqTfwOFBH7uwHTfnsfh4POwyQ9LqC+x1cPyp3XVzOYw== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(189002)(199003)(107886002)(189998001)(5001830100001)(5001860100001)(5001770100001)(5001960100002)(2950100001)(77156002)(62966003)(106466001)(36756003)(19580395003)(19580405001)(69596002)(104016003)(229853001)(50986999)(47776003)(64706001)(76176999)(86362001)(50466002)(85426001)(50226001)(48376002)(6806004)(87936001)(86152002)(2201001)(4001540100001)(81156007)(92566002)(68736005)(77096005)(97736004)(46102003)(105606002)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR03MB1354; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1354; 2:fKPdgeoQ8cAZn2Kf889BP/G3Hd9kXx91OJH4CDswQc1S2/dLSWoWzr034Sr3mgfh; 2:sPlhoTGMTKmUkyRBBq+INtSNUkhDA2HvEKCiUAR7dkC3p4IcdNmqdw4ku4xrRmmL6FNufMWVVxCquOlmuK+IPJr7MgpATUJdJfDqsVQhvN65/cCMdvTJwotv+4FtdwiSNuDK62GOvewX8wsPFiQ7EmI+eyzi6lAw1eRE7rZQ6Vs57fmwe2nymFdswKWrEhuNocqnSI2QtRw8gUIOj+dmEJYDZda2q8eLJIHWeBlb4lM=; 6:3LD4A7pFDM3PMY4SyL+gtZJ2gMoitKuEiLx6CfJ8PrSH6DWNGbJ5z1JslQZgGvULX4Rcx0bxYSWxQ0WbGT5cJvtO9Gc5Zwv4gvSPBywGSyrl6BtfLHkbRZGLh8TzZt2YwZxQdk9O2oZaIwjcVigQHKw+lnygSSH8lwbmATS3gF62WWQ4QK4ju7dAVBV/uWeqEnzBXWBxCjPa58hEryfUcqI5YvNrSOD1H3zsyH7FKQAWJnT5VbvWhPQrO1VgDNrt5cTvDTLGzq9JCIw8a4cZkzyomuZng8RiN4EvhPOSsOkLYX2pf0avkbttrtU66Uka7t/E80H1nFoo9aBmdSd4rw==; 3:pe8gIHQ6ieJIZFm69qaAap09Y3JBNl3ZIYAyrfs3KlMlk4DVUibDWNafQN60o9JM7Isir4G/wzIQF4T120TC0uEcyl+ZmkJ+5FstoIS9ZZADz+pNfgln2AAPsnr6SjytfaDmB+4WUghyPOvkulP3JX/i1GsvKWzqGLUDgZP+sQECZFtuWo6imH7Soc42KiMk8uWu5TBa9YYIu1iR+8fcLINL8N68aLodK3Dsp7nFz2Ms0/DZOSXcGKttofBL+WGl589kqfYbuql2mDOgK4r0z4w5tLqM1UIcYfqohkgemFU= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1354; X-Microsoft-Antispam-PRVS: <BY1PR03MB13549C5D3BEE68C282E96BA882C30@BY1PR03MB1354.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:BY1PR03MB1354; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1354; X-Forefront-PRVS: 0581B5AB35 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR03MB1354; 9:bvmSZq0blMH9eF6jXZqQEL1lIE7pxXIUWOXS2guRCm?= =?us-ascii?Q?hkQwLZuhlcMYYTZa1jPZjtSBZdNM0J1Gl4mngGFsmQVmTb+rj85a5cQAuaCS?= =?us-ascii?Q?bMPcU+zdLNinTtJjdOa4R2TXTci+wAvNpBT83eg489z794Kmu9RmY43bgjOm?= =?us-ascii?Q?m2r7VNdrgwvFXNvuaj1Ui/0hE4THVZBAVdNlV7SsINPntE3CQ4qT9LDcrUql?= =?us-ascii?Q?lUR4kev/XZmi49exrNDpeoUNRB1yFkITaASlC/fQFsGFFqGQe3rbhKof7gxR?= =?us-ascii?Q?F7bdPl881cbsxKxwME5H+fnKjR3o/RxZJucifljTiM7y46OlJ5eB5w9C1D0l?= =?us-ascii?Q?2K2f/OpdHsNmPNy9WlwU2H7Hr/FQaBzbcNT/rYkFRPKZkNO2bOE2VGVPBpCL?= =?us-ascii?Q?aACI9oIFioZkBS4y6Dkiw74KPw8FE4QE6a1kM4T/sOpjfNQlvxY4DHyz/1zj?= =?us-ascii?Q?DvMboJWV6HLOJMzDl6cpiRAUe1EDUjrhH2c83ml40UvXJ+QiZqFKF6KwZ0sx?= =?us-ascii?Q?Z8OyNfDcp5sJ19a73SYeljypoEvBQREcfQxcQULFDCUcEIkbYjUUQCG75ySl?= =?us-ascii?Q?mak2ZDwJfIkzaEM0kBlWRK3bXkYXvB5SFkjsU2OGdYitV5cy35+5PypjYgyG?= =?us-ascii?Q?UWVa6B/VyKcM5wr1FiZJoCak+xJf1zOv2Hj72QJLgzX0JDnW4InX66eFjz55?= =?us-ascii?Q?6DRbWRMOzpw81xvtQLk0jOGbFR2eV7qphUFkqxJNTZdLQO6aH6npQ1EoqWo7?= =?us-ascii?Q?2Flg70tgFOv5F0Db00LmeKDDJlvU8KRwFjvgKADICSMjwa/po1Od0GkPSv0W?= =?us-ascii?Q?P+Q6H09FR0KdCk3aRSv8p69kb5Z3mWqMdROTQPmh2SyUNpAiSmwYDXkKCR63?= =?us-ascii?Q?/ETnvWGxk9msqsdm1BjOWSq5YMzaAFpcFYlBK39VZriLbwssdW8cItsGirC3?= =?us-ascii?Q?tF+tXN74QCB9wlaOIxp1lo5bF3Wu+fK0GzbV/UPcO3wBLzcKgXz+jnCUFGIj?= =?us-ascii?Q?d4nIebvaayQDaFAa69d5q7vnA7+Z1WXF1OR/vib3iy5Dkz+7QuVX6n1g3Xvb?= =?us-ascii?Q?AbGAQaNlUC+v2h71XKDH3gntHd68WozVqDludTNke5R8/2WpJgUe1FK4P4Ke?= =?us-ascii?Q?zscu2Bu0c=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1354; 3:WARBV0IokAFar3MydisROuOUjMd2SHpdByB/fVFIYtBKxVJQNsd+SGJ9E8634taP8mruCPuZ42Sb+YRgOa0f0ifnwFmEpAPJ5gbXUG0qejC4OgP/0u4879EWmujQMm7JtAkV2fICIx13XajN8oUA0g==; 10:O5ZjPldAWxeCdfEbDeJDDCzPdOjGaeS/cmBC8Uu68z+t/0crAktMVulkuCRU4AfmIiag4h9HJlOAZrAxSvGQGJKw6jRZ3AZwVq/nW+qiNog=; 6:08In6f8BLkKHcHEXn9qVLv385crQjzmu1JEIFkwW3uVr6xoXfIx9l3tiqrDadF5J X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2015 17:05:48.9387 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1354 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 2a01:111:f400:fc09::747 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..aab8588 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; }