From patchwork Sat Sep 28 05:07:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ??? X-Patchwork-Id: 2957361 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 1F343BFF0B for ; Sat, 28 Sep 2013 05:07:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50A1F202E8 for ; Sat, 28 Sep 2013 05:07:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D969B202D1 for ; Sat, 28 Sep 2013 05:07:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750943Ab3I1FHU (ORCPT ); Sat, 28 Sep 2013 01:07:20 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:63668 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844Ab3I1FHT (ORCPT ); Sat, 28 Sep 2013 01:07:19 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MTT00D2KKW11V50@mailout3.samsung.com> for linux-samsung-soc@vger.kernel.org; Sat, 28 Sep 2013 14:07:17 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.47]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 51.19.17682.40466425; Sat, 28 Sep 2013 14:07:16 +0900 (KST) X-AuditID: cbfee68e-b7f756d000004512-e6-52466404eadf Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 38.F8.05832.30466425; Sat, 28 Sep 2013 14:07:16 +0900 (KST) Received: from DOJAYSLEE01 ([12.23.121.88]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MTT000EHKW3IH30@mmp1.samsung.com>; Sat, 28 Sep 2013 14:07:15 +0900 (KST) From: Jungseok Lee To: '???' Cc: linux-samsung-soc@vger.kernel.org Subject: ARM: EXYNOS: implement pm_power_off for EXYNOS5440 Date: Sat, 28 Sep 2013 14:07:15 +0900 Message-id: <006e01cebc08$995a8650$cc0f92f0$%lee@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac68CJc70y9gapk2RbmTN8bS90m+bA== Content-language: ko x-cr-hashedpuzzle: Pf4= ADz4 A53O A+2R FKxk HJq6 Hn0o LGGl LTSZ LeJe NfJk N4xN OTXZ Rsqj SChl VVsa; 2; awBnAGUAbgBlAC4AawBpAG0AQABzAGEAbQBzAHUAbgBnAC4AYwBvAG0AOwBsAGkAbgB1AHgALQBzAGEAbQBzAHUAbgBnAC0AcwBvAGMAQAB2AGcAZQByAC4AawBlAHIAbgBlAGwALgBvAHIAZwA=; Sosha1_v1; 7; {7429E9C7-B4B8-4E91-AC1E-1A545DBAE72D}; agBhAHkAcwAuAGwAZQBlAEAAcwBhAG0AcwB1AG4AZwAuAGMAbwBtAA==; Sat, 28 Sep 2013 05:07:12 GMT; QQBSAE0AOgAgAEUAWABZAE4ATwBTADoAIABpAG0AcABsAGUAbQBlAG4AdAAgAHAAbQBfAHAAbwB3AGUAcgBfAG8AZgBmACAAZgBvAHIAIABFAFgAWQBOAE8AUwA1ADQANAAwAA== x-cr-puzzleid: {7429E9C7-B4B8-4E91-AC1E-1A545DBAE72D} X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFIsWRmVeSWpSXmKPExsVy+t8zfV2WFLcgg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riX8ty1hBbBag+ILDm8HqeQVs JeZ9vMUEYQtK/Jh8jwWiV0ti/c7jUHPkJTaveQs0hwPoInWJR391IVbpScxYupMZokREYt+L d2C3SQhMYZF4d3IDC8QHphLP+/tYJjAKzUKyYhaSFbOQrJiFZNYCRpZVjKKpBckFxUnpuUZ6 xYm5xaV56XrJ+bmbGMHx/Ex6B+OqBotDjAIcjEo8vAdmuAYJsSaWFVfmHmKU4GBWEuF9/woo xJuSWFmVWpQfX1Sak1p8iDEZGAITmaVEk/OBqSavJN7Q2MTMyNLIzMLIxNycNGElcd6DrdaB QgLpiSWp2ampBalFMFuYODilGhhZD76YvDRG4+u0OzuZXQ78enV/+UFTkZs9W2Yc+XVyVs9c WZH9q6sT66tnsL1XunP48ZsrBya6aV1QbF6yjlks7o6l7atvy6JM9VdIXLXhM2E1mmHIuXT3 yuOLvBabfW9O+t/Gk5IptpnrGkuJ2F/xtCNHNI7d3P7JtVLxM/sl39w3x6bHmZxLU2Ipzkg0 1GIuKk4EAATVw5ErAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 This patch implements pm_power_off function since a power-down control register should be set in order to turn off EXYNOS5440. Otherwise, power domains remain alive despite "poweroff" action. Signed-off-by: Jungseok Lee --- arch/arm/mach-exynos/common.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index ba95e5d..21f3ce9 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -294,11 +294,24 @@ void exynos5_restart(enum reboot_mode mode, const char *cmd) __raw_writel(val, addr); } +static void exynos5440_power_off(void) +{ + struct device_node *np; + void __iomem *addr; + + np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock"); + + addr = of_iomap(np, 0) + 0x14; + + __raw_writel(0x1, addr); +} + void __init exynos_init_late(void) { - if (of_machine_is_compatible("samsung,exynos5440")) - /* to be supported later */ + if (of_machine_is_compatible("samsung,exynos5440")) { + pm_power_off = exynos5440_power_off; return; + } exynos_pm_late_initcall(); }