All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Prasanna Kumar <prasanna.ps@samsung.com>
Cc: Mike Turquette <mturquette@linaro.org>,
	linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com,
	kyungmin.park@samsung.com, linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] [media] s5p-mfc: Change MFC clock reference w.r.t Common Clock Framework
Date: Wed, 27 Mar 2013 18:51:23 +0100	[thread overview]
Message-ID: <5153319B.4050806@samsung.com> (raw)
In-Reply-To: <20130327020102.4014.2171@quantum>

On 03/27/2013 03:01 AM, Mike Turquette wrote:
> Quoting Prasanna Kumar (2013-03-25 22:20:51)
>> From: Prasanna Kumar <prasanna.ps@samsung.com>
>>
>> According to Common Clock framework , modified the method of getting

Huh ? Could you explain in detail what exactly in this patch is related
to the Common Clock Framework ? I guess you mean the new clocks driver ?

>> clock for MFC Block.
>>
>> Signed-off-by: Prasanna Kumar <prasanna.ps@samsung.com>
>> ---
>>  drivers/media/platform/s5p-mfc/s5p_mfc_pm.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
>> index 6aa38a5..b8ac8f6 100644
>> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
>> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
>> @@ -50,7 +50,7 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev)
>>                 goto err_p_ip_clk;
>>         }
>>  
>> -       pm->clock = clk_get(&dev->plat_dev->dev, dev->variant->mclk_name);
>> +       pm->clock = clk_get_parent(pm->clock_gate);
> 
> Ok, I'll bite.  Why make this change?  Was there an issue using
> clkdev/clk_get to get the clock you needed?

Yes, this appears a pretty mysterious change to me... I wonder, have
you altered anything at the clock tree definition to make it work ?
What platforms has this change been tested on ? For Exynos4, I've
changed the sclk_mfc clock definition, so it is possible to assign it
to the MFC IP by listing it in the codec DT node clocks property.
I suppose something similar is needed for Exynos5, if this is the
platform you needed that change for.

BTW, I think the mclk_name field should be removed from struct
s5p_mfc_variant, an the driver should use fixed name for the
second clock. Now there is "mfc", "sclk_mfc" used for Exynos4 and
"mfc", "aclk_133" for Exynos5. Drivers are not really supposed to
care about differences like this. Such differences could be easily
handled in the device tree. The DT binding documentation just
needs to specify the meaning of each clock name.

[1] http://www.spinics.net/lists/arm-kernel/msg233521.html

Regards,
-- 
Sylwester Nawrocki
Samsung Poland R&D Center

WARNING: multiple messages have this Message-ID (diff)
From: s.nawrocki@samsung.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [media] s5p-mfc: Change MFC clock reference w.r.t Common Clock Framework
Date: Wed, 27 Mar 2013 18:51:23 +0100	[thread overview]
Message-ID: <5153319B.4050806@samsung.com> (raw)
In-Reply-To: <20130327020102.4014.2171@quantum>

On 03/27/2013 03:01 AM, Mike Turquette wrote:
> Quoting Prasanna Kumar (2013-03-25 22:20:51)
>> From: Prasanna Kumar <prasanna.ps@samsung.com>
>>
>> According to Common Clock framework , modified the method of getting

Huh ? Could you explain in detail what exactly in this patch is related
to the Common Clock Framework ? I guess you mean the new clocks driver ?

>> clock for MFC Block.
>>
>> Signed-off-by: Prasanna Kumar <prasanna.ps@samsung.com>
>> ---
>>  drivers/media/platform/s5p-mfc/s5p_mfc_pm.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
>> index 6aa38a5..b8ac8f6 100644
>> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
>> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
>> @@ -50,7 +50,7 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev)
>>                 goto err_p_ip_clk;
>>         }
>>  
>> -       pm->clock = clk_get(&dev->plat_dev->dev, dev->variant->mclk_name);
>> +       pm->clock = clk_get_parent(pm->clock_gate);
> 
> Ok, I'll bite.  Why make this change?  Was there an issue using
> clkdev/clk_get to get the clock you needed?

Yes, this appears a pretty mysterious change to me... I wonder, have
you altered anything at the clock tree definition to make it work ?
What platforms has this change been tested on ? For Exynos4, I've
changed the sclk_mfc clock definition, so it is possible to assign it
to the MFC IP by listing it in the codec DT node clocks property.
I suppose something similar is needed for Exynos5, if this is the
platform you needed that change for.

BTW, I think the mclk_name field should be removed from struct
s5p_mfc_variant, an the driver should use fixed name for the
second clock. Now there is "mfc", "sclk_mfc" used for Exynos4 and
"mfc", "aclk_133" for Exynos5. Drivers are not really supposed to
care about differences like this. Such differences could be easily
handled in the device tree. The DT binding documentation just
needs to specify the meaning of each clock name.

[1] http://www.spinics.net/lists/arm-kernel/msg233521.html

Regards,
-- 
Sylwester Nawrocki
Samsung Poland R&D Center

  reply	other threads:[~2013-03-27 17:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26  5:20 [PATCH] [media] s5p-mfc: Change MFC clock reference w.r.t Common Clock Framework Prasanna Kumar
2013-03-26  5:20 ` Prasanna Kumar
2013-03-27  2:01 ` Mike Turquette
2013-03-27  2:01   ` Mike Turquette
2013-03-27  2:01   ` Mike Turquette
2013-03-27 17:51   ` Sylwester Nawrocki [this message]
2013-03-27 17:51     ` Sylwester Nawrocki

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=5153319B.4050806@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=prasanna.ps@samsung.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.