From patchwork Thu Apr 14 11:07:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 65790 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp529682qge; Thu, 14 Apr 2016 04:09:18 -0700 (PDT) X-Received: by 10.66.169.109 with SMTP id ad13mr20111733pac.20.1460632136356; Thu, 14 Apr 2016 04:08:56 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si7243168pat.133.2016.04.14.04.08.56; Thu, 14 Apr 2016 04:08:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754890AbcDNLIy (ORCPT + 3 others); Thu, 14 Apr 2016 07:08:54 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:38189 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754851AbcDNLIx (ORCPT ); Thu, 14 Apr 2016 07:08:53 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u3EB8PW0007021; Thu, 14 Apr 2016 06:08:25 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u3EB8P9a010870; Thu, 14 Apr 2016 06:08:25 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Thu, 14 Apr 2016 06:08:24 -0500 Received: from sokoban.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u3EB86JH005701; Thu, 14 Apr 2016 06:08:23 -0500 From: Tero Kristo To: , , , , CC: , , Subject: [PATCHv2 07/28] ARM: OMAP2+: timer: change order of hwmod data handling Date: Thu, 14 Apr 2016 14:07:56 +0300 Message-ID: <1460632097-25727-8-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1460632097-25727-1-git-send-email-t-kristo@ti.com> References: <1460632097-25727-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org With the introduction of hwmod module clocks, the name of the hwmod main clk may not be available before hwmod setup, as hwmod setup may lookup the main clock dynamically based on the hwmod name. Thus, change the order of hwmod setup and main clock handling for the timer code, to make sure the main clock is going to be available. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 08e08db..77fb4e1 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -290,6 +290,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, if (!timer->io_base) return -ENXIO; + omap_hwmod_setup_one(oh_name); + /* After the dmtimer is using hwmod these clocks won't be needed */ timer->fclk = ti_clk_get(omap_hwmod_get_main_clk(oh)); if (IS_ERR(timer->fclk)) @@ -304,7 +306,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, clk_put(src); - omap_hwmod_setup_one(oh_name); omap_hwmod_enable(oh); __omap_dm_timer_init_regs(timer);