From patchwork Mon Oct 19 06:03:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 7433531 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2624CBEEA4 for ; Mon, 19 Oct 2015 06:17:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D09220760 for ; Mon, 19 Oct 2015 06:17:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38BB720693 for ; Mon, 19 Oct 2015 06:17:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752513AbbJSGRv (ORCPT ); Mon, 19 Oct 2015 02:17:51 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:60796 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751596AbbJSGRu (ORCPT ); Mon, 19 Oct 2015 02:17:50 -0400 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NWG02JALETOU020@mailout3.samsung.com>; Mon, 19 Oct 2015 15:17:48 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.123]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 78.32.05385.C0B84265; Mon, 19 Oct 2015 15:17:48 +0900 (KST) X-AuditID: cbfee691-f79d66d000001509-90-56248b0cae25 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 85.E6.18629.C0B84265; Mon, 19 Oct 2015 15:17:48 +0900 (KST) Received: from exypnos.sisodomain.com ([107.108.73.28]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NWG00FF4ELI8NA0@mmp2.samsung.com>; Mon, 19 Oct 2015 15:17:48 +0900 (KST) From: Alim Akhtar To: linux-samsung-soc@vger.kernel.org Cc: kgene@kernel.org, k.kozlowski@samsung.com, javier@osg.samsung.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/7] ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs Date: Mon, 19 Oct 2015 11:33:55 +0530 Message-id: <1445234635-3950-8-git-send-email-alim.akhtar@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1445234635-3950-1-git-send-email-alim.akhtar@samsung.com> References: <1445234635-3950-1-git-send-email-alim.akhtar@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGLMWRmVeSWpSXmKPExsWyRsSkWpenWyXM4OMSbYv5R86xWrx5u4bJ 4vULQ4v+x6+ZLTY9vsZqMeP8PiYHNo9NqzrZPDYvqffY0n+X3aNvyypGj8+b5AJYo7hsUlJz MstSi/TtErgyXnTeYSx4JFrR828icwNjm1AXIyeHhICJxI8ruxghbDGJC/fWs3UxcnEICaxg lFi15iITTFH74ZlQiVmMEueuXmaFcH4ySnxZ+54NpIpNQFvi7vQtYB0iAqoSn9sWsIMUMQt0 MkosOXMDLCEsECGx8XsvK4jNAlQ09+NksDivgJvEqq53LBDrFCW6n00AG8op4C5xeE8rM4gt BFSz/HAj2BkSAv3sEpenLmeBGCQg8W3yISCbAyghK7HpADPEHEmJgytusExgFF7AyLCKUTS1 ILmgOCm9yFSvODG3uDQvXS85P3cTIzC4T/97NnEH4/0D1ocYBTgYlXh4DZpUwoRYE8uKK3MP MZoCbZjILCWanA+MobySeENjMyMLUxNTYyNzSzMlcV4d6Z/BQgLpiSWp2ampBalF8UWlOanF hxiZODilGhi3s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ter: 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=-6.9 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 Now we can use the generic syscon-{reboot/poweroff} drivers, so we don't need special handling for reboot/poweroff in exynos pmu driver. This patch remove the same. Signed-off-by: Alim Akhtar --- arch/arm/mach-exynos/pmu.c | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index de68938ee6aa..393c04aa727e 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c @@ -14,9 +14,6 @@ #include #include #include -#include -#include - #include "exynos-pmu.h" #include "regs-pmu.h" @@ -681,23 +678,6 @@ static unsigned int const exynos5420_list_disable_pmu_reg[] = { EXYNOS5420_CMU_RESET_FSYS_SYS_PWR_REG, }; -static void exynos_power_off(void) -{ - unsigned int tmp; - - pr_info("Power down.\n"); - tmp = pmu_raw_readl(EXYNOS_PS_HOLD_CONTROL); - tmp ^= (1 << 8); - pmu_raw_writel(tmp, EXYNOS_PS_HOLD_CONTROL); - - /* Wait a little so we don't give a false warning below */ - mdelay(100); - - pr_err("Power down failed, please power off system manually.\n"); - while (1) - ; -} - static void exynos5420_powerdown_conf(enum sys_powerdown mode) { u32 this_cluster; @@ -875,14 +855,6 @@ static void exynos5420_pmu_init(void) pr_info("EXYNOS5420 PMU initialized\n"); } -static int pmu_restart_notify(struct notifier_block *this, - unsigned long code, void *unused) -{ - pmu_raw_writel(0x1, EXYNOS_SWRESET); - - return NOTIFY_DONE; -} - static const struct exynos_pmu_data exynos3250_pmu_data = { .pmu_config = exynos3250_pmu_config, .pmu_init = exynos3250_pmu_init, @@ -940,20 +912,11 @@ static const struct of_device_id exynos_pmu_of_device_ids[] = { { /*sentinel*/ }, }; -/* - * Exynos PMU restart notifier, handles restart functionality - */ -static struct notifier_block pmu_restart_handler = { - .notifier_call = pmu_restart_notify, - .priority = 128, -}; - static int exynos_pmu_probe(struct platform_device *pdev) { const struct of_device_id *match; struct device *dev = &pdev->dev; struct resource *res; - int ret; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); pmu_base_addr = devm_ioremap_resource(dev, res); @@ -978,12 +941,6 @@ static int exynos_pmu_probe(struct platform_device *pdev) platform_set_drvdata(pdev, pmu_context); - ret = register_restart_handler(&pmu_restart_handler); - if (ret) - dev_warn(dev, "can't register restart handler err=%d\n", ret); - - pm_power_off = exynos_power_off; - dev_dbg(dev, "Exynos PMU Driver probe done\n"); return 0; }