From patchwork Wed Jun 3 22:26:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 6541741 Return-Path: X-Original-To: patchwork-linux-omap@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 349769F326 for ; Wed, 3 Jun 2015 22:26:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 588F32070D for ; Wed, 3 Jun 2015 22:26:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2BF0720707 for ; Wed, 3 Jun 2015 22:26:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753039AbbFCW0X (ORCPT ); Wed, 3 Jun 2015 18:26:23 -0400 Received: from muru.com ([72.249.23.125]:55764 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbbFCW0W (ORCPT ); Wed, 3 Jun 2015 18:26:22 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 05ACC80A1; Wed, 3 Jun 2015 22:28:02 +0000 (UTC) Date: Wed, 3 Jun 2015 15:26:20 -0700 From: Tony Lindgren To: Felipe Balbi Cc: Russell King , Linux ARM Kernel Mailing List , Linux OMAP Mailing List Subject: Re: [RFC/NOT FOR MERGING] HACK: add global/private timers for A9 Message-ID: <20150603222619.GY30984@atomide.com> References: <1433363565-17725-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1433363565-17725-1-git-send-email-balbi@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 * Felipe Balbi [150603 13:36]: > --- a/arch/arm/mach-omap2/timer.c > +++ b/arch/arm/mach-omap2/timer.c > @@ -655,20 +655,18 @@ static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon", > static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); > void __init omap4_local_timer_init(void) > { > + int err; > + > omap4_sync32k_timer_init(); > /* Local timers are not supprted on OMAP4430 ES1.0 */ > - if (omap_rev() != OMAP4430_REV_ES1_0) { > - int err; > - > - if (of_have_populated_dt()) { > - clocksource_of_init(); > - return; > - } > - > - err = twd_local_timer_register(&twd_local_timer); > - if (err) > - pr_err("twd_local_timer_register failed %d\n", err); > + if (of_have_populated_dt()) { > + clocksource_of_init(); > + return; > } > + > + err = twd_local_timer_register(&twd_local_timer); > + if (err) > + pr_err("twd_local_timer_register failed %d\n", err); > } > #else > void __init omap4_local_timer_init(void) Looks like can get rid of even more code here, see the patch below. Regards, Tony 8< ------------------------ From: Tony Lindgren Date: Wed, 3 Jun 2015 14:40:40 -0700 Subject: [PATCH] ARM: OMAP2+: Clean up omap4_local_timer_init Inspired by a patch from Felipe Balbi , we can now get rid of most the code in omap4_local_timer_init. Omap4 is now device tree only.. And we have not properly supported omap4 ES1.0 revision for a really long time AFAIK. Let's just remove all that code to simplify things. This assumes we have arm,cortex-a9-twd-timer entry in the omap4.dtsi file, which we do. Signed-off-by: Tony Lindgren Reviewed-by: Felipe Balbi --- 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 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -649,23 +649,10 @@ static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon", #ifdef CONFIG_ARCH_OMAP4 #ifdef CONFIG_HAVE_ARM_TWD -static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); void __init omap4_local_timer_init(void) { omap4_sync32k_timer_init(); - /* Local timers are not supprted on OMAP4430 ES1.0 */ - if (omap_rev() != OMAP4430_REV_ES1_0) { - int err; - - if (of_have_populated_dt()) { - clocksource_of_init(); - return; - } - - err = twd_local_timer_register(&twd_local_timer); - if (err) - pr_err("twd_local_timer_register failed %d\n", err); - } + clocksource_of_init(); } #else void __init omap4_local_timer_init(void)