devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vignesh R <vigneshr@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Russell King <linux@arm.linux.org.uk>,
	Tony Lindgren <tony@atomide.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH v2 2/3] ARM: OMAP2+: hwmod: AM335x/AM43x: add hwmod support for tscadc on am43x-evm
Date: Fri, 21 Nov 2014 15:46:14 +0530	[thread overview]
Message-ID: <546F10EE.3030309@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1411210519520.9204@utopia.booyaka.com>



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 <vigneshr@ti.com>
>>> ...
>>>
>>>> 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
> 

  reply	other threads:[~2014-11-21 10:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 11:15 [PATCH v2 0/3] Add support for ADC on am437x-gp and am43x-epos-evm Vignesh R
2014-11-04 11:15 ` [PATCH v2 1/3] ARM: OMAP2+: hwmod: AM335x/AM43x: Move am33xx_l4_hs_hwmod to ipblock_data Vignesh R
2014-11-04 11:15 ` [PATCH v2 2/3] ARM: OMAP2+: hwmod: AM335x/AM43x: add hwmod support for tscadc on am43x-evm Vignesh R
2014-11-20  7:09   ` Paul Walmsley
2014-11-21  5:00     ` Vignesh R
     [not found]       ` <546EC6D4.7080906-l0cyMroinI0@public.gmane.org>
2014-11-21  5:26         ` Paul Walmsley
2014-11-21 10:16           ` Vignesh R [this message]
2014-11-04 11:15 ` [PATCH v2 3/3] ARM: dts: AM43xx: add tscadc DT entries for am437x-evm and am43x-epos-evm Vignesh R
     [not found] ` <1415099728-10959-1-git-send-email-vigneshr-l0cyMroinI0@public.gmane.org>
2014-11-14  4:07   ` [PATCH v2 0/3] Add support for ADC on am437x-gp " Vignesh R
2014-11-14 18:50     ` Tony Lindgren
     [not found]       ` <20141114185049.GB7046-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2014-11-20 18:23         ` Paul Walmsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=546F10EE.3030309@ti.com \
    --to=vigneshr@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=paul@pwsan.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).