From patchwork Wed Nov 19 11:15:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 41132 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 46F0620CBB for ; Wed, 19 Nov 2014 11:16:35 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id c13sf545356eek.6 for ; Wed, 19 Nov 2014 03:16:34 -0800 (PST) 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=8AUwAY2TDUOr2eUv+G5wm1TsaVyyLRnwxYUtRdCOlMg=; b=G1cAEx432g5bR12zliMX7ZtRzlXK0cjsAbvM7ZxL3xx9bz3SfkuTtrdAGeOVOAQQCi g2J4ZHc13mswbW3pLDwvbH6Y1IZP80jjgrP5/0fxtcOOuG4MTZUPCSulKO21ENE+1CEa 0gNXIDgQ5uxrat1XrO4Zwn5ZedABbYpjEHdAEWUd3zQ1aU0rdbcD6/JrBcemZmy5VZxG pE2XnJdDAwonErZfim5lHU2Uuhv+KczFOYMeFMNLJCdrQ8ImJooLPfJRHPThB/netivM FMnFnJP/aFwnrQb22T/gxVNahO9SxyXVGu7aM9Pl4Xe+HK4MAfyg2pwBac4Gl+fR6DP+ 1sVQ== X-Gm-Message-State: ALoCoQnlVn/MOY1mUtyUBp7vLx66jVcrYqIeFfMFxDbmT+YauzQYkRHGVZkBv0ptFqh9EqAoFizX X-Received: by 10.112.169.68 with SMTP id ac4mr24822lbc.24.1416395794592; Wed, 19 Nov 2014 03:16:34 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.121.72 with SMTP id li8ls1499699lab.101.gmail; Wed, 19 Nov 2014 03:16:34 -0800 (PST) X-Received: by 10.112.161.202 with SMTP id xu10mr1261250lbb.94.1416395794445; Wed, 19 Nov 2014 03:16:34 -0800 (PST) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id x9si1464382lax.57.2014.11.19.03.16.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Nov 2014 03:16:34 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id 10so293445lbg.7 for ; Wed, 19 Nov 2014 03:16:34 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr4677094lbc.66.1416395794330; Wed, 19 Nov 2014 03:16:34 -0800 (PST) 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.112.184.201 with SMTP id ew9csp64275lbc; Wed, 19 Nov 2014 03:16:33 -0800 (PST) X-Received: by 10.70.48.199 with SMTP id o7mr11731394pdn.97.1416395789783; Wed, 19 Nov 2014 03:16:29 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xo9si2087857pbc.210.2014.11.19.03.16.29 for ; Wed, 19 Nov 2014 03:16:29 -0800 (PST) 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 S1754183AbaKSLQ2 (ORCPT + 4 others); Wed, 19 Nov 2014 06:16:28 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:23330 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204AbaKSLQ1 (ORCPT ); Wed, 19 Nov 2014 06:16:27 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFA00KPXA46BZ40@mailout3.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 19 Nov 2014 11:19:18 +0000 (GMT) X-AuditID: cbfec7f4-b7f6c6d00000120b-87-546c7c0920a5 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 0D.E6.04619.90C7C645; Wed, 19 Nov 2014 11:16:25 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NFA00GC59YMTL30@eusync1.samsung.com>; Wed, 19 Nov 2014 11:16:25 +0000 (GMT) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , linaro-mm-sig@lists.linaro.org, Arnd Bergmann , Shaik Ameer Basha , Cho KyongHo , Joerg Roedel , Thierry Reding , Olof Johansson , Laurent Pinchart , Rob Herring , Will Deacon , David Wodhouse , Inki Dae , Kukjin Kim , Tomasz Figa , Kyungmin Park Subject: [PATCH v3 05/19] arm: exynos: pm_domains: add support for devices registered before arch_initcall Date: Wed, 19 Nov 2014 12:15:34 +0100 Message-id: <1416395748-10731-6-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> References: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsVy+t/xy7qcNTkhBidaBS3+TjrGbjFx5WRm i0n3J7BYLNhvbdE5ewO7Re+Cq2wWZ5vesFt0TlzCbvHlykMmi02Pr7FazDi/j8li7ZG77Ban rn9ms/jXe5DR4v+eHewWRx7uZrdYtesPo8Xt33wWLz+eYHEQ9nhycB6Tx5p5axg9fv+axOix c9Zddo/ZHTNZPTav0PLYtKqTzWPzknqP2/8eM3tMvrGc0ePKiSZWj97md2wefVtWMXp83iQX wBfFZZOSmpNZllqkb5fAlbF+4i7mglWcFVuO2DcwfmXvYuTkkBAwkdh8+TCULSZx4d56ti5G Lg4hgaWMEm8uPWKGcPqYJFo3zwerYhMwlOh628UGYosI5Eu82PuXBcRmFnjDInFvkyGILSyQ I7H33yOwOIuAqsTF1pNg9bwCHhLvt11nhtgmJ/H/5QqmLkYODk4BT4nrL8DKhYBKmqavY53A yLuAkWEVo2hqaXJBcVJ6rqFecWJucWleul5yfu4mRkh0fNnBuPiY1SFGAQ5GJR7ehuKcECHW xLLiytxDjBIczEoivMWFQCHelMTKqtSi/Pii0pzU4kOMTBycUg2Mqw26u+6vXRChtvyYqLdE wRlDY5V7Ds73mRo+aVqsaL7YMu/qoiuKkSVdtuevrj30rJFt04cd/zbxuvCd+KFrV39S6Ne8 I5++7nwlNnndCQ/h/JmzfW63C6k9r6w/tFrSZX0E36T5GUZzZ2V3y1aLpjz20XZsbzqiodT6 LlT08+vCTdoW56tjlViKMxINtZiLihMBafWzHWwCAAA= 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.217.176 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: , SYSMMU devices will be registered early before any other devices and before calling arch_initcall. To add them to respective power domains, additional scan of all platform devices is needed. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/pm_domains.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index 20f267121b3e..8f1f239ee424 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c @@ -105,6 +105,12 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain) return exynos_pd_power(domain, false); } +static __init int exynos_pd_init_platform_dev(struct device *dev, void *data) +{ + dev_pm_domain_attach(dev, true); + return 0; +} + static __init int exynos4_pm_init_power_domain(void) { struct platform_device *pdev; @@ -161,6 +167,7 @@ no_clk: of_genpd_add_provider_simple(np, &pd->pd); } - return 0; + return bus_for_each_dev(&platform_bus_type, NULL, NULL, + exynos_pd_init_platform_dev); } arch_initcall(exynos4_pm_init_power_domain);