From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752582AbaEGWEi (ORCPT ); Wed, 7 May 2014 18:04:38 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:25151 "EHLO mho-02-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751881AbaEGWEb (ORCPT ); Wed, 7 May 2014 18:04:31 -0400 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 99.127.230.128 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+ajmdw6jQgLFynn0WtiV7t Date: Wed, 7 May 2014 15:04:27 -0700 From: Tony Lindgren To: Joel Fernandes Cc: Linux OMAP List , Linux ARM Kernel List , Linux Kernel Mailing List Subject: Re: [PATCH 01/26] ARM: OMAP: dmtimer: Remove setting of clk parent indirectly through platform hook Message-ID: <20140507220426.GC19102@atomide.com> References: <1398375849-6017-1-git-send-email-joelf@ti.com> <1398375849-6017-2-git-send-email-joelf@ti.com> <20140507151907.GB9502@atomide.com> <536AA900.4040200@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <536AA900.4040200@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Joel Fernandes [140507 14:44]: > On 05/07/2014 10:19 AM, Tony Lindgren wrote: > > * Joel Fernandes [140424 14:44]: > >> There is a platform specific hook just for OMAP1 to set its clk parent. Remove > >> this hook and have OMAP1 set its parent in omap1_dm_timer_init. If OMAP1 is > >> ever migrated to clock framework, the correct way to do this would be through > >> clk_set_parent like other platforms. > >> > >> Signed-off-by: Joel Fernandes > >> --- > >> arch/arm/mach-omap1/timer.c | 8 +++++++- > >> arch/arm/plat-omap/dmtimer.c | 8 +++----- > >> include/linux/platform_data/dmtimer-omap.h | 2 -- > >> 3 files changed, 10 insertions(+), 8 deletions(-) > >> > >> diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c > >> index bde7a35..4b9c604 100644 > >> --- a/arch/arm/mach-omap1/timer.c > >> +++ b/arch/arm/mach-omap1/timer.c > >> @@ -140,7 +140,13 @@ static int __init omap1_dm_timer_init(void) > >> goto err_free_pdata; > >> } > >> > >> - pdata->set_timer_src = omap1_dm_timer_set_src; > >> + /* > >> + * Since OMAP1 doesn't support clock framework, set timer clock > >> + * source to 32KHz here instead of expecting it to be set by > >> + * dmtimer code. > >> + */ > >> + omap1_dm_timer_set_src(pdev, 0x01); > >> + > >> pdata->timer_capability = OMAP_TIMER_ALWON | > >> OMAP_TIMER_NEEDS_RESET | OMAP_TIMER_HAS_DSP_IRQ; > >> > > > > This does not sound right, omap1 does support clock framework just fine. > > It is not using the common clock framework though. > > > > This breaks omap_dm_timer_set_source() for sure. Setting the source > > during init is not a right solution here. Probably best to keep the > > pdata hook around, drivers can support pdata and DT data together > > just fine. > > Actually pdata hook in this case is used only in 1 place, and is OMAP1 > specific so I felt its better to clean it up. > > Can you elaborate a bit more on why it breaks? I have no way of testing > OMAP1 without hardware. > > What difference is it to set MOD_CONF_CTRL_1 in omap1's > arch_initcall(omap1_dm_timer_init) versus doing so later? You're making a driver behave in a different way for omap1 compared to omap2+ where selecting the clock source won't work for omap1. Regards, Tony