linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Cousson, Benoit" <b-cousson@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 3/8] ARM: OMAP2+: hwmod: reorganize and document the setup process
Date: Thu, 19 Apr 2012 14:05:56 +0200	[thread overview]
Message-ID: <4F8FFFA4.7050607@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1204190346350.29048@utopia.booyaka.com>

On 4/19/2012 11:49 AM, Paul Walmsley wrote:
> Hi Benoît,
>
> On Thu, 19 Apr 2012, Cousson, Benoit wrote:
>
>> On 4/19/2012 10:17 AM, Paul Walmsley wrote:
>>
>>>    static int __init omap_hwmod_setup_all(void)
>>>    {
>>> -	int r;
>>> -
>>> -	if (!mpu_oh) {
>>> -		pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet
>>> registered\n",
>>> -		       __func__, MPU_INITIATOR_NAME);
>>> -		return -EINVAL;
>>> -	}
>>> -
>>> -	r = omap_hwmod_for_each(_populate_mpu_rt_base, NULL);
>>> -
>>> -	r = omap_hwmod_for_each(_init_clocks, NULL);
>>> -	WARN(IS_ERR_VALUE(r),
>>> -	     "omap_hwmod: %s: _init_clocks failed\n", __func__);
>>> +	_ensure_mpu_hwmod_is_setup(NULL);
>>>
>>> +	omap_hwmod_for_each(_init, NULL);
>>>    	omap_hwmod_for_each(_setup, NULL);
>>
>> Does it make sense to iterate twice? Cannot we just iterate over a _init +
>> _setup single call?
>
> It's a good idea but I don't think we can do that until we add the code to
> walk the hwmod data in dependency order.  The DSS custom reset function
> accesses registers in another hwmod, which won't have its clocks
> initialized yet if _init() and setup() are combined.

Outch, that's unfortunate!

I'm wondering if the whole automatic reset management at hwmod level 
does make sense for such IP.

In the case of the DSS, having some reset support in the driver model 
should allow potentially a reset done at parent level to be broadcasted 
to every children.

Regards,
Benoit
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-04-19 12:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28  5:36 [PATCH v2 0/8] ARM: OMAP2+: hwmod/timer: first set of cleanups for 3.4 Paul Walmsley
2012-02-28  5:36 ` [PATCH v2 1/8] ARM: OMAP2+: hwmod: control all hardreset lines attached to a hwmod Paul Walmsley
2012-02-28  5:36 ` [PATCH v2 2/8] ARM: OMAP4: hwmod data: remove pseudo-hwmods associated with hardreset lines Paul Walmsley
2012-02-28  5:36 ` [PATCH v2 3/8] ARM: OMAP2+: hwmod: reorganize and document the setup process Paul Walmsley
2012-04-19  8:14   ` Paul Walmsley
2012-04-19  8:17     ` Paul Walmsley
2012-04-19  8:22       ` Cousson, Benoit
2012-04-19  9:49         ` Paul Walmsley
2012-04-19 12:05           ` Cousson, Benoit [this message]
2012-02-28  5:36 ` [PATCH v2 4/8] ARM: OMAP2+: hwmod: revise hardreset behavior Paul Walmsley
2012-04-19  6:53   ` Paul Walmsley
2012-04-19 12:07     ` Cousson, Benoit
2012-04-19 17:17       ` Paul Walmsley
2012-04-19 19:14         ` Cousson, Benoit
2012-04-19 19:46           ` Paul Walmsley
2012-04-19 21:15             ` Ramirez Luna, Omar
2012-02-28  5:37 ` [PATCH v2 5/8] ARM: OMAP2+: hwmod: ensure that SYSCONFIG bits are reprogrammed after a reset Paul Walmsley
2012-03-15  0:31   ` Ramirez Luna, Omar
2012-03-15  6:25     ` Paul Walmsley
2012-03-15 15:21       ` Ramirez Luna, Omar
2012-04-11 20:15         ` Paul Walmsley
2012-04-19  8:21   ` Paul Walmsley
2012-02-28  5:37 ` [PATCH v2 6/8] ARM: OMAP2+: hwmod: provide a function to return the address space of the MPU RT Paul Walmsley
2012-02-28  5:37 ` [PATCH v2 7/8] ARM: OMAP2+: hwmod: add omap_hwmod_get_resource_byname() Paul Walmsley
2012-02-28  5:37 ` [PATCH v2 8/8] ARM: OMAP2+: timer: use a proper interface to get hwmod data 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=4F8FFFA4.7050607@ti.com \
    --to=b-cousson@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.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).