From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH 1/2] clk: aspeed: add critical clock setting logic
Date: Wed, 15 Jan 2020 17:44:51 -0800 [thread overview]
Message-ID: <2088ff06-2bf0-b158-6df7-17171dde4e03@linux.intel.com> (raw)
In-Reply-To: <CACPK8Xez9XQPQCsUU1Fu_POTJ3dh3tGJvK=otJdMYv40aZLqsw@mail.gmail.com>
On 1/15/2020 5:38 PM, Joel Stanley wrote:
> On Wed, 15 Jan 2020 at 21:25, Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> wrote:
>>
>> This commit adds critical clock setting logic that applies
>> CLK_IS_CRITICAL flag if it detects 'clock-critical' property in
>> device tree.
>>
>> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
>> ---
>> drivers/clk/clk-aspeed.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c
>> index 411ff5fb2c07..d22eeb574ede 100644
>> --- a/drivers/clk/clk-aspeed.c
>> +++ b/drivers/clk/clk-aspeed.c
>> @@ -541,8 +541,11 @@ static int aspeed_clk_probe(struct platform_device *pdev)
>>
>> for (i = 0; i < ARRAY_SIZE(aspeed_gates); i++) {
>> const struct aspeed_gate_data *gd = &aspeed_gates[i];
>> + unsigned long flags = gd->flags;
>> u32 gate_flags;
>>
>> + of_clk_detect_critical(pdev->dev.of_node, i, &flags);
>
> This makes sense to me.
>
>> +
>> /* Special case: the USB port 1 clock (bit 14) is always
>> * working the opposite way from the other ones.
>> */
>> @@ -550,7 +553,7 @@ static int aspeed_clk_probe(struct platform_device *pdev)
>> hw = aspeed_clk_hw_register_gate(dev,
>> gd->name,
>> gd->parent_name,
>> - gd->flags,
>> + flags,
>
> For completeness should we make this
>
> flags | gd->flags
Not needed. of_clk_detect_critical uses OR operation inside.
>> map,
>> gd->clock_idx,
>> gd->reset_idx,
>> --
>> 2.17.1
>>
WARNING: multiple messages have this Message-ID (diff)
From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
To: Joel Stanley <joel@jms.id.au>
Cc: linux-aspeed <linux-aspeed@lists.ozlabs.org>,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
OpenBMC Maillist <openbmc@lists.ozlabs.org>,
Andrew Jeffery <andrew@aj.id.au>,
linux-clk@vger.kernel.org
Subject: Re: [PATCH 1/2] clk: aspeed: add critical clock setting logic
Date: Wed, 15 Jan 2020 17:44:51 -0800 [thread overview]
Message-ID: <2088ff06-2bf0-b158-6df7-17171dde4e03@linux.intel.com> (raw)
In-Reply-To: <CACPK8Xez9XQPQCsUU1Fu_POTJ3dh3tGJvK=otJdMYv40aZLqsw@mail.gmail.com>
On 1/15/2020 5:38 PM, Joel Stanley wrote:
> On Wed, 15 Jan 2020 at 21:25, Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> wrote:
>>
>> This commit adds critical clock setting logic that applies
>> CLK_IS_CRITICAL flag if it detects 'clock-critical' property in
>> device tree.
>>
>> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
>> ---
>> drivers/clk/clk-aspeed.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c
>> index 411ff5fb2c07..d22eeb574ede 100644
>> --- a/drivers/clk/clk-aspeed.c
>> +++ b/drivers/clk/clk-aspeed.c
>> @@ -541,8 +541,11 @@ static int aspeed_clk_probe(struct platform_device *pdev)
>>
>> for (i = 0; i < ARRAY_SIZE(aspeed_gates); i++) {
>> const struct aspeed_gate_data *gd = &aspeed_gates[i];
>> + unsigned long flags = gd->flags;
>> u32 gate_flags;
>>
>> + of_clk_detect_critical(pdev->dev.of_node, i, &flags);
>
> This makes sense to me.
>
>> +
>> /* Special case: the USB port 1 clock (bit 14) is always
>> * working the opposite way from the other ones.
>> */
>> @@ -550,7 +553,7 @@ static int aspeed_clk_probe(struct platform_device *pdev)
>> hw = aspeed_clk_hw_register_gate(dev,
>> gd->name,
>> gd->parent_name,
>> - gd->flags,
>> + flags,
>
> For completeness should we make this
>
> flags | gd->flags
Not needed. of_clk_detect_critical uses OR operation inside.
>> map,
>> gd->clock_idx,
>> gd->reset_idx,
>> --
>> 2.17.1
>>
next prev parent reply other threads:[~2020-01-16 1:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-15 21:26 [PATCH 0/2] clk: aspeed/ast2600: Add critical clock setting logic Jae Hyun Yoo
2020-01-15 21:26 ` Jae Hyun Yoo
2020-01-15 21:26 ` [PATCH 1/2] clk: aspeed: add " Jae Hyun Yoo
2020-01-15 21:26 ` Jae Hyun Yoo
2020-01-16 1:38 ` Joel Stanley
2020-01-16 1:38 ` Joel Stanley
2020-01-16 1:44 ` Jae Hyun Yoo [this message]
2020-01-16 1:44 ` Jae Hyun Yoo
2020-01-16 9:57 ` Paul Menzel
2020-01-16 9:57 ` Paul Menzel
2020-01-16 18:41 ` Jae Hyun Yoo
2020-01-16 18:41 ` Jae Hyun Yoo
2020-01-30 17:42 ` Stephen Boyd
2020-01-30 17:42 ` Stephen Boyd
2020-01-30 20:59 ` Jae Hyun Yoo
2020-01-30 20:59 ` Jae Hyun Yoo
2020-01-15 21:26 ` [PATCH 2/2] clk: ast2600: " Jae Hyun Yoo
2020-01-15 21:26 ` Jae Hyun Yoo
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=2088ff06-2bf0-b158-6df7-17171dde4e03@linux.intel.com \
--to=jae.hyun.yoo@linux.intel.com \
--cc=linux-aspeed@lists.ozlabs.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.