From patchwork Tue Oct 20 09:24:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 7445481 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 4DFB0BEEA4 for ; Tue, 20 Oct 2015 09:36:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6744420272 for ; Tue, 20 Oct 2015 09:36:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 529A020253 for ; Tue, 20 Oct 2015 09:36:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753497AbbJTJgI (ORCPT ); Tue, 20 Oct 2015 05:36:08 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:36279 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753399AbbJTJgG (ORCPT ); Tue, 20 Oct 2015 05:36:06 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NWI00H31IO5BY90@mailout3.samsung.com>; Tue, 20 Oct 2015 18:36:05 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.123]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id FB.5E.05272.50B06265; Tue, 20 Oct 2015 18:36:05 +0900 (KST) X-AuditID: cbfee68e-f791c6d000001498-3f-56260b05b9fc Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id D8.86.23663.50B06265; Tue, 20 Oct 2015 18:36:05 +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 <0NWI00557IJSY720@mmp2.samsung.com>; Tue, 20 Oct 2015 18:36:04 +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 v2 6/6] ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs Date: Tue, 20 Oct 2015 14:54:45 +0530 Message-id: <1445333085-22837-7-git-send-email-alim.akhtar@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1445333085-22837-1-git-send-email-alim.akhtar@samsung.com> References: <1445333085-22837-1-git-send-email-alim.akhtar@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsWyRsSkWpeVWy3M4MRiMYv5R86xWrx5u4bJ 4vULQ4v+x6+ZLTY9vsZqMeP8PiYHNo9NqzrZPDYvqffY0n+X3aNvyypGj8+b5AJYo7hsUlJz MstSi/TtErgy9h1qYS3YIF7x6NE8tgbG7cJdjJwcEgImEs0n9zFC2GISF+6tZ+ti5OIQEljB KHH10hXmLkYOsKJbj1Qg4rMYJW7vW8oE4fxklFjT/IIZpJtNQFvi7vQtTCC2iICqxOe2Bewg RcwCnYwSS87cAEsIC0RLXJ3xjh3EZgEquvziJ9gGXgF3iSO/siGuUJTofjaBDSTMKeAh8W1L JkhYCKhi8eFJTBAlk9kltp/NgZgiIPFt8iEWiDtlJTYdYIYokZQ4uOIGywRG4QWMDKsYRVML kguKk9KLjPSKE3OLS/PS9ZLzczcxAoP69L9nfTsYbx6wPsQowMGoxMOrEaMaJsSaWFZcmXuI 0RRow0RmKdHkfGDs5JXEGxqbGVmYmpgaG5lbmimJ8yZI/QwWEkhPLEnNTk0tSC2KL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8ubP5RYijMSDbWYi4oTAYvqJgGzAgAA 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=-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. Note: This will break reboot/poweroff on boards with older dtbs with a newer kernel. Signed-off-by: Alim Akhtar Reviewed-by: Javier Martinez Canillas Acked-by: Moritz Fischer Tested-by: Javier Martinez Canillas --- 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; }