From patchwork Wed Mar 30 07:56:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 673472 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2U7udkt004328 for ; Wed, 30 Mar 2011 07:56:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754513Ab1C3H4a (ORCPT ); Wed, 30 Mar 2011 03:56:30 -0400 Received: from na3sys009aog115.obsmtp.com ([74.125.149.238]:42808 "EHLO na3sys009aog115.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752641Ab1C3H43 (ORCPT ); Wed, 30 Mar 2011 03:56:29 -0400 Received: from source ([209.85.218.48]) (using TLSv1) by na3sys009aob115.postini.com ([74.125.148.12]) with SMTP ID DSNKTZLiLEhQwnlYCpvQ+1eE6ONKucre8b8J@postini.com; Wed, 30 Mar 2011 00:56:29 PDT Received: by mail-yi0-f48.google.com with SMTP id 28so523181yia.21 for ; Wed, 30 Mar 2011 00:56:28 -0700 (PDT) Received: by 10.101.6.34 with SMTP id j34mr635618ani.75.1301471788112; Wed, 30 Mar 2011 00:56:28 -0700 (PDT) Received: from [172.24.137.243] (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id r8sm3252336ane.19.2011.03.30.00.56.25 (version=SSLv3 cipher=OTHER); Wed, 30 Mar 2011 00:56:27 -0700 (PDT) Message-ID: <4D92E21F.6030608@ti.com> Date: Wed, 30 Mar 2011 13:26:15 +0530 From: Santosh Shilimkar User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Tony Lindgren CC: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: Re: [PATCH 00/10] omap init_early changes for irq and timer init References: <20110328221501.4046.41079.stgit@baageli.muru.com> In-Reply-To: <20110328221501.4046.41079.stgit@baageli.muru.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 30 Mar 2011 07:56:39 +0000 (UTC) --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h @@ -34,7 +34,12 @@ struct sys_timer; extern void omap_map_common_io(void); -extern struct sys_timer omap_timer; +extern struct sys_timer omap1_timer; +extern struct sys_timer omap242x_timer; +extern struct sys_timer omap243x_timer; +extern struct sys_timer omap3_timer; +extern struct sys_timer omap3_beagle_timer; +extern struct sys_timer omap4_timer; extern bool omap_32k_timer_init(void); extern int __init omap_init_clocksource_32k(void); extern unsigned long long notrace omap_32k_sched_clock(void); --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c @@ -45,10 +45,33 @@ #include "timer-gp.h" +/* Parent clocks, eventually these will come from the clock framework */ + +#define OMAP2_MPU_SOURCE "sys_ck" +#define OMAP3_MPU_SOURCE OMAP2_MPU_SOURCE +#define OMAP4_MPU_SOURCE "sys_clkin_ck" +#define OMAP2_32K_SOURCE "func_32k_ck" +#define OMAP3_32K_SOURCE "omap_32k_fck" +#define OMAP4_32K_SOURCE "sys_32k_ck" + +#ifdef CONFIG_OMAP_32K_TIMER +#define OMAP2_CLKEV_SOURCE OMAP2_32K_SOURCE +#define OMAP3_CLKEV_SOURCE OMAP3_32K_SOURCE +#define OMAP4_CLKEV_SOURCE OMAP4_32K_SOURCE +#define OMAP3_BEAGLE_TIMER 12 +#else +#define OMAP2_CLKEV_SOURCE OMAP2_MPU_SOURCE +#define OMAP3_CLKEV_SOURCE OMAP3_MPU_SOURCE +#define OMAP4_CLKEV_SOURCE OMAP4_MPU_SOURCE +#define OMAP3_BEAGLE_TIMER 1 +#endif [.....] +/* + * Beagle based designs typically have an issue with gptimer1. Also note + * that GPTIMER12 can only use the secure 32KiHz clock source. + */ static void __init omap3_beagle_timer_init(void) { omap_dm_timer_init(); - omap2_gp_clockevent_init();