All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajendra Nayak <rnayak@ti.com>
To: Archit Taneja <archit@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>, Tony Lindgren <tony@atomide.com>,
	Tero Kristo <t-kristo@ti.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 00/11] ARM: OMAP: OMAP5 & AM43x DSS
Date: Tue, 20 May 2014 14:10:09 +0530	[thread overview]
Message-ID: <537B14E9.2050108@ti.com> (raw)
In-Reply-To: <537AE8A7.4080307@ti.com>

On Tuesday 20 May 2014 11:01 AM, Archit Taneja wrote:
> Hi,
> 
> On Friday 16 May 2014 01:44 PM, Tomi Valkeinen wrote:
>> On 12/05/14 18:48, Tony Lindgren wrote:
>>
>>>>> Also, I'm wondering why we still have .clk and .opt_clks entries in the
>>>>> hwmod data for am43xx and omap5 which are both device tree based with
>>>>> all the clocks coming from .dts files?
>>>>
>>>> I think they are needed for the omap_device/hwmod stuff to work. Only
>>>> omapdss driver knows about the clocks defined in the .dts files, and the
>>>> omap_device/hwmod code still needs to do the reset and maybe some other
>>>> tasks that require the clocks.
>>>
>>> We're already populating the hwmod data from dts entries, that's done by
>>> omap_device_build_from_dt. Why aren't we doing that for dt defined clocks?
>>>
>>> I'd rather not start adding new data that will then just be removed, that's
>>> what people call "pointless extra churn".
>>
>> I don't know why. I have to say I'm not 100% sure if that's done or not,
>> but at least I can't find where it's done.
> 
> The reason why clocks are needed from hwmod data is because we still don't populate hwmod fields like main_clk and opt_clock from DT clocks.
> 
> The reason why this isn't done yet is because we currently haven't figured out a clean way to tell hwmod what clock is the main_clk, and what clocks are optional clocks.
> 
> One of the proposed methods was to assume the clock named to be "fck" as main_clk, and the remaining clocks as optional clocks for hwmod. That method wasn't agreed upon, this looks like the thread which discusses this:
> 
> http://marc.info/?l=linux-arm-kernel&m=138928084823142&w=2

So I started to look through this again and I realized most of the opt clock information
is actually unused within hwmod and does not even need to be there. I just proposed an RFC here to clean some of that [1]

The only modules which do need this seem to be gpio and dss (though we still need to check if all the newer platforms
need this, or this is one of those things just carried forward because some old platform had an issue with gpio and dss
ocp reset)

As far as DSS is concerned, this is used within the custom reset function (not within hwmod) in display.c in mach-omap2/
Its just that the current code relies on hwmod structures, which can very easily now extract this from DT instead.

That just leaves gpio, which should be the only clock information that will have to exist in hwmod till we figure out
how to move it to DT. All the main_clks from hwmod can very easily to moved to DT as already proposed using something like
'fck' to identify them.

[1] http://marc.info/?l=linux-omap&m=140057445618162&w=2

> 
> Archit
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: rnayak@ti.com (Rajendra Nayak)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/11] ARM: OMAP: OMAP5 & AM43x DSS
Date: Tue, 20 May 2014 14:10:09 +0530	[thread overview]
Message-ID: <537B14E9.2050108@ti.com> (raw)
In-Reply-To: <537AE8A7.4080307@ti.com>

On Tuesday 20 May 2014 11:01 AM, Archit Taneja wrote:
> Hi,
> 
> On Friday 16 May 2014 01:44 PM, Tomi Valkeinen wrote:
>> On 12/05/14 18:48, Tony Lindgren wrote:
>>
>>>>> Also, I'm wondering why we still have .clk and .opt_clks entries in the
>>>>> hwmod data for am43xx and omap5 which are both device tree based with
>>>>> all the clocks coming from .dts files?
>>>>
>>>> I think they are needed for the omap_device/hwmod stuff to work. Only
>>>> omapdss driver knows about the clocks defined in the .dts files, and the
>>>> omap_device/hwmod code still needs to do the reset and maybe some other
>>>> tasks that require the clocks.
>>>
>>> We're already populating the hwmod data from dts entries, that's done by
>>> omap_device_build_from_dt. Why aren't we doing that for dt defined clocks?
>>>
>>> I'd rather not start adding new data that will then just be removed, that's
>>> what people call "pointless extra churn".
>>
>> I don't know why. I have to say I'm not 100% sure if that's done or not,
>> but at least I can't find where it's done.
> 
> The reason why clocks are needed from hwmod data is because we still don't populate hwmod fields like main_clk and opt_clock from DT clocks.
> 
> The reason why this isn't done yet is because we currently haven't figured out a clean way to tell hwmod what clock is the main_clk, and what clocks are optional clocks.
> 
> One of the proposed methods was to assume the clock named to be "fck" as main_clk, and the remaining clocks as optional clocks for hwmod. That method wasn't agreed upon, this looks like the thread which discusses this:
> 
> http://marc.info/?l=linux-arm-kernel&m=138928084823142&w=2

So I started to look through this again and I realized most of the opt clock information
is actually unused within hwmod and does not even need to be there. I just proposed an RFC here to clean some of that [1]

The only modules which do need this seem to be gpio and dss (though we still need to check if all the newer platforms
need this, or this is one of those things just carried forward because some old platform had an issue with gpio and dss
ocp reset)

As far as DSS is concerned, this is used within the custom reset function (not within hwmod) in display.c in mach-omap2/
Its just that the current code relies on hwmod structures, which can very easily now extract this from DT instead.

That just leaves gpio, which should be the only clock information that will have to exist in hwmod till we figure out
how to move it to DT. All the main_clks from hwmod can very easily to moved to DT as already proposed using something like
'fck' to identify them.

[1] http://marc.info/?l=linux-omap&m=140057445618162&w=2

> 
> Archit
> 
> 

  reply	other threads:[~2014-05-20  8:40 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 11:56 [PATCH 00/11] ARM: OMAP: OMAP5 & AM43x DSS Tomi Valkeinen
2014-05-09 11:56 ` Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 01/11] ARM: AM43xx: hwmod: add DSS hwmod data Tomi Valkeinen
2014-05-09 11:56   ` Tomi Valkeinen
2014-05-19  9:24   ` Rajendra Nayak
2014-05-19  9:24     ` Rajendra Nayak
2014-05-19 10:12     ` Tomi Valkeinen
2014-05-19 10:12       ` Tomi Valkeinen
2014-05-19 10:28       ` Rajendra Nayak
2014-05-19 10:28         ` Rajendra Nayak
2014-05-19 11:10         ` Tomi Valkeinen
2014-05-19 11:10           ` Tomi Valkeinen
2014-05-19 11:23           ` Rajendra Nayak
2014-05-19 11:23             ` Rajendra Nayak
2014-05-27  6:29           ` Tomi Valkeinen
2014-05-27  6:29             ` Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 02/11] ARM: dts: am43xx: add ti,set-rate-parent for disp_clk Tomi Valkeinen
2014-05-09 11:56   ` Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 03/11] ARM: dts: am4372.dtsi: add DSS information Tomi Valkeinen
2014-05-09 11:56   ` Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 04/11] ARM: dts: am437x-gp-evm: add LCD data Tomi Valkeinen
2014-05-09 11:56   ` Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 05/11] ARM: dts: am43x-epos-evm: " Tomi Valkeinen
2014-05-09 11:56   ` Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 06/11] ARM: OMAP2+: hwmod: OMAP5 DSS hwmod data Tomi Valkeinen
2014-05-09 11:56   ` Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 07/11] ARM: dts: omap5-clocks.dtsi: add dss iclk Tomi Valkeinen
2014-05-09 11:56   ` Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 08/11] ARM: dts: omap5-clocks.dtsi: add ti,set-rate-parent to dss_dss_clk Tomi Valkeinen
2014-05-09 11:56   ` [PATCH 08/11] ARM: dts: omap5-clocks.dtsi: add ti, set-rate-parent " Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 09/11] ARM: dts: omap5.dtsi: add DSS nodes Tomi Valkeinen
2014-05-09 11:56   ` Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 10/11] ARM: dts: omap5-uevm.dts: add tca6424a Tomi Valkeinen
2014-05-09 11:56   ` Tomi Valkeinen
2014-05-09 11:56 ` [PATCH 11/11] ARM: dts: omap5-uevm.dts: add display nodes Tomi Valkeinen
2014-05-09 11:56   ` Tomi Valkeinen
2014-05-12 13:25 ` [PATCH 00/11] ARM: OMAP: OMAP5 & AM43x DSS Tomi Valkeinen
2014-05-12 13:25   ` Tomi Valkeinen
2014-05-12 14:36   ` Tony Lindgren
2014-05-12 14:36     ` Tony Lindgren
2014-05-12 14:57     ` Tomi Valkeinen
2014-05-12 14:57       ` Tomi Valkeinen
2014-05-12 15:48       ` Tony Lindgren
2014-05-12 15:48         ` Tony Lindgren
2014-05-16  8:14         ` Tomi Valkeinen
2014-05-16  8:14           ` Tomi Valkeinen
2014-05-20  5:31           ` Archit Taneja
2014-05-20  5:31             ` Archit Taneja
2014-05-20  8:40             ` Rajendra Nayak [this message]
2014-05-20  8:40               ` Rajendra Nayak
2014-05-16  8:42     ` Tomi Valkeinen
2014-05-16  8:42       ` Tomi Valkeinen

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=537B14E9.2050108@ti.com \
    --to=rnayak@ti.com \
    --cc=archit@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=t-kristo@ti.com \
    --cc=tomi.valkeinen@ti.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.