From patchwork Wed Jul 9 11:25:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vikas Sajjan X-Patchwork-Id: 4513581 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 312769F433 for ; Wed, 9 Jul 2014 11:31:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AB5E20218 for ; Wed, 9 Jul 2014 11:31:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA0F520154 for ; Wed, 9 Jul 2014 11:31:41 +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 1X4q3r-0002aT-Mr; Wed, 09 Jul 2014 11:29:19 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X4q3k-0002SJ-Fy for linux-arm-kernel@lists.infradead.org; Wed, 09 Jul 2014 11:29:13 +0000 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8F00ERYZW2U7D0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 09 Jul 2014 20:28:50 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id DB.5E.16580.1772DB35; Wed, 09 Jul 2014 20:28:50 +0900 (KST) X-AuditID: cbfee691-b7f2f6d0000040c4-83-53bd2771fe39 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id FF.A8.05196.1772DB35; Wed, 09 Jul 2014 20:28:49 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N8F003RDZV79920@mmp2.samsung.com>; Wed, 09 Jul 2014 20:28:49 +0900 (KST) From: Vikas Sajjan To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/3] arm: exynos: Add PMU and S2R support for exynos5800 SoC Date: Wed, 09 Jul 2014 16:55:47 +0530 Message-id: <1404905147-30319-4-git-send-email-vikas.sajjan@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1404905147-30319-1-git-send-email-vikas.sajjan@samsung.com> References: <1404905147-30319-1-git-send-email-vikas.sajjan@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOLMWRmVeSWpSXmKPExsWyRsSkWrdIfW+wwfVyi7PLDrJZfN/1hd2i d8FVNotNj6+xWsw4v4/J4snhj6wWq3b9YbS4+Ww7kwOHx+yGiyweO2fdZffYvKTeo2/LKkaP z5vkAlijuGxSUnMyy1KL9O0SuDJa/i5gLdgkWtG9+S9TA+NpwS5GTg4JAROJJUfnskDYYhIX 7q1n62Lk4hASWMoocfXIT2aYogXTzjFBJKYzSjzYexqqagKTxLHea2DtbAK6EitOPQdKcHCI CHhLLL+mCFLDLDCfUWLi5C9gk4QFfCSe9M8Aq2ERUJV4/FkZJMwr4CHx58ZFJpCwhICCxJxJ NiBhTgFPidU9h9hAbCGgku8bTjJB3LOIXWLH5DIQm0VAQOLb5EMsEK2yEpsOQJ0sKXFwxQ2W CYzCCxgZVjGKphYkFxQnpReZ6hUn5haX5qXrJefnbmIEB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vkSXk9XvfGW+jNPWWSvmdbd6H7oTcm5mZ6iOBIdH0nqD ixN+yK89vfrjxu1PD3m+9w/ekvm1ysfGsHW/6RH2W1EhsUqJopJ/PZVYijMSDbWYi4oTAbD8 aP67AgAA 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-20140709_042912_702705_ABF5B492 X-CRM114-Status: GOOD ( 11.30 ) X-Spam-Score: -5.7 (-----) Cc: sajjan.linux@gmail.com, kgene.kim@samsung.com, tomasz.figa@gmail.com, dianders@chromium.org, Vikas Sajjan , joshi@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=-2.6 required=5.0 tests=BAYES_00,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 Adds PMU and S2R support for exynos5800 SoC. Signed-off-by: Vikas Sajjan --- arch/arm/mach-exynos/pm.c | 3 +++ arch/arm/mach-exynos/pmu.c | 22 ++++++++++++++++++++++ arch/arm/mach-exynos/regs-pmu.h | 3 ++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 5052261..908369f 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -807,6 +807,9 @@ static struct of_device_id exynos_pmu_of_device_ids[] = { }, { .compatible = "samsung,exynos5420-pmu", .data = (void *)&exynos5420_pm_data, + }, { + .compatible = "samsung,exynos5800-pmu", + .data = (void *)&exynos5420_pm_data, }, { /*sentinel*/ }, }; diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index d8485a4..0dd0be0 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c @@ -718,6 +718,19 @@ static void exynos5420_pmu_init(void) pr_info("EXYNOS5420 PMU initialized\n"); } +static void exynos5800_pmu_init(void) +{ + unsigned int value; + + exynos5420_pmu_init(); + + value = pmu_raw_readl(EXYNOS5420_LPI_MASK); + value |= EXYNOS5800_POWER_GATE_CTRL; + pmu_raw_writel(value, EXYNOS5420_LPI_MASK); + + pr_info("EXYNOS5800 PMU initialized\n"); +} + static const struct exynos_pmu_data exynos4210_pmu_data = { .pmu_config = exynos4210_pmu_config, @@ -744,6 +757,12 @@ static struct exynos_pmu_data exynos5420_pmu_data = { .powerdown_conf = exynos5420_powerdown_conf, }; +static struct exynos_pmu_data exynos5800_pmu_data = { + .pmu_config = exynos5420_pmu_config, + .pmu_init = exynos5800_pmu_init, + .powerdown_conf = exynos5420_powerdown_conf, +}; + static const struct regmap_config pmu_regmap_config = { .reg_bits = 32, .val_bits = 32, @@ -769,6 +788,9 @@ static const struct of_device_id exynos_pmu_of_device_ids[] = { }, { .compatible = "samsung,exynos5420-pmu", .data = (void *)&exynos5420_pmu_data, + }, { + .compatible = "samsung,exynos5800-pmu", + .data = (void *)&exynos5800_pmu_data, }, { /*sentinel*/ }, }; diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h index 3a6a559..3a0140c 100644 --- a/arch/arm/mach-exynos/regs-pmu.h +++ b/arch/arm/mach-exynos/regs-pmu.h @@ -555,5 +555,6 @@ static inline unsigned int exynos_pmu_cpunr(unsigned int mpidr) | EXYNOS5420_KFC_USE_STANDBY_WFI1 \ | EXYNOS5420_KFC_USE_STANDBY_WFI2 \ | EXYNOS5420_KFC_USE_STANDBY_WFI3) - +/* for exynos5800 only */ +#define EXYNOS5800_POWER_GATE_CTRL (1 << 15) #endif /* __ASM_ARCH_REGS_PMU_H */