From patchwork Mon Oct 14 17:32:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 3037861 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6FFEE9F2B6 for ; Mon, 14 Oct 2013 17:33:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 349A320204 for ; Mon, 14 Oct 2013 17:33:36 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C6A0201B7 for ; Mon, 14 Oct 2013 17:33:35 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VVm1I-0004Qo-PB; Mon, 14 Oct 2013 17:33:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VVm1G-0006M8-Ac; Mon, 14 Oct 2013 17:33:26 +0000 Received: from mail-pa0-f41.google.com ([209.85.220.41]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VVm1D-0006LJ-2X for linux-arm-kernel@lists.infradead.org; Mon, 14 Oct 2013 17:33:24 +0000 Received: by mail-pa0-f41.google.com with SMTP id bj1so7835810pad.14 for ; Mon, 14 Oct 2013 10:33:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=Rukd/3hm0LhzTmyOyhakD+g9XeKRhirhCYSyX9ACMNY=; b=EeI+b3yFCOJ/40eSIN7RRpG75YeDnSp2K+Gpim3RHBg+vjkTAhFN8crkZlKhd+StTm MlFmWmiVnkoB9YW4gBe/4+3B+5BvdXN9fDs9I9VkzPObdJ989zhXmm9mfCvDAo9kSdep 9k/PbA8o2t0STL9L4tRS9EwTATbb7kULFzvpUbRnE8BnEI+M8sfiaOMF9ZJD3k+D+jMK qzOVhMhaUK6Gdv5I3PfDqy9YzWEa+WcUbO8iswhVIcmi+B5yMZ9kabV9ebxUwwAKL4yI EAvrgpa238YsKu1Pu1kqx5PxtEZejWjvqB7gGZrPN6CE+2hz1J/n6AwlwAsopVelUGZH W1JQ== X-Gm-Message-State: ALoCoQk6D65qzPNCkibFQ2FAXs3am7xChD0+0f2rRY2P6xjyx5AMbITcn8Eox8+VDuzKyLEjlCf3 X-Received: by 10.67.23.164 with SMTP id ib4mr39245746pad.42.1381771980820; Mon, 14 Oct 2013 10:33:00 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net. [24.19.7.36]) by mx.google.com with ESMTPSA id tu6sm29535244pbc.41.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Oct 2013 10:32:59 -0700 (PDT) From: Kevin Hilman To: Santosh Shilimkar Subject: Re: [PATCH v2 4/4] ARM: keystone: add PM bus support for clock management References: <1377819404-9671-1-git-send-email-santosh.shilimkar@ti.com> <1377819404-9671-5-git-send-email-santosh.shilimkar@ti.com> <5257431A.5090301@ti.com> Date: Mon, 14 Oct 2013 10:32:57 -0700 In-Reply-To: <5257431A.5090301@ti.com> (Santosh Shilimkar's message of "Thu, 10 Oct 2013 20:15:22 -0400") Message-ID: <87hacj92ra.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131014_133323_189838_7EED4864 X-CRM114-Status: GOOD ( 20.71 ) X-Spam-Score: -2.6 (--) Cc: arm@kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Santosh Shilimkar writes: > On Thursday 29 August 2013 07:36 PM, Santosh Shilimkar wrote: >> Add runtime PM core support to Keystone SOCs by using the pm_clk >> infrastructure of the PM core. Patch is based on Kevin's pm_domain >> work on DaVinci SOCs. >> >> Keystone SOC doesn't have depedency to enable clocks in early >> in the boot and hence the clock and PM bus initialisation is done >> at subsys_init() level. >> >> Cc: Kevin Hilman >> >> Signed-off-by: Santosh Shilimkar >> --- > For record, updated patch end of the email as discussed here [1] Unfortunately, this one broke boot for muilti_v7_defconfig: http://lists.linaro.org/pipermail/kernel-build-reports/2013-October/000652.html [...] > +int __init keystone_pm_runtime_init(void) > +{ > + of_clk_init(NULL); > + pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier); > + > + return 0; > +} > +subsys_initcall(keystone_pm_runtime_init); The reason is this initcall which runs on *all* platforms, so needs some sort of platform specific check. The patch below does the trick, but I'm not sure if you want to match on something more specific for this check. If you're OK, with this, I'll add it to next/soc with your ack. Kevin From 435ed298c804048548276b60fd5efdf697f6b82f Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Mon, 14 Oct 2013 10:30:11 -0700 Subject: [PATCH] ARM: keystone: fix PM domain initcall to be keystone only initcalls need to have platform specific checks so they are not run in multi-platform builds. Cc: Santosh Shilimkar Signed-off-by: Kevin Hilman Acked-by: Santosh Shilimkar --- arch/arm/mach-keystone/pm_domain.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-keystone/pm_domain.c b/arch/arm/mach-keystone/pm_domain.c index beac3fb..2962523 100644 --- a/arch/arm/mach-keystone/pm_domain.c +++ b/arch/arm/mach-keystone/pm_domain.c @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef CONFIG_PM_RUNTIME static int keystone_pm_runtime_suspend(struct device *dev) @@ -60,8 +61,19 @@ static struct pm_clk_notifier_block platform_domain_notifier = { .pm_domain = &keystone_pm_domain, }; +static struct of_device_id of_keystone_table[] = { + {.compatible = "ti,keystone"}, + { /* end of list */ }, +}; + int __init keystone_pm_runtime_init(void) { + struct device_node *np; + + np = of_find_matching_node(NULL, of_keystone_table); + if (!np) + return 0; + of_clk_init(NULL); pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);