From patchwork Thu May 28 20:52:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 6501691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 44738C0020 for ; Thu, 28 May 2015 20:55:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C04120727 for ; Thu, 28 May 2015 20:55:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ACE6020723 for ; Thu, 28 May 2015 20:55:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yy4nA-0006li-Sb; Thu, 28 May 2015 20:52:40 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yy4n6-0006c6-P3 for linux-arm-kernel@lists.infradead.org; Thu, 28 May 2015 20:52:37 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id B36251406D5; Thu, 28 May 2015 20:52:14 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id A61DC1406E3; Thu, 28 May 2015 20:52:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0B5631406D5; Thu, 28 May 2015 20:52:13 +0000 (UTC) From: Stephen Boyd To: Russell King Subject: [PATCH] amba: Support clk parents and rates assigned in DT Date: Thu, 28 May 2015 13:52:12 -0700 Message-Id: <1432846332-17692-1-git-send-email-sboyd@codeaurora.org> X-Mailer: git-send-email 2.3.0.rc1.33.g42e4583 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150528_135236_891608_450A71FA X-CRM114-Status: GOOD ( 14.21 ) X-Spam-Score: -0.0 (/) Cc: Bintian Wang , Mike Turquette , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add the call to of_clk_set_defaults() into the amba probe path so that devices on the amba bus can use the assigned rates and parents feature of the common clock framework. Signed-off-by: Stephen Boyd --- Russell, Can you please ack this change? We're going to send it through the clk tree because hisi clock requires it. Thanks, Stephen drivers/amba/bus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index f0099360039e..350ed93d4281 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -237,6 +238,10 @@ static int amba_probe(struct device *dev) int ret; do { + ret = of_clk_set_defaults(dev->of_node, false); + if (ret < 0) + break; + ret = dev_pm_domain_attach(dev, true); if (ret == -EPROBE_DEFER) break;