From patchwork Tue Jul 1 08:10:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 4457081 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7B416BEEAA for ; Tue, 1 Jul 2014 08:10:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15FAA2040F for ; Tue, 1 Jul 2014 08:10:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B2A2202DD for ; Tue, 1 Jul 2014 08:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757410AbaGAIKh (ORCPT ); Tue, 1 Jul 2014 04:10:37 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:58779 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755725AbaGAIKe (ORCPT ); Tue, 1 Jul 2014 04:10:34 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N80005KIXDDPG80@mailout1.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Tue, 01 Jul 2014 09:10:25 +0100 (BST) X-AuditID: cbfec7f4-b7fac6d000006cfe-73-53b26cf5556e Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id A7.C5.27902.5FC62B35; Tue, 01 Jul 2014 09:10:29 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N8000A5SXDBMY80@eusync2.samsung.com>; Tue, 01 Jul 2014 09:10:29 +0100 (BST) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Marek Szyprowski , Kukjin Kim , Tobias Jakobi , Daniel Drake , Andrzej Hajda , Inki Dae , Tomasz Stanislawski , Tomasz Figa Subject: [PATCH 4/7] Exynos: add support for 'domain-always-on' property Date: Tue, 01 Jul 2014 10:10:08 +0200 Message-id: <1404202211-15788-5-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1404202211-15788-1-git-send-email-m.szyprowski@samsung.com> References: <1404202211-15788-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphluLIzCtJLcpLzFFi42I5/e/4Fd2vOZuCDb4vUrG4te4cq8Wj+Y+Z La58fc9mMen+BBaL3gVX2SxmnN/HZNH18yebxdojd9kt1s94zWIxr/0lqwOXx6LvWR6LN+1n 87jffZzJo2/LKkaPz5vkAlijuGxSUnMyy1KL9O0SuDIW/JnPXjBPsOLk1/0sDYxb+boYOTkk BEwk1vefZIGwxSQu3FvP1sXIxSEksJRRYtW3P4wQTh+TxOaGm2wgVWwChhJdb7uAbA4OEQE3 iVn/WUFqmAX2MklcfTURrEZYwENi9aa/zCA2i4CqxPZN/9hBbF6g+IGmaewQ2+Qk/r9cwQRi cwp4Suy5ehAsLgRUs//7FqYJjLwLGBlWMYqmliYXFCel5xrqFSfmFpfmpesl5+duYoSE3Jcd jIuPWR1iFOBgVOLhbVyxIViINbGsuDL3EKMEB7OSCC972qZgId6UxMqq1KL8+KLSnNTiQ4xM HJxSDYxal23XxUac43553zrju0MCr2VB1wIvfsNaX8M9+lNqu12VrNJXnZdvWdAvEqt5Rs9H TKBwfhuverAo99vKn4yygdc3vPkuLiHmHsUoNeHy1inn1kw8OSddwEbDUOBt+7KHb/V+vvQ+ mXKsc+bewvmmIhoOc619l3+devOSgfyMEp5Tbm0/k5VYijMSDbWYi4oTAQJ5q9IXAgAA 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, T_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 This patch adds support for domain-always-on property to Exynos power domain driver. Domains with this property as always kept enabled. Signed-off-by: Marek Szyprowski --- Documentation/devicetree/bindings/arm/exynos/power_domain.txt | 2 ++ arch/arm/mach-exynos/pm_domains.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt index 5216b419016a..b25d9b1ce471 100644 --- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt +++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt @@ -8,6 +8,8 @@ Required Properties: * samsung,exynos4210-pd - for exynos4210 type power domain. - reg: physical base address of the controller and length of memory mapped region. +Optional properties: +- domain-always-on: keeps the domain always enabled Node of a device using power domains must have a samsung,power-domain property defined with a phandle to respective power domain. diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index fe6570ebbdde..279b008de02f 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c @@ -151,6 +151,7 @@ static __init int exynos4_pm_init_power_domain(void) struct device_node *np; for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") { + struct dev_power_governor *gov = NULL; struct exynos_pm_domain *pd; int on; @@ -163,6 +164,9 @@ static __init int exynos4_pm_init_power_domain(void) return -ENOMEM; } + if (of_property_read_bool(np, "domain-always-on")) + gov = &pm_domain_always_on_gov; + pd->pd.name = kstrdup(np->name, GFP_KERNEL); pd->name = pd->pd.name; pd->base = of_iomap(np, 0); @@ -174,7 +178,7 @@ static __init int exynos4_pm_init_power_domain(void) on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN; - pm_genpd_init(&pd->pd, NULL, !on); + pm_genpd_init(&pd->pd, gov, !on); } bus_register_notifier(&platform_bus_type, &platform_nb);