From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Michael Turquette <mturquette@linaro.org>,
Tomasz Figa <tomasz.figa@gmail.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Kukjin Kim <kgene@kernel.org>, Olof Johansson <olof@lixom.net>,
Doug Anderson <dianders@chromium.org>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Kevin Hilman <khilman@linaro.org>,
Tyler Baker <tyler.baker@linaro.org>,
Abhilash Kesavan <kesavan.abhilash@gmail.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>
Subject: Re: [RFC PATCH v3 1/2] clk: samsung: Add a clock lookup function
Date: Wed, 01 Apr 2015 10:26:50 +0200 [thread overview]
Message-ID: <551BABCA.5070800@collabora.co.uk> (raw)
In-Reply-To: <20150401012955.25195.29066@quantum>
Hello Mike,
On 04/01/2015 03:29 AM, Michael Turquette wrote:
> Quoting Javier Martinez Canillas (2015-03-31 01:59:39)
>> +Tomeu who I forgot to add to the cc list.
>>
>> Hello Mike,
>>
>> Thanks a lot for your feedback.
>>
>> On 03/31/2015 03:40 AM, Michael Turquette wrote:
>> >>
>> >> I don't performance is a big issue here. I just thought that since the
>> >> lookup table is already filled by the driver and the lookup function
>> >> is one line, we could use that instead to get the performance benefit.
>> >>
>> >> But I don't mind to drop this patch and use the generic lookup function
>> >> from the CCF API if that is preferred.
>> >
>> > Hello,
>> >
>> > I am not a fan of __clk_lookup and I don't like to see it used more and
>> > more outside of drivers/clk/clk.c. You mentioned that performance wasn't
>> > really the problem here. The real method for a driver to get a clock is
>> > with clk_get(). Any reason to not use that?
>> >
>>
>> I can certainly use clk_get() but I thought that the clk consumer API was
>> not supposed to be used from within clock drivers. That's why I mentioned
>> __clk_lookup() as a possibility since that is part of the provider API.
>
> I would like to remove __clk_lookup some day, so the fewer users now the
> better. Additionally, now that we have unique struct clk pointers from
> clk_get it makes a lot of sense for clk_register to stop returning
> pointers to a struct clk. Hopefully we can get around to that soon.
>
> These two points above are enough reason for the clock provider to use
> clk_get.
>
Got it.
>>
>> Below is a RFC patch that uses clk_get() [0]. That needs another patch
>> which was part of a previous RFC and adds an alias for the mdma0 clock:
>>
>> https://lkml.org/lkml/2015/3/27/769
>>
>> If you think that is the correct approach then I can post it as a patch.
>>
>> It would be great if you can also provide some feedback about the other
>> patch in the first RFC that instead of enabling and disabling the mdma0
>> clock in driver, does it in the exynos5420 platform PM callbacks:
>>
>> https://lkml.org/lkml/2015/3/27/770
>
> This seems like a big hack to me.
>
Ok, good to know. I just did because initially I thought that the clock
consumer API was not allowed to be used from within clock drivers.
>>
>> I was asked to do it in the exynos5420 clk driver instead but maybe you
>> have a different opinion on that.
>>
>> Best regards,
>> Javier
>>
>> [0]:
>> From c118df83da8cac65cc218ae9443622592222f5d0 Mon Sep 17 00:00:00 2001
>> From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
>> Date: Mon, 30 Mar 2015 17:11:40 +0200
>> Subject: [RFC] clk: exynos5420: Make sure MDMA0 clock is enabled during
>> suspend
>>
>> Commit ae43b3289186 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power
>> Management support v12") added pm support for the pl330 dma driver but
>> it makes the clock for the Exynos5420 MDMA0 DMA controller to be gated
>> during suspend and this clock needs to remain enabled in order to make
>> the system resume from a system suspend state.
>>
>> To make sure that the clock is enabled during suspend, enable it prior
>> to entering a suspend state and disable it once the system has resumed.
>
> I'd like to understand the issue a bit further. Isn't the correct
> solution that the clk's prepare/unprepare and enable/disable callbacks
> should support the CG_STATUS requirement?
>
Agreed, I'll take a look to that.
> Regards,
> Mike
>
Best regards,
Javier
WARNING: multiple messages have this Message-ID (diff)
From: javier.martinez@collabora.co.uk (Javier Martinez Canillas)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v3 1/2] clk: samsung: Add a clock lookup function
Date: Wed, 01 Apr 2015 10:26:50 +0200 [thread overview]
Message-ID: <551BABCA.5070800@collabora.co.uk> (raw)
In-Reply-To: <20150401012955.25195.29066@quantum>
Hello Mike,
On 04/01/2015 03:29 AM, Michael Turquette wrote:
> Quoting Javier Martinez Canillas (2015-03-31 01:59:39)
>> +Tomeu who I forgot to add to the cc list.
>>
>> Hello Mike,
>>
>> Thanks a lot for your feedback.
>>
>> On 03/31/2015 03:40 AM, Michael Turquette wrote:
>> >>
>> >> I don't performance is a big issue here. I just thought that since the
>> >> lookup table is already filled by the driver and the lookup function
>> >> is one line, we could use that instead to get the performance benefit.
>> >>
>> >> But I don't mind to drop this patch and use the generic lookup function
>> >> from the CCF API if that is preferred.
>> >
>> > Hello,
>> >
>> > I am not a fan of __clk_lookup and I don't like to see it used more and
>> > more outside of drivers/clk/clk.c. You mentioned that performance wasn't
>> > really the problem here. The real method for a driver to get a clock is
>> > with clk_get(). Any reason to not use that?
>> >
>>
>> I can certainly use clk_get() but I thought that the clk consumer API was
>> not supposed to be used from within clock drivers. That's why I mentioned
>> __clk_lookup() as a possibility since that is part of the provider API.
>
> I would like to remove __clk_lookup some day, so the fewer users now the
> better. Additionally, now that we have unique struct clk pointers from
> clk_get it makes a lot of sense for clk_register to stop returning
> pointers to a struct clk. Hopefully we can get around to that soon.
>
> These two points above are enough reason for the clock provider to use
> clk_get.
>
Got it.
>>
>> Below is a RFC patch that uses clk_get() [0]. That needs another patch
>> which was part of a previous RFC and adds an alias for the mdma0 clock:
>>
>> https://lkml.org/lkml/2015/3/27/769
>>
>> If you think that is the correct approach then I can post it as a patch.
>>
>> It would be great if you can also provide some feedback about the other
>> patch in the first RFC that instead of enabling and disabling the mdma0
>> clock in driver, does it in the exynos5420 platform PM callbacks:
>>
>> https://lkml.org/lkml/2015/3/27/770
>
> This seems like a big hack to me.
>
Ok, good to know. I just did because initially I thought that the clock
consumer API was not allowed to be used from within clock drivers.
>>
>> I was asked to do it in the exynos5420 clk driver instead but maybe you
>> have a different opinion on that.
>>
>> Best regards,
>> Javier
>>
>> [0]:
>> From c118df83da8cac65cc218ae9443622592222f5d0 Mon Sep 17 00:00:00 2001
>> From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
>> Date: Mon, 30 Mar 2015 17:11:40 +0200
>> Subject: [RFC] clk: exynos5420: Make sure MDMA0 clock is enabled during
>> suspend
>>
>> Commit ae43b3289186 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power
>> Management support v12") added pm support for the pl330 dma driver but
>> it makes the clock for the Exynos5420 MDMA0 DMA controller to be gated
>> during suspend and this clock needs to remain enabled in order to make
>> the system resume from a system suspend state.
>>
>> To make sure that the clock is enabled during suspend, enable it prior
>> to entering a suspend state and disable it once the system has resumed.
>
> I'd like to understand the issue a bit further. Isn't the correct
> solution that the clk's prepare/unprepare and enable/disable callbacks
> should support the CG_STATUS requirement?
>
Agreed, I'll take a look to that.
> Regards,
> Mike
>
Best regards,
Javier
next prev parent reply other threads:[~2015-04-01 8:26 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 15:53 [RFC PATCH v3 0/2] ARM: EXYNOS: Fix Suspend-to-RAM on Exynos5420 Javier Martinez Canillas
2015-03-30 15:53 ` Javier Martinez Canillas
2015-03-30 15:53 ` [RFC PATCH v3 1/2] clk: samsung: Add a clock lookup function Javier Martinez Canillas
2015-03-30 15:53 ` Javier Martinez Canillas
2015-03-30 16:02 ` Tomasz Figa
2015-03-30 16:02 ` Tomasz Figa
2015-03-30 16:08 ` Javier Martinez Canillas
2015-03-30 16:08 ` Javier Martinez Canillas
2015-03-31 1:40 ` Michael Turquette
2015-03-31 1:40 ` Michael Turquette
2015-03-31 8:59 ` Javier Martinez Canillas
2015-03-31 8:59 ` Javier Martinez Canillas
2015-04-01 1:29 ` Michael Turquette
2015-04-01 1:29 ` Michael Turquette
2015-04-01 8:26 ` Javier Martinez Canillas [this message]
2015-04-01 8:26 ` Javier Martinez Canillas
2015-03-30 15:53 ` [RFC PATCH v3 2/2] clk: exynos5420: Make sure MDMA0 clock is enabled during suspend Javier Martinez Canillas
2015-03-30 15:53 ` Javier Martinez Canillas
2015-03-30 16:07 ` Tomasz Figa
2015-03-30 16:07 ` Tomasz Figa
2015-03-30 16:16 ` Javier Martinez Canillas
2015-03-30 16:16 ` Javier Martinez Canillas
[not found] ` <CAM4voanL3A=dS8Z-ovi_-EDi9ctyaxZkvjajp+3ZjyNAnqR1aQ@mail.gmail.com>
2015-03-31 20:00 ` Javier Martinez Canillas
2015-03-31 20:00 ` Javier Martinez Canillas
2015-04-01 11:03 ` Sylwester Nawrocki
2015-04-01 11:03 ` Sylwester Nawrocki
2015-04-01 11:44 ` Javier Martinez Canillas
2015-04-01 11:44 ` Javier Martinez Canillas
2015-04-01 17:31 ` Sylwester Nawrocki
2015-04-01 17:31 ` Sylwester Nawrocki
2015-04-01 22:31 ` Javier Martinez Canillas
2015-04-01 22:31 ` Javier Martinez Canillas
2015-04-02 12:22 ` Abhilash Kesavan
2015-04-02 12:22 ` Abhilash Kesavan
2015-04-07 10:59 ` Javier Martinez Canillas
2015-04-07 10:59 ` Javier Martinez Canillas
2015-04-07 11:56 ` Javier Martinez Canillas
2015-04-07 11:56 ` Javier Martinez Canillas
2015-04-07 12:46 ` Tomasz Figa
2015-04-07 12:46 ` Tomasz Figa
2015-04-07 14:11 ` Javier Martinez Canillas
2015-04-07 14:11 ` Javier Martinez Canillas
2015-04-07 14:38 ` Abhilash Kesavan
2015-04-07 14:38 ` Abhilash Kesavan
2015-04-07 15:00 ` Javier Martinez Canillas
2015-04-07 15:00 ` Javier Martinez Canillas
2015-04-08 1:50 ` Abhilash Kesavan
2015-04-08 1:50 ` Abhilash Kesavan
2015-04-07 18:51 ` Kevin Hilman
2015-04-07 18:51 ` Kevin Hilman
2015-04-07 18:51 ` Kevin Hilman
2015-04-07 21:28 ` Tomasz Figa
2015-04-07 21:28 ` Tomasz Figa
2015-04-08 5:36 ` Javier Martinez Canillas
2015-04-08 5:36 ` Javier Martinez Canillas
2015-04-07 14:11 ` Abhilash Kesavan
2015-04-07 14:11 ` Abhilash Kesavan
2015-04-07 14:26 ` Javier Martinez Canillas
2015-04-07 14:26 ` Javier Martinez Canillas
2015-03-31 21:02 ` Kevin Hilman
2015-03-31 21:02 ` Kevin Hilman
2015-03-31 21:02 ` Kevin Hilman
2015-04-01 3:19 ` Abhilash Kesavan
2015-04-01 3:19 ` Abhilash Kesavan
2015-04-01 4:03 ` Kevin Hilman
2015-04-01 4:03 ` Kevin Hilman
2015-04-01 4:03 ` Kevin Hilman
2015-04-01 9:16 ` Krzysztof Kozlowski
2015-04-01 9:16 ` Krzysztof Kozlowski
2015-04-01 19:02 ` Michael Turquette
2015-04-01 19:02 ` Michael Turquette
2015-04-01 19:02 ` Michael Turquette
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=551BABCA.5070800@collabora.co.uk \
--to=javier.martinez@collabora.co.uk \
--cc=cw00.choi@samsung.com \
--cc=dianders@chromium.org \
--cc=k.kozlowski@samsung.com \
--cc=kesavan.abhilash@gmail.com \
--cc=kgene@kernel.org \
--cc=khilman@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=olof@lixom.net \
--cc=s.nawrocki@samsung.com \
--cc=sboyd@codeaurora.org \
--cc=tomasz.figa@gmail.com \
--cc=tomeu.vizoso@collabora.com \
--cc=tyler.baker@linaro.org \
/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.