From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grygorii Strashko Subject: Re: [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall Date: Thu, 3 Dec 2015 18:34:40 +0200 Message-ID: <56606F20.9050805@ti.com> References: <1448900789-4034-1-git-send-email-tony@atomide.com> <1448900789-4034-3-git-send-email-tony@atomide.com> <20151203160014.GL23396@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20151203160014.GL23396@atomide.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Tony Lindgren , linux-omap@vger.kernel.org Cc: Tero Kristo , Paul Walmsley , Felipe Balbi , linux-arm-kernel@lists.infradead.org List-Id: linux-omap@vger.kernel.org On 12/03/2015 06:00 PM, Tony Lindgren wrote: > * Tony Lindgren [151130 08:29]: >> We want to be able to probe a few selected device drivers before hwmod >> code populates the clocks in omap_hwmod_setup_all(). This allows us to >> convert most of the clock drivers into regular device drivers. if understand things right, ti clks now will be populated and initialized from __omap_sync32k_timer_init - omap_clk_init() - .. - of_clk_init() - .. - omap_clk_soc_init() and __omap_sync32k_timer_init(), in turn, will be called from: arch/arm/kernel/time.c - time_init() machine_desc->init_time(); (without your patch 1). So, I don't see real dependency here between clk initialization and hwmods :( >> >> We only need a few minimal clock drivers early for the system timers to >> select between the 32KiHz clock and the high frequency oscillator. >> >> With these changes, initializing the clock drivers can be just done at >> core_initcall time with something like: >> >> np = of_find_node_by_name(NULL, "plls"); >> if (np) >> of_platform_populate(np, NULL, NULL, NULL); >> >> And then these clocks will be available for the interconnect code to use. >> >> Having most of the clock drivers being regular device drivers allows >> us to use the nice things like devm_* functions and dev_err and dev_dbg. >> As an extra bonus, this also allows us to develop the clock drivers for >> new SoCs as loadable modules initially for cases where we can boot up >> the system based on the bootloader configured clocks. >> >> To do this, let's change the core_initcalls to postcore_initcall under >> mach-omap2. > > FYI I'm applying this one into omap-for-v4.5/soc today, the first patch > in this series needs more work as discussed. > To be honest I don't see how this will help to convert ti clks in regular devices right now. Wouldn't it be better to move forward with this patch together with future patches? So it will be clear what benefits will this approach provide. In other words, I think it should be a part of some bigger series. -- regards, -grygorii From mboxrd@z Thu Jan 1 00:00:00 1970 From: grygorii.strashko@ti.com (Grygorii Strashko) Date: Thu, 3 Dec 2015 18:34:40 +0200 Subject: [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall In-Reply-To: <20151203160014.GL23396@atomide.com> References: <1448900789-4034-1-git-send-email-tony@atomide.com> <1448900789-4034-3-git-send-email-tony@atomide.com> <20151203160014.GL23396@atomide.com> Message-ID: <56606F20.9050805@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 12/03/2015 06:00 PM, Tony Lindgren wrote: > * Tony Lindgren [151130 08:29]: >> We want to be able to probe a few selected device drivers before hwmod >> code populates the clocks in omap_hwmod_setup_all(). This allows us to >> convert most of the clock drivers into regular device drivers. if understand things right, ti clks now will be populated and initialized from __omap_sync32k_timer_init - omap_clk_init() - .. - of_clk_init() - .. - omap_clk_soc_init() and __omap_sync32k_timer_init(), in turn, will be called from: arch/arm/kernel/time.c - time_init() machine_desc->init_time(); (without your patch 1). So, I don't see real dependency here between clk initialization and hwmods :( >> >> We only need a few minimal clock drivers early for the system timers to >> select between the 32KiHz clock and the high frequency oscillator. >> >> With these changes, initializing the clock drivers can be just done at >> core_initcall time with something like: >> >> np = of_find_node_by_name(NULL, "plls"); >> if (np) >> of_platform_populate(np, NULL, NULL, NULL); >> >> And then these clocks will be available for the interconnect code to use. >> >> Having most of the clock drivers being regular device drivers allows >> us to use the nice things like devm_* functions and dev_err and dev_dbg. >> As an extra bonus, this also allows us to develop the clock drivers for >> new SoCs as loadable modules initially for cases where we can boot up >> the system based on the bootloader configured clocks. >> >> To do this, let's change the core_initcalls to postcore_initcall under >> mach-omap2. > > FYI I'm applying this one into omap-for-v4.5/soc today, the first patch > in this series needs more work as discussed. > To be honest I don't see how this will help to convert ti clks in regular devices right now. Wouldn't it be better to move forward with this patch together with future patches? So it will be clear what benefits will this approach provide. In other words, I think it should be a part of some bigger series. -- regards, -grygorii