From patchwork Mon Nov 30 16:26:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 7728071 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A9FE39F39B for ; Mon, 30 Nov 2015 16:29:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8DAA2050E for ; Mon, 30 Nov 2015 16:29:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA57D20503 for ; Mon, 30 Nov 2015 16:29:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a3RIl-00064L-Ss; Mon, 30 Nov 2015 16:27:43 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a3RI9-00053f-7M for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2015 16:27:09 +0000 Received: from sampyla.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 5FE7488F2; Mon, 30 Nov 2015 16:27:33 +0000 (UTC) From: Tony Lindgren To: linux-omap@vger.kernel.org Subject: [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall Date: Mon, 30 Nov 2015 08:26:29 -0800 Message-Id: <1448900789-4034-3-git-send-email-tony@atomide.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1448900789-4034-1-git-send-email-tony@atomide.com> References: <1448900789-4034-1-git-send-email-tony@atomide.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151130_082705_569901_A73FED1C X-CRM114-Status: GOOD ( 13.29 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tero Kristo , Paul Walmsley , Grygorii Strashko , Felipe Balbi , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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, T_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 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. 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. Cc: Felipe Balbi Cc: Grygorii Strashko Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap2-restart.c | 2 +- arch/arm/mach-omap2/omap_device.c | 2 +- arch/arm/mach-omap2/omap_hwmod.c | 2 +- arch/arm/mach-omap2/serial.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/omap2-restart.c b/arch/arm/mach-omap2/omap2-restart.c index d937b2e..497269d 100644 --- a/arch/arm/mach-omap2/omap2-restart.c +++ b/arch/arm/mach-omap2/omap2-restart.c @@ -62,4 +62,4 @@ static int __init omap2xxx_common_look_up_clks_for_reset(void) return 0; } -omap_core_initcall(omap2xxx_common_look_up_clks_for_reset); +omap_postcore_initcall(omap2xxx_common_look_up_clks_for_reset); diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 72ebc4c..3750ed1 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c @@ -869,7 +869,7 @@ static int __init omap_device_init(void) bus_register_notifier(&platform_bus_type, &platform_nb); return 0; } -omap_core_initcall(omap_device_init); +omap_postcore_initcall(omap_device_init); /** * omap_device_late_idle - idle devices without drivers diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index cc8a987..49d5376 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -3307,7 +3307,7 @@ static int __init omap_hwmod_setup_all(void) return 0; } -omap_core_initcall(omap_hwmod_setup_all); +omap_postcore_initcall(omap_hwmod_setup_all); /** * omap_hwmod_enable - enable an omap_hwmod diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 5fb50fe..f164c6b 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -213,7 +213,7 @@ static int __init omap_serial_early_init(void) return 0; } -omap_core_initcall(omap_serial_early_init); +omap_postcore_initcall(omap_serial_early_init); /** * omap_serial_init_port() - initialize single serial port