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: 3761141 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 70B1CBF13A for ; Tue, 4 Mar 2014 11:07:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C41E1203B6 for ; Tue, 4 Mar 2014 11:07:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7477D201F4 for ; Tue, 4 Mar 2014 11:07:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756737AbaCDLHL (ORCPT ); Tue, 4 Mar 2014 06:07:11 -0500 Received: from sauhun.de ([89.238.76.85]:55610 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756239AbaCDLHL (ORCPT ); Tue, 4 Mar 2014 06:07:11 -0500 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 Cc: linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Magnus Damm , Simon Horman , Mike Turquette , Wolfram Sang 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 Content-Disposition: inline In-Reply-To: <2207635.bd10VfTU6U@avalon> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham 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); }