Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753570Ab3H0XNe (ORCPT ); Tue, 27 Aug 2013 19:13:34 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:55888 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752430Ab3H0XNc convert rfc822-to-8bit (ORCPT ); Tue, 27 Aug 2013 19:13:32 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Sebastian Hesselbarth , Sebastian Hesselbarth From: Mike Turquette In-Reply-To: <1377638890-371-5-git-send-email-sebastian.hesselbarth@gmail.com> Cc: Sebastian Hesselbarth , Rob Herring , Russell King , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1376964271-22715-1-git-send-email-sebastian.hesselbarth@gmail.com> <1377638890-371-5-git-send-email-sebastian.hesselbarth@gmail.com> Message-ID: <20130827231326.8231.21675@quantum> User-Agent: alot/0.3.4 Subject: Re: [PATCH RFC v2 04/16] ARM: highbank: remove custom .init_time hook Date: Tue, 27 Aug 2013 16:13:26 -0700 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4231 Lines: 120 Quoting Sebastian Hesselbarth (2013-08-27 14:27:58) > With arch/arm calling of_clk_init(NULL) from time_init(), we can now > remove custom .init_time hooks. Highbank clock provider need a reference > to system registers, as a workaround current clk driver maps those > independent of arch code now. > > Signed-off-by: Sebastian Hesselbarth > Acked-by: Rob Herring Acked-by: Mike Turquette > --- > Cc: Rob Herring > Cc: Mike Turquette > Cc: Russell King > Cc: Arnd Bergmann > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > --- > arch/arm/mach-highbank/highbank.c | 23 +++++++---------------- > drivers/clk/clk-highbank.c | 10 +++++++--- > 2 files changed, 14 insertions(+), 19 deletions(-) > > diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c > index 8881579..fa36d14 100644 > --- a/arch/arm/mach-highbank/highbank.c > +++ b/arch/arm/mach-highbank/highbank.c > @@ -27,7 +27,6 @@ > #include > #include > #include > -#include > > #include > #include > @@ -88,20 +87,6 @@ static void __init highbank_init_irq(void) > #endif > } > > -static void __init highbank_timer_init(void) > -{ > - struct device_node *np; > - > - /* Map system registers */ > - np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); > - sregs_base = of_iomap(np, 0); > - WARN_ON(!sregs_base); > - > - of_clk_init(NULL); > - > - clocksource_of_init(); > -} > - > static void highbank_power_off(void) > { > highbank_set_pwr_shutdown(); > @@ -160,6 +145,13 @@ static struct notifier_block highbank_platform_nb = { > > static void __init highbank_init(void) > { > + struct device_node *np; > + > + /* Map system registers */ > + np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); > + sregs_base = of_iomap(np, 0); > + WARN_ON(!sregs_base); > + > pm_power_off = highbank_power_off; > highbank_pm_init(); > > @@ -178,7 +170,6 @@ static const char *highbank_match[] __initconst = { > DT_MACHINE_START(HIGHBANK, "Highbank") > .smp = smp_ops(highbank_smp_ops), > .init_irq = highbank_init_irq, > - .init_time = highbank_timer_init, > .init_machine = highbank_init, > .dt_compat = highbank_match, > .restart = highbank_restart, > diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c > index 2e08cb0..2e7e9d9 100644 > --- a/drivers/clk/clk-highbank.c > +++ b/drivers/clk/clk-highbank.c > @@ -20,8 +20,7 @@ > #include > #include > #include > - > -extern void __iomem *sregs_base; > +#include > > #define HB_PLL_LOCK_500 0x20000000 > #define HB_PLL_LOCK 0x10000000 > @@ -280,6 +279,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk > const char *clk_name = node->name; > const char *parent_name; > struct clk_init_data init; > + struct device_node *srnp; > int rc; > > rc = of_property_read_u32(node, "reg", ®); > @@ -290,7 +290,11 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk > if (WARN_ON(!hb_clk)) > return NULL; > > - hb_clk->reg = sregs_base + reg; > + /* Map system registers */ > + srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); > + hb_clk->reg = of_iomap(srnp, 0); > + BUG_ON(!hb_clk->reg); > + hb_clk->reg += reg; > > of_property_read_string(node, "clock-output-names", &clk_name); > > -- > 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/