Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758597AbaKUKRf (ORCPT ); Fri, 21 Nov 2014 05:17:35 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:49555 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758422AbaKUKRb (ORCPT ); Fri, 21 Nov 2014 05:17:31 -0500 Message-ID: <546F10EE.3030309@ti.com> Date: Fri, 21 Nov 2014 15:46:14 +0530 From: Vignesh R User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Paul Walmsley CC: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Tony Lindgren , , , , Subject: Re: [PATCH v2 2/3] ARM: OMAP2+: hwmod: AM335x/AM43x: add hwmod support for tscadc on am43x-evm References: <1415099728-10959-1-git-send-email-vigneshr@ti.com> <1415099728-10959-3-git-send-email-vigneshr@ti.com> <546EC6D4.7080906@ti.com> In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 21 November 2014 10:56 AM, Paul Walmsley wrote: > On Fri, 21 Nov 2014, Vignesh R wrote: > >> On 11/20/2014 12:39 PM, Paul Walmsley wrote: >>> On Tue, 4 Nov 2014, Vignesh R wrote: >>> >>>> This patch adds hwmod support for tscadc to work on am43xx-evm. The am33xx >>>> hwmod structures of tscadc has been moved to ipblock_data so that it can >>>> be reused in am43xx. The clock domain names are separately set for am33xx >>>> and am43xx. Thus tscadc dt entries can now be added to am43xx board >>>> dt files. >>>> >>>> Signed-off-by: Vignesh R >>> ... >>> >>>> diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h >>>> index 6e57b8ad0db5..b92a7c7825fa 100644 >>>> --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h >>>> +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h >>> ... >>> >>>> +static void am33xx_hwmod_clockdomain(void) >>>> +{ >>>> + CLKDMNAME(am33xx_l4_hs_hwmod, "l4hs_clkdm"); >>>> + CLKDMNAME(am33xx_adc_tsc_hwmod, "l4_wkup_clkdm"); >>>> +} >>>> + >>>> +static void am43xx_hwmod_clockdomain(void) >>>> +{ >>>> + CLKDMNAME(am33xx_l4_hs_hwmod, "l3_clkdm"); >>>> + CLKDMNAME(am33xx_adc_tsc_hwmod, "l3s_tsc_clkdm"); >>>> +} >>>> + >>> ... >>> >>>> + am33xx_hwmod_clockdomain(); >>> I looked at this patch and the one before it. Is there some reason why we >>> need to share these two hwmods between AM33xx and AM43xx? It seems >>> cleaner just to add the ADC data directly to the AM43xx hwmod data file, >>> not touch the AM33xx data, and not add another runtime data update for the >>> clockdomains. Unless there's something that I'm missing? >> >> >> I wanted to reuse hwmod structures. Except for clockdomain and offset, >> rest of the hwmod data are same for AM33xx and AM43xx. Adding data to AM43xx >> hwmod file just duplicates these structures. Do you still want me to move them >> to AM43xx file? > > Yes. It looks to me like the number of lines saved by eliminating the > duplication is not too different than the number of lines added with the > dynamic clockdomain rewriting. Plus then we can avoid the dynamic > clockdomain rewriting that we are only doing for two IP blocks. Ideally > the hwmod data is meant to be static, not changed at runtime. For the > moment we are stuck with the CLKCTRL rewriting but I personally consider > that to be a hack. > Ok, will add ADC data to AM43xx and post v3. Regards Vignesh > > - Paul > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/