From patchwork Tue Sep 16 11:54:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 37444 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 72A482057E for ; Tue, 16 Sep 2014 11:55:10 +0000 (UTC) Received: by mail-we0-f198.google.com with SMTP id p10sf3095808wes.5 for ; Tue, 16 Sep 2014 04:55:06 -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=/pJVJEOJQS6i1UyU9hqVGh/8aOKN/bX7zhfCnHGaM/U=; b=Cmq2EL/3Atk8GzzTTj3jeV2xYdELak4VMzLZoHoQaTTOGpZJY7jzakS8N059Xgtd/l pARrNxCmIrr1GrLjIl6wkPmUrgLXzJTtJnYVcncAsmDinDjUhrQ6pz0F8uSuLNTDatsH tOslRu6r6DCvEkXJaEDRqm77laed+JBpdSGZ2phZnesOIxUykqfLSJwzdzsyssxOYbVU QdoDIps+hGoZtSa6ucqNx8jFehSPVUUEOUBjYIzPvzdkTe/zXqI4NTZbtcAj2Or6CnyB 8x5tjJgs+txh77V6jHVBLq6NTORYfD47vWsavGdQ69zx4H/jE02Pegns9apg5TdcwTXx A8OQ== X-Gm-Message-State: ALoCoQl0OYNIOs8eHNJ3RI+7sbLP4K5cBhW83EuVJ0KEBrZUjrVSHQDlpSlAbZ0nsYS9WkGWmqQ6 X-Received: by 10.152.3.134 with SMTP id c6mr481119lac.5.1410868506508; Tue, 16 Sep 2014 04:55:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.80 with SMTP id v16ls221184laz.21.gmail; Tue, 16 Sep 2014 04:55:06 -0700 (PDT) X-Received: by 10.153.5.9 with SMTP id ci9mr11592003lad.75.1410868506276; Tue, 16 Sep 2014 04:55:06 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) by mx.google.com with ESMTPS id p1si23763345lap.104.2014.09.16.04.55.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Sep 2014 04:55:04 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id ge10so6781735lab.12 for ; Tue, 16 Sep 2014 04:55:04 -0700 (PDT) X-Received: by 10.152.7.8 with SMTP id f8mr35773995laa.27.1410868504057; Tue, 16 Sep 2014 04:55:04 -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.112.130.169 with SMTP id of9csp374259lbb; Tue, 16 Sep 2014 04:55:03 -0700 (PDT) X-Received: by 10.66.251.40 with SMTP id zh8mr49646377pac.6.1410868502454; Tue, 16 Sep 2014 04:55:02 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dw7si13274669pab.96.2014.09.16.04.55.01 for ; Tue, 16 Sep 2014 04:55:02 -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 S1754323AbaIPLzA (ORCPT + 6 others); Tue, 16 Sep 2014 07:55:00 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:62696 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753206AbaIPLy6 (ORCPT ); Tue, 16 Sep 2014 07:54:58 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NBZ006F0T86GHB0@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Tue, 16 Sep 2014 12:57:42 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-a1-5418250eee2b Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id BF.28.25543.E0528145; Tue, 16 Sep 2014 12:54:54 +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 <0NBZ00CMIT3CL960@eusync2.samsung.com>; Tue, 16 Sep 2014 12:54:54 +0100 (BST) 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 v2 02/18] arm: exynos: bind power domains earlier, on device creation Date: Tue, 16 Sep 2014 13:54:29 +0200 Message-id: <1410868485-4143-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1410868485-4143-1-git-send-email-m.szyprowski@samsung.com> References: <1410868485-4143-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsVy+t/xK7p8qhIhBheP8lr8nXSM3WLiysnM FpPuT2CxWLDf2qJz9gZ2i94FV9kszja9YbfonLiE3eLLlYdMFpseX2O1mHF+H5PF2iN32S1O Xf/MZvGv9yCjxf89O9gtjjzczW6xatcfRovbv/ksXn48weIg7PHk4DwmjzXz1jB6/P41idFj 56y77B6zO2ayemxeoeWxaVUnm8fmJfUet/89ZvaYfGM5o8eVE02sHr3N79g8+rasYvT4vEku gC+KyyYlNSezLLVI3y6BK2PX6nlsBTN4Kl6t2M/YwDiZq4uRk0NCwETi3vzVLBC2mMSFe+vZ uhi5OIQEljJK9K5Yzw7h9DFJ7Nu6lx2kik3AUKLrbRcbiC0ikC/xYu9fsG5mgTcsEvc2GYLY wgLhEodO/mMEsVkEVCW2tE5jArF5BdwlNjW8ZYbYJifx/+UKsDingIfE5LYnYHEhoJqP304x TWDkXcDIsIpRNLU0uaA4KT3XUK84Mbe4NC9dLzk/dxMjJEK+7GBcfMzqEKMAB6MSD2/GP/EQ IdbEsuLK3EOMEhzMSiK8GooSIUK8KYmVValF+fFFpTmpxYcYmTg4pRoYU/S6Oxb6KwXlxU76 x2D++IPW/afhYfcTFTZYVXT9WuR78Q+DxN4dkbwqzY8dXLeXyZ/2P5GsaB3pIB5mcK9wut23 hL+1x/k6Z1ZprbZ695D95/1psnOulAjsnc3+uOjQvx1vDh5d0uDpOn0964Y3X8Ubpydv3rH2 05xXbo+vFkx0/5e4xdzinxJLcUaioRZzUXEiAB67GeBuAgAA 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=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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 patches change initialization time of power domain driver from client device driver bind to device creation. This lets other core drivers to register power domain notifiers before client driver is bound. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/pm_domains.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index fd76e1b5a471..1d368a26528c 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c @@ -159,13 +159,13 @@ static int exynos_pm_notifier_call(struct notifier_block *nb, struct device *dev = data; switch (event) { - case BUS_NOTIFY_BIND_DRIVER: + case BUS_NOTIFY_ADD_DEVICE: if (dev->of_node) exynos_read_domain_from_dt(dev); break; - case BUS_NOTIFY_UNBOUND_DRIVER: + case BUS_NOTIFY_DEL_DEVICE: exynos_remove_device_from_domain(dev); break; @@ -177,6 +177,13 @@ static struct notifier_block platform_nb = { .notifier_call = exynos_pm_notifier_call, }; +static int exynos_pm_domain_add(struct device *dev, void *priv) +{ + if (dev->of_node) + exynos_read_domain_from_dt(dev); + return 0; +} + static __init int exynos4_pm_init_power_domain(void) { struct platform_device *pdev; @@ -236,6 +243,7 @@ no_clk: } bus_register_notifier(&platform_bus_type, &platform_nb); + bus_for_each_dev(&platform_bus_type, NULL, NULL, exynos_pm_domain_add); return 0; }