From patchwork Tue Aug 5 10:47:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 34911 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f198.google.com (mail-pd0-f198.google.com [209.85.192.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1536220523 for ; Tue, 5 Aug 2014 10:49:17 +0000 (UTC) Received: by mail-pd0-f198.google.com with SMTP id fp1sf4519740pdb.5 for ; Tue, 05 Aug 2014 03:49:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=gt9JNwTw3Ts+fU2/X+5IMdrU5bsSY6kTdBaUNSZSTfo=; b=NoG4DGmdyx0/I07PodB92sQYouj7qYJRMn61RkBB6/WnDasg7nEYN4+qi+PrIcaHcX Z5viiXMH4Sj8jbrGl7sa+2M9dSJ+qcwk1T0fCR027gCDgfJmUYEcRPe4ICmQr74qYOFF finYCfbv4SBY5jT7ZQAh+JLnEv16q13jJ5p+BbVzJcH8s1HpeCyoEJxyA5X7bg/jHJr0 wbNu9mrRDg+xLR5U2VBQ2PZe/+lI27Ae3fycwJGoIyq6wqwdyqEsHPE+fQRsWVXnpFjV O9kAh3jUHacQw/d5WIFv3/O/JYrMtQDvpZiv0kIDyS93YXYHv6CcpZCLykjsiSXC65rO RKUw== X-Gm-Message-State: ALoCoQnSfrOjWAOrsxypUoQOT/GmcArbfn2GAHcihbL2i2DMw0eAZj5Sk6+kNYBAhM1JXv+N1SJp X-Received: by 10.66.160.164 with SMTP id xl4mr531148pab.48.1407235751623; Tue, 05 Aug 2014 03:49:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.174 with SMTP id m43ls232388qga.84.gmail; Tue, 05 Aug 2014 03:49:11 -0700 (PDT) X-Received: by 10.220.116.196 with SMTP id n4mr2447873vcq.6.1407235751504; Tue, 05 Aug 2014 03:49:11 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id q6si776330vey.71.2014.08.05.03.49.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Aug 2014 03:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hy4so1091873vcb.22 for ; Tue, 05 Aug 2014 03:49:11 -0700 (PDT) X-Received: by 10.52.144.232 with SMTP id sp8mr821926vdb.61.1407235751400; Tue, 05 Aug 2014 03:49:11 -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 tc5csp374546vcb; Tue, 5 Aug 2014 03:49:11 -0700 (PDT) X-Received: by 10.224.40.145 with SMTP id k17mr4444983qae.4.1407235750935; Tue, 05 Aug 2014 03:49:10 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id m6si2138646qag.85.2014.08.05.03.49.10 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 Aug 2014 03:49:10 -0700 (PDT) Received-SPF: none (google.com: linaro-mm-sig-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XEcIn-0005GA-MV; Tue, 05 Aug 2014 10:49:09 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XEcIb-0005Ec-20 for linaro-mm-sig@lists.linaro.org; Tue, 05 Aug 2014 10:48:57 +0000 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 <0N9T008BJY1DA700@mailout3.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Tue, 05 Aug 2014 11:48:50 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-9c-53e0b692c947 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 87.0C.25543.296B0E35; Tue, 05 Aug 2014 11:48:50 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N9T0057MY17SE80@eusync3.samsung.com>; Tue, 05 Aug 2014 11:48:50 +0100 (BST) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Tue, 05 Aug 2014 12:47:30 +0200 Message-id: <1407235677-26324-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1407235677-26324-1-git-send-email-m.szyprowski@samsung.com> References: <1407235677-26324-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBLMWRmVeSWpSXmKPExsVy+t/xq7qTtj0INtj6R83i76Rj7BbNi9ez WUy6P4HFYsF+a4vO2RvYLXoXXGWzONv0ht2ic+ISdosvVx4yWWx6fI3V4vKuOWwWM87vY7JY e+Quu8Wp65/ZLP71HmS0OHP6EqvF/z072C0Ov2lntTjycDe7xapdfxgtbv/mcxD1eHJwHpPH 71+TGD12zrrL7jG7Yyarx6ZVnWwe++euYffYvKTe4/a/x8wek28sZ/S4cqKJ1aO3+R2bx5ar 7SwefVtWMXp83iQXwBfFZZOSmpNZllqkb5fAlfFnxX2mgj6eipdrfzE2MHZydTFyckgImEi8 2HiMDcIWk7hwbz2QzcUhJLCUUWLOvhtQTh+TxLJnH5lAqtgEDCW63naBJUQEehkl+pt+MIE4 zALrWCX2915nAakSFgiRmLewEWwui4CqxL2l01lBbF4BD4m+Q/NYIfbJSfx/uQJsKqeAp8Th mwfA4kJANT83rGGfwMi7gJFhFaNoamlyQXFSeq6hXnFibnFpXrpecn7uJkZI7HzZwbj4mNUh RgEORiUeXoPTd4OFWBPLiitzDzFKcDArifBKrHkQLMSbklhZlVqUH19UmpNafIiRiYNTqoHR cYF+5PZTlt3G+/r0H7hFhkQ3l+tcbL8W7tky+1m/bY5a60+9aTM9cy7J+j/y3vZq9fZbaSlh C4X1Py+paXJ5N1dDKHP5pj2zqrarl2cbKi41nO/34/mfq+pdV56Zr3syxfTbn7plERd/8wUs Sv+/ceaNmT8+X538qHDK37mapyP86wM0n970VmIpzkg01GIuKk4EAMYdoxF7AgAA Cc: Rob Herring , Thierry Reding , Shaik Ameer Basha , Arnd Bergmann , Inki Dae , Greg Kroah-Hartman , Joerg Roedel , "Rafael J. Wysocki" , Tomasz Figa , linaro-mm-sig@lists.linaro.org, Kyungmin Park , Kukjin Kim , Laurent Pinchart , Sylwester Nawrocki , Olof Johansson , Cho KyongHo Subject: [Linaro-mm-sig] [PATCH 02/29] ARM: Exynos: bind power domains earlier, on device creation X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-mm-sig-bounces@lists.linaro.org Sender: linaro-mm-sig-bounces@lists.linaro.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.177 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 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 fd76e1b..1d368a2 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; }