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: 7433571 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B26D29F30B for ; Mon, 19 Oct 2015 06:19:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CDD7C20763 for ; Mon, 19 Oct 2015 06:19:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC6A22075F for ; Mon, 19 Oct 2015 06:19:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zo3ls-0006DJ-EK; Mon, 19 Oct 2015 06:18:12 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zo3lp-0005nR-UQ for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2015 06:18:10 +0000 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> for linux-arm-kernel@lists.infradead.org; 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 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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q1GJZbijERDLeai4kQAM6rM/7YCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151018_231810_134759_1A318FAE X-CRM114-Status: GOOD ( 14.52 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: javier@osg.samsung.com, k.kozlowski@samsung.com, kgene@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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; }