All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cousson, Benoit" <b-cousson@ti.com>
To: "ABRAHAM, KISHON VIJAY" <kishon@ti.com>
Cc: Felipe Balbi <me@felipebalbi.com>,
	Kevin Hilman <khilman@deeprootsystems.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Varadarajan, Charulatha" <charu@ti.com>,
	"Datta, Shubhrajyoti" <shubhrajyoti@ti.com>,
	Paul Walmsley <paul@pwsan.com>, "Basak, Partha" <p-basak2@ti.com>
Subject: Re: [RFC: PATCH] OMAP: hwmod: New API to modify the autoidle bits of sysconfig register
Date: Tue, 31 Aug 2010 18:16:24 +0200	[thread overview]
Message-ID: <4C7D2AD8.9050808@ti.com> (raw)
In-Reply-To: <4C7D148A.8040403@ti.com>

On 8/31/2010 4:41 PM, ABRAHAM, KISHON VIJAY wrote:
>
>
> On Tuesday 31 August 2010 01:43 PM, Felipe Balbi wrote:
>> On Tue, 31 Aug 2010 10:53:36 +0530, kishon<a0393678@ti.com>   wrote:
>>
>>>        Though driver shouldn't be using hwmod directly, there is no
>>> corresponding API in omap_device to do the same. So we are planning to
>>>        store the omap_hwmod structure in platform_data during
>>> arch_initcall (in the callback to omap_hwmod_for_each_by_class). So
>>> whenever the
>>>        AUTOIDLE bits need to be reset or set, we pass the stored
>>> omap_hwmod structure to this API. Currently, the functions that needs
>>> AUTOIDLE
>>>        bit to be modified (omap_st_on, omap_st_off) resides in plat-omap.
>>>
>> couldn't your API instead be something like:
>>
>> int omap_hwmod_set_autoidle(struct device *dev, u8 autoidle)
>> {
>> 	struct omap_hwmod *oh = dev_to_hwmod(dev);
>>
>> 	if (!oh)
>> 		return -ENODEV;
>> 	[...]
>>
>> 	return 0;
>> }
>>
>       Balbi,
>           I couldn't find "dev_to_hwmod()" function. Do you actually mean
> implementing dev_to_hwmod() function?
>       I created this API based on "omap_hwmod_set_slave_idlemode()"
> present in lo (omap_hwmod.c) for changing the smart idle bit
>       of SYSCONFIG register.
>
>       -Kishon

That API does not exist. And since a device can contains several hwmods, 
like in your case, this API cannot exist in that form.

The real issue is that we do not want to expose any API relative to PRCM 
management to the driver. Even if you hide that behind some pdata, it is 
still the driver that will call it.

I know that some IPs like MUSB or McBSP requires some unusual idle mode 
change due to HW bugs, but in general, you should try to find a better 
way to handle that in the core framework if possible.

Regards,
Benoit

  reply	other threads:[~2010-08-31 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26 11:45 [RFC: PATCH] New API to modify the autoidle bits of sysconfig register Kishon Vijay Abraham I
2010-08-30 15:26 ` Kevin Hilman
2010-08-31  5:23   ` [RFC: PATCH] OMAP: hwmod: " kishon
2010-08-31  8:13     ` Felipe Balbi
2010-08-31 14:41       ` kishon
2010-08-31 16:16         ` Cousson, Benoit [this message]
2010-09-03  9:08           ` kishon

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=4C7D2AD8.9050808@ti.com \
    --to=b-cousson@ti.com \
    --cc=charu@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=kishon@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=me@felipebalbi.com \
    --cc=p-basak2@ti.com \
    --cc=paul@pwsan.com \
    --cc=shubhrajyoti@ti.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.