From patchwork Thu Aug 1 14:25:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 2837079 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9EE0EC0319 for ; Thu, 1 Aug 2013 14:25:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5EA420221 for ; Thu, 1 Aug 2013 14:25:53 +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 6BE9A2021F for ; Thu, 1 Aug 2013 14:25:52 +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 1V4tp4-00080G-BP; Thu, 01 Aug 2013 14:25:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V4tp2-0002T7-78; Thu, 01 Aug 2013 14:25:44 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V4toy-0002SH-Su for linux-arm-kernel@lists.infradead.org; Thu, 01 Aug 2013 14:25:41 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r71EPFoN000863; Thu, 1 Aug 2013 09:25:15 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r71EPFpg011846; Thu, 1 Aug 2013 09:25:15 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Thu, 1 Aug 2013 09:25:14 -0500 Received: from [128.247.91.59] (kahuna.am.dhcp.ti.com [128.247.91.59]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r71EPESw011018; Thu, 1 Aug 2013 09:25:15 -0500 Message-ID: <51FA6FCA.3050900@ti.com> Date: Thu, 1 Aug 2013 09:25:14 -0500 From: Nishanth Menon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tero Kristo Subject: Re: [PATCHv4 05/33] CLK: omap: add DT duplicate clock registration mechanism References: <1374564028-11352-1-git-send-email-t-kristo@ti.com> <1374564028-11352-6-git-send-email-t-kristo@ti.com> <51F808A8.6000503@ti.com> <51F8E1F5.20706@ti.com> In-Reply-To: <51F8E1F5.20706@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130801_102541_028190_F7DC560F X-CRM114-Status: GOOD ( 17.87 ) X-Spam-Score: -8.4 (--------) Cc: paul@pwsan.com, khilman@linaro.org, mturquette@linaro.org, tony@atomide.com, devicetree-discuss@lists.ozlabs.org, rnayak@ti.com, linux-omap@vger.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=-5.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 On 07/31/2013 05:07 AM, Tero Kristo wrote: > On 07/30/2013 09:40 PM, Nishanth Menon wrote: >> On 07/23/2013 02:20 AM, Tero Kristo wrote: >>> Some devices require their clocks to be available with a specific >>> dev-id con-id mapping. With DT, the clocks can be found by default >>> only with their name, or alternatively through the device node of >>> the consumer. With drivers, that don't support DT fully yet, add >>> mechanism to register specific clock names. >>> >>> Signed-off-by: Tero Kristo >> >> with this, should it not be enough to add clocks=<&phandle> > > Don't know, I am not an expert on DT. :) That is the usage - Documentation/devicetree/bindings/clock/clock-bindings.txt > >> >> I am not sure I understand what specific drivers should need to carry >> this "old hack" forward. More importantly, why is it preferable to carry >> the hack forward rather than fixing the drivers. > > At least the GP timer seems to need this, and I don't want to touch / > verify all the potential drivers touched by this so it is easier to > provide a (semi) temporary tweak. I see that GP timer nodes seem to be already device tree converted, at least I see the nodes in SoC.dtsi Do we know what is going on for these that need these temporary devices? can we do a special node property for these? I think the entire problem is coz of timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh)); in case of even of_populated. if we can get rid of usage of omap_hwmod_get_main_clk by catching them with [1], then we can force the drivers to pick up based on device node clocks= property. It might be easier to fix 1 driver - timer, rather than introduce am33x, omap4, omap5 dra7 specific "SoC clk driver". with that this entire patch becomes redundant. [1] } diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index da26659..2e90ab4 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -4153,5 +4153,10 @@ const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh) if (!oh) return NULL; + if (!of_have_populated_dt()) { + WARN(1, "%s hwmod clk node read with OF?:FIXME!\n", + oh->name); + } + return oh->main_clk;