From patchwork Tue Mar 4 11:07:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 3761151 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 066629F1EE for ; Tue, 4 Mar 2014 11:07:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2FDA12041A for ; Tue, 4 Mar 2014 11:07:48 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 151C6201F4 for ; Tue, 4 Mar 2014 11:07:47 +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 1WKnCC-0008HW-Tv; Tue, 04 Mar 2014 11:07:37 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WKnCA-0008JB-GN; Tue, 04 Mar 2014 11:07:34 +0000 Received: from sauhun.de ([89.238.76.85] helo=pokefinder.org) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WKnC7-0008I6-C6 for linux-arm-kernel@lists.infradead.org; Tue, 04 Mar 2014 11:07:32 +0000 Received: from p4fe24c9d.dip0.t-ipconnect.de ([79.226.76.157]:48142 helo=localhost) by pokefinder.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1WKnBj-0008KC-VZ; Tue, 04 Mar 2014 12:07:08 +0100 Date: Tue, 4 Mar 2014 12:07:06 +0100 From: Wolfram Sang To: Laurent Pinchart Subject: Re: [PATCH 3/4] clk: shmobile: add CPG driver for rz-platforms Message-ID: <20140304110706.GA12727@katana> References: <1393621768-12568-1-git-send-email-wsa@the-dreams.de> <1722697.3h0GnbWuD3@avalon> <20140303162731.GA3732@katana> <2207635.bd10VfTU6U@avalon> MIME-Version: 1.0 In-Reply-To: <2207635.bd10VfTU6U@avalon> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140304_060731_511276_90748553 X-CRM114-Status: GOOD ( 21.56 ) X-Spam-Score: -1.9 (-) Cc: Mike Turquette , linux-sh@vger.kernel.org, Magnus Damm , Wolfram Sang , Simon Horman , 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.2 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 > > > While the parent is indeed selected at boot time only, and only one parent > > > is thus needed, parent selection could be performed by a DIP switch > > > connected to MD_CLK on the board for instance. In that case both parents > > > should be available in DT, as selection will be done by the kernel at > > > boot time, not at DT compile time. > > > > OK, I understand the case. I still wonder about specifying two parents, > > though. If a board uses USB_X1, it then has to spefify a dummy EXTAL > > clock (or an empty one), just because USB_X1 is enumerated as second > > entry? > > That's a good question. Mike, would it be possible to support "holes" in the > DT clocks lists, like the GPIO DT bindings do ? I am currently playing with the status property for clocks, so we can "disable" clocks. Opinions? From: Wolfram Sang Subject: [PATCH] clk: allow clocks to use the 'status' property Similar to platform devices, this allows us to set up the clock hierarchy in dtsi files and enable the used clocks in the board file later. Signed-off-by: Wolfram Sang --- drivers/clk/clk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 5517944..0045f55 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2542,6 +2542,9 @@ void __init of_clk_init(const struct of_device_id *matches) matches = &__clk_of_table; for_each_matching_node_and_match(np, matches, &match) { + if (!of_device_is_available(np)) + continue; + of_clk_init_cb_t clk_init_cb = match->data; clk_init_cb(np); }