From patchwork Tue Jan 9 07:58:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 10151115 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D5BDB601A1 for ; Tue, 9 Jan 2018 08:01:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA9B728967 for ; Tue, 9 Jan 2018 08:01:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE218289B7; Tue, 9 Jan 2018 08:01:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 331C528967 for ; Tue, 9 Jan 2018 08:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=fQo9dDskbHYguSt8TC6Zx7x3+eN0mbElwJkTiPAAsHU=; b=JM9hmBzEC1+M0Pl7ibi53DH5W9 rvVTW0T3oBor+OOdP2UFuPKaqwc6E2mzDCiCG+dNEZSJVggbW320eflqcH8PKp9iMw9LAnBEz355w UffeCokJV1hSEJudVcNTDGwzaL99E/+oTExyjFFj5F5am/q6/YRoEpxDtXNU+/Y5/jMuleDXROJRn DbuLaBzIFYU8+4R9d3YSBwgN027gre6/qxsjUI/t+auR+aDqGiyhsPlOxRAWo9GJ3TyIftl81Xxew p/7D/YzA48FfpVJG2v4e14wQMbgrKJ8+i808tTX2mFxFXfmD8QTKNoBjsrUb+eN79+QIp3wvRo1uM 2bY9/YaA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYoqV-0007n9-VZ; Tue, 09 Jan 2018 08:01:19 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYoof-000691-HI for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2018 07:59:37 +0000 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180109075906epoutp02f1186c75b043dd0f56d37ee69cb1780f~IFVjrBIPy0493704937epoutp02G; Tue, 9 Jan 2018 07:59:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180109075906epoutp02f1186c75b043dd0f56d37ee69cb1780f~IFVjrBIPy0493704937epoutp02G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1515484746; bh=fQzVqLOHLnXYXnsOFfor2vlZh/eXbdzxohmYgiNfuYM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=D5CZfJE2/G3O3ZT0UgnFKVUPO1XPYFvKwS+U44RYcPm4y8L0ko/CYpInxxUL0iO7i yXi5eGx2Sg/DWXmsdHSYRKBWphA0gmR31DzURwoESGttF+NODCDslrPEmSbk9HHwl0 qf9MMoVQSSMm/KVieLOhhL/o1xxTYJ9HWzxR/deg= Received: from epsmges1p4.samsung.com (unknown [182.195.40.69]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180109075905epcas1p2da91165df7bf7dfb7d4a94df5c4fafe2~IFVjL_UQq0840608406epcas1p28; Tue, 9 Jan 2018 07:59:05 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id EC.8C.04483.946745A5; Tue, 9 Jan 2018 16:59:05 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180109075905epcas1p4e601230d86dd686db28796165178dafa~IFVivE86a3183631836epcas1p4K; Tue, 9 Jan 2018 07:59:05 +0000 (GMT) X-AuditID: b6c32a38-eddff70000001183-88-5a547649d9c6 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 8F.0C.04148.946745A5; Tue, 9 Jan 2018 16:59:05 +0900 (KST) Received: from localhost.localdomain ([10.113.77.231]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P2A00EW93IGT980@mmp2.samsung.com>; Tue, 09 Jan 2018 16:59:05 +0900 (KST) From: Chanwoo Choi To: krzk@kernel.org, m.szyprowski@samsung.com, s.nawrocki@samsung.com, kgene@kernel.org Subject: [PATCH 2/9] soc: samsung: pmu: Add powerup_conf callback Date: Tue, 09 Jan 2018 16:58:59 +0900 Message-id: <1515484746-10656-3-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1515484746-10656-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSa0hTYRjHez07Z1NaHabVy7rJCT+kuXbmnEdxoqS10GBYEE5iHfTgRu7S ztSUICFsJeKN7uk0vBBTI6aYmVpeWkUwTTM1MLtnapGVXTSiM49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Pb2C32PT4GqvF5V1z2CxmnN/HZLH2yF12i8Nv2lkt Vu36w+jA67Fz1l12j02rOtk8Ni+p9+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6Muc09bAW7 +CuW9hxkbmBcwtvFyMkhIWAi8enYLrYuRi4OIYF1jBITNs9mhXB+MEr039zACFLFJqAlsf/F DTYQW0QgUuLJ1KdgNrPAb0aJywuLQGxhAUeJCw+vsoPYLAKqEvOmvmUFsXkFXCV2fLzMArFN TuLDnkdgNZwCbhK7/60BmyMEVPPwwWnGCYw8CxgZVjFKphYU56bnFhsVGOallusVJ+YWl+al 6yXn525iBAbgtsNafTsY7y+JP8QowMGoxMNb0B4cJcSaWFZcmXuIUYKDWUmE13c+UIg3JbGy KrUoP76oNCe1+BCjNAeLkjjv7bxjkUIC6YklqdmpqQWpRTBZJg5OqQZGb51/H6XvJVyS75aL uszw/YLh8gf69mdirfU1D6xL6u+a2MP6aOac3TZB+//KT+mTO7zn/dPeA7/rHgTu+vGi8bFS uXZn5J9FMheYPYInG0v58zsaTg651Lpa8kr3ne5iK/+kVL5Vt1j6uln2NN2X/tf+1JwrS8zp yALd+dnKFk6u1ziN/rsqsRRnJBpqMRcVJwIAZ9hzEDwCAAA= X-CMS-MailID: 20180109075905epcas1p4e601230d86dd686db28796165178dafa X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180109075905epcas1p4e601230d86dd686db28796165178dafa X-RootMTR: 20180109075905epcas1p4e601230d86dd686db28796165178dafa References: <1515484746-10656-1-git-send-email-cw00.choi@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_235925_857588_125AB513 X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: inki.dae@samsung.com, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, tomasz.figa@gmail.com, linux-kernel@vger.kernel.org, jh80.chung@samsung.com, cw00.choi@samsung.com, chanwoo@kernel.org, linux-arm-kernel@lists.infradead.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-Virus-Scanned: ClamAV using ClamSMTP This patch adds the powerup_conf callback which is used to re-initialize the PMU registers during the resume state. Signed-off-by: Chanwoo Choi --- drivers/soc/samsung/exynos-pmu.c | 8 ++++++++ drivers/soc/samsung/exynos-pmu.h | 1 + include/linux/soc/samsung/exynos-pmu.h | 1 + 3 files changed, 10 insertions(+) diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index f56adbd9fb8b..cfc9de518344 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -58,6 +58,14 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode) pmu_data->powerdown_conf_extra(mode); } +void exynos_sys_powerup_conf(enum sys_powerdown mode) +{ + const struct exynos_pmu_data *pmu_data = pmu_context->pmu_data; + + if (pmu_data->powerup_conf) + pmu_data->powerup_conf(mode); +} + /* * Split the data between ARM architectures because it is relatively big * and useless on other arch. diff --git a/drivers/soc/samsung/exynos-pmu.h b/drivers/soc/samsung/exynos-pmu.h index 977e4daf5a0f..efbaf8929252 100644 --- a/drivers/soc/samsung/exynos-pmu.h +++ b/drivers/soc/samsung/exynos-pmu.h @@ -24,6 +24,7 @@ struct exynos_pmu_data { void (*pmu_init)(void); void (*powerdown_conf)(enum sys_powerdown); void (*powerdown_conf_extra)(enum sys_powerdown); + void (*powerup_conf)(enum sys_powerdown); }; extern void __iomem *pmu_base_addr; diff --git a/include/linux/soc/samsung/exynos-pmu.h b/include/linux/soc/samsung/exynos-pmu.h index e57eb4b6cc5a..3aacf7b18401 100644 --- a/include/linux/soc/samsung/exynos-pmu.h +++ b/include/linux/soc/samsung/exynos-pmu.h @@ -22,6 +22,7 @@ enum sys_powerdown { }; extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); +extern void exynos_sys_powerup_conf(enum sys_powerdown mode); #ifdef CONFIG_EXYNOS_PMU extern struct regmap *exynos_get_pmu_regmap(void); #else