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: 32850 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 54A99203C0 for ; Tue, 1 Jul 2014 08:10:40 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id rl12sf2161405iec.5 for ; Tue, 01 Jul 2014 01:10:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=n+wKuX5OL7jHyC8g6+5t9aoiRSjWLqqItSqjtj6J1Vo=; b=crmoGfsQMDq1Zf8gLi3sNVajMARCkeukdnHcuOw3bsvxAy5MlivNqu3YL4dFRz9l+N Msecifdg5djXDDbgINq6DvRDtqIbdF339/RPE9VYblDOUNzXntvyB+EyaR4f3cSdGYI6 jIiXZ+5PguDNXlYaqPbDpqP0YXcritrSBH0yQ1koHzfQoxVkKYERMLdwgtO8N2jKJ6OU KfU2wmJFc5qr4joEZWnwTo5ZBEqt2rTWohQ3/8WQQEH8pieqGfKA/nBTudu+BLGaYcNg fxiCe4cAWUYSG3Q0oqlRAXiZXghgfRn2l+91WCYIf3/n7Emp9OqZma8qug+4z5RaJDx9 mEPQ== X-Gm-Message-State: ALoCoQkqJofwA8/mRBe26RFK5hr/6rG5PW/CxCWn2VPpVjub0diVNRrmhRNNhNfhDgS57u/2PmXA X-Received: by 10.50.73.197 with SMTP id n5mr2571763igv.1.1404202239848; Tue, 01 Jul 2014 01:10:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.17 with SMTP id z17ls719835qge.74.gmail; Tue, 01 Jul 2014 01:10:39 -0700 (PDT) X-Received: by 10.52.117.209 with SMTP id kg17mr34958024vdb.28.1404202239697; Tue, 01 Jul 2014 01:10:39 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id pz7si11134898vcb.5.2014.07.01.01.10.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Jul 2014 01:10:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id id10so8595494vcb.2 for ; Tue, 01 Jul 2014 01:10:39 -0700 (PDT) X-Received: by 10.58.235.130 with SMTP id um2mr2259442vec.18.1404202239600; Tue, 01 Jul 2014 01:10:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp197868vcb; Tue, 1 Jul 2014 01:10:39 -0700 (PDT) X-Received: by 10.50.70.99 with SMTP id l3mr15534261igu.1.1404202239035; Tue, 01 Jul 2014 01:10:39 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id so9si25090523pac.191.2014.07.01.01.10.38; Tue, 01 Jul 2014 01:10:38 -0700 (PDT) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757410AbaGAIKh (ORCPT + 8 others); 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: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);