From patchwork Mon Sep 30 01:32:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ??? X-Patchwork-Id: 2962391 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 916499F288 for ; Mon, 30 Sep 2013 01:32:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B696A2020F for ; Mon, 30 Sep 2013 01:32:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E6152020E for ; Mon, 30 Sep 2013 01:32:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754456Ab3I3BcZ (ORCPT ); Sun, 29 Sep 2013 21:32:25 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:24568 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753565Ab3I3BcY (ORCPT ); Sun, 29 Sep 2013 21:32:24 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MTX003AX09HOED0@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Mon, 30 Sep 2013 10:32:05 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.51]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id A9.F1.20109.594D8425; Mon, 30 Sep 2013 10:32:05 +0900 (KST) X-AuditID: cbfee68f-b7f1e6d000004e8d-63-5248d495e124 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 17.0E.05832.594D8425; Mon, 30 Sep 2013 10:32:05 +0900 (KST) Received: from DOJAYSLEE01 ([12.23.121.88]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MTX00A4509HQP00@mmp2.samsung.com>; Mon, 30 Sep 2013 10:32:05 +0900 (KST) From: Jungseok Lee To: kgene.kim@samsung.com Cc: linux-samsung-soc@vger.kernel.org Subject: [PATCH V2] ARM: EXYNOS: implement pm_power_off for EXYNOS5440 Date: Mon, 30 Sep 2013 10:32:05 +0900 Message-id: <003101cebd7c$ded3a610$9c7af230$%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: Ac69fN6nYqCMMQCLTzu1LLgK2eP8WQ== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsVy+t8zY92pVzyCDDZ8kLboXXCVzWLG+X1M DkwefVtWMXp83iQXwBTFZZOSmpNZllqkb5fAlfFo4numgtVcFXe/z2FqYDzN0cXIySEhYCLx 7+R9ZghbTOLCvfVsXYxcHEICyxgldn+9yQ5TdHT2HhaIxHRGiS8TjzJDOL8ZJY6+/cAIUsUm oCnx6G4PWIeIgKREU8MfsLHMAqoS/9ZD2MICbhLXHsxmAbFZgOJ7vz1jBbF5BWwlmv7vY4Ow BSV+TL7HAtGrJbF+53EmCFteYvOat0BzOIAuUpd49FcXxBQR0JO4cTYSokJEYt+Ld4wgp0kI 9LNLbG74ygaxSkDi2+RDLBCtshKbDkA9LClxcMUNlgmMYrOQLJ6FZPEsJItnIVmxgJFlFaNo akFyQXFSepGxXnFibnFpXrpecn7uJkZI9PTvYLx7wPoQYzLQ+onMUqLJ+cDoyyuJNzQ2M7Iw NTE1NjK3NCNNWEmcV63FOlBIID2xJDU7NbUgtSi+qDQntfgQIxMHp1QD497ZieWlJ2//17/Y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: 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=-7.5 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 --- Changes since v1: - Added a comment to the effect of register configuration. 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..24eaa65 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"); + + /* turn off all power domains */ + 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(); }