All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cousson, Benoit" <b-cousson@ti.com>
To: "Shilimkar, Santosh" <santosh.shilimkar@ti.com>
Cc: "G, Manjunath Kondaiah" <manjugk@ti.com>,
	Kevin Hilman <khilman@deeprootsystems.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Paul Walmsley <paul@pwsan.com>, Tony Lindgren <tony@atomide.com>,
	"Sawant, Anand" <sawant@ti.com>,
	"Nayak, Rajendra" <rnayak@ti.com>,
	"Basak, Partha" <p-basak2@ti.com>,
	"Varadarajan, Charulatha" <charu@ti.com>
Subject: Re: [PATCH 04/11] OMAP3: DMA: HWMOD: Add hwmod data structures
Date: Wed, 04 Aug 2010 12:36:06 +0200	[thread overview]
Message-ID: <4C594296.30706@ti.com> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB02C641E209@dbde02.ent.ti.com>

On 8/4/2010 12:27 PM, Shilimkar, Santosh wrote:
>> -----Original Message-----
>> From: Cousson, Benoit
>> Sent: Wednesday, August 04, 2010 3:53 PM
>> To: Shilimkar, Santosh
>> Cc: G, Manjunath Kondaiah; Kevin Hilman; linux-omap@vger.kernel.org; Paul
>> Walmsley; Tony Lindgren; Sawant, Anand; Nayak, Rajendra; Basak, Partha;
>> Varadarajan, Charulatha
>> Subject: Re: [PATCH 04/11] OMAP3: DMA: HWMOD: Add hwmod data structures
>>
>> On 8/4/2010 12:15 PM, Shilimkar, Santosh wrote:
>>>> From: Cousson, Benoit
>>>> Sent: Wednesday, August 04, 2010 3:38 PM
>>>>
>>>> On 8/4/2010 2:35 AM, G, Manjunath Kondaiah wrote:
>>>>> Kevin,
>>>>>
>>>>>> From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
>>>>>> Sent: Wednesday, August 04, 2010 3:27 AM
>>>>>>
>>>>>> Manjunatha GK<manjugk@ti.com>    writes:
>>>>>>
>>>>>>> This patch adds OMAP3 DMA hwmod structures.
>>>>>>>
>>>>>>> Signed-off-by: Manjunatha GK<manjugk@ti.com>
>>>>>>
>>>>>> [...]
>>>>>>
>>>>>>> +static struct omap_hwmod omap3xxx_dma_system_hwmod = {
>>>>>>> +	.name		= "dma",
>>>>>>> +	.class		=&omap3xxx_dma_hwmod_class,
>>>>>>> +	.mpu_irqs	= omap3xxx_dma_system_irqs,
>>>>>>> +	.mpu_irqs_cnt	= ARRAY_SIZE(omap3xxx_dma_system_irqs),
>>>>>>> +	.main_clk	= "l3_div_ck",
>>>>>>> +	.prcm = {
>>>>>>> +		.omap2 = {
>>>>>>> +			/* .clkctrl_reg = NULL, */
>>>>>>> +		},
>>>>>>> +	},
>>>>>>
>>>>>> Has this been tested?  Without valid fields here the hwmod
>>>>>> will never be
>>>>>> enabled.
>>>>>
>>>>> This patch series has been tested on both omap3 and omap4. I didn't
>> find
>>>>> any entries for DMA module in prcm-common.h(for assigning .module_bit
>>>> etc)
>>>>> hence I commented this for clarification.
>>>>
>>>> There is no explicit PRCM control for the SDMA. You can just access the
>>>> standby status and change the sysconfig idle and standby settings.
>>>> It uses the L3 interface clock as functional clock.
>>>> You should still use HWMOD_NO_IDLEST status to prevent the enable to
>>>> crash.
>>>>
>>>> In your case, I think that you are probably never explicitly enabling
>> or
>>>> disabling the dma device due to the library kind of API and the fact
>>>> that the HW is managing is automatically, isn't it?
>>>>
>>>> We had the same kind of discussion for the hwspinlock. Since these IPs
>>>> are using interface clock as a functional clock, there is no need to
>>>> explicitly enable them. But we should, otherwise we have no way to
>> track
>>>> the usage of this IP and potentially to enable the power domain that
>>>> contains these IP.
>>>>
>>>> Each time a dma channel is requested, you should call the
>>>> pm_runtime_get, and pm_runtime_put() when the channel is not needed
>>>> anymore.
>>>>
>>> Request call can get called on multiple channels.
>>> So at the time of request a channel, other channels might be already
>>> in use. So logically " pm_runtime_put" should only be done if
>>> reserved channels are 0
>>
>> The point is to "enable" the device when at least one channel is in use
>> and "disable" it when every channel are released. We do have only one
>> DMA IP that managed several channels, since pm_runtime is doing
>> reference counting, we can call get for each channel request and put for
>> each release.
>> Did I miss something?
> We are saying same thing more or less :)

That was my impression as well, but I was not sure :-)

> Since it's one IP, and say have one clock, then doing per channel runtime
> get/put is redundant, No?

If the DMA driver is already counting the number of channel in use, 
you're right we can avoid that. It is already the case today?

Benoit


  reply	other threads:[~2010-08-04 10:36 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29  9:58 [PATCH 00/11] OMAP: DMA: HWMOD and DMA as platform driver Manjunatha GK
2010-07-29  9:58 ` [PATCH 01/11] OMAP: DMA: Introduce DMA device attributes Manjunatha GK
2010-07-29 12:35   ` Cousson, Benoit
2010-07-30  3:57     ` G, Manjunath Kondaiah
2010-08-04 10:13       ` Cousson, Benoit
2010-08-04 17:21         ` G, Manjunath Kondaiah
2010-08-04 18:13           ` Gadiyar, Anand
2010-07-29  9:58 ` [PATCH 02/11] OMAP2420: DMA: HWMOD: Add hwmod data structures Manjunatha GK
2010-07-29  9:58 ` [PATCH 03/11] OMAP2430: " Manjunatha GK
2010-07-29  9:58 ` [PATCH 04/11] OMAP3: " Manjunatha GK
2010-08-03 21:56   ` Kevin Hilman
2010-08-04  0:35     ` G, Manjunath Kondaiah
2010-08-04 10:08       ` Cousson, Benoit
2010-08-04 10:15         ` Shilimkar, Santosh
2010-08-04 10:23           ` Cousson, Benoit
2010-08-04 10:27             ` Shilimkar, Santosh
2010-08-04 10:36               ` Cousson, Benoit [this message]
2010-08-04 10:38                 ` Shilimkar, Santosh
2010-08-04 17:24                   ` G, Manjunath Kondaiah
2010-07-29  9:58 ` [PATCH 05/11] OMAP4: DMA: HWMOD: update OMAP4 data base Manjunatha GK
2010-07-29 12:48   ` Cousson, Benoit
2010-07-29  9:59 ` [PATCH 06/11] OMAP1: DMA: Introduce DMA driver as platform driver Manjunatha GK
2010-07-29  9:59 ` [PATCH 07/11] OMAP2/3/4: DMA: HWMOD: Device registration Manjunatha GK
2010-07-29  9:59 ` [PATCH 08/11] OMAP: DMA: Convert DMA library into DMA platform Driver Manjunatha GK
2010-07-29  9:59 ` [PATCH 09/11] OMAP: DMA: Implement generic errata handling Manjunatha GK
2010-07-29  9:59 ` [PATCH 10/11] OMAP: DMA: Use DMA device attributes Manjunatha GK
2010-07-29  9:59 ` [PATCH 11/11] sDMA: descriptor autoloading feature Manjunatha GK
2010-07-29 10:30   ` G, Manjunath Kondaiah
2010-08-11  7:43 ` [PATCH 00/11] OMAP: DMA: HWMOD and DMA as platform driver G, Manjunath Kondaiah

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=4C594296.30706@ti.com \
    --to=b-cousson@ti.com \
    --cc=charu@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=manjugk@ti.com \
    --cc=p-basak2@ti.com \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=sawant@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.