From: Tero Kristo <t-kristo@ti.com>
To: Stephen Boyd <sboyd@kernel.org>, <linux-clk@vger.kernel.org>,
<mturquette@baylibre.com>
Cc: <linux-omap@vger.kernel.org>, <tony@atomide.com>
Subject: Re: [PATCH 0/4] clk: ti: get rid of CLK_IS_BASIC
Date: Mon, 25 Feb 2019 09:18:57 +0200 [thread overview]
Message-ID: <5e6295e2-6916-5ffb-e9e9-c0fa4ed29aa5@ti.com> (raw)
In-Reply-To: <155086505454.77512.10530464362384162696@swboyd.mtv.corp.google.com>
On 22/02/2019 21:50, Stephen Boyd wrote:
> Quoting Tero Kristo (2019-01-15 01:15:11)
>> Hi Stephen,
>>
>> As requested, this series gets rid of CLK_IS_BASIC flag usage from
>> TI clock drivers.
>>
>> Boot tested on am3/am4/am5/omap3/omap4 series of SoCs. Also, ran a quick
>> suspend/resume test on omap3/omap4/am5.
>>
>
> I'm looking at clk-next now that this is all merged in and I still see
> one usage of CLK_IS_BASIC in the omap2 hwmod code.
>
> arch/arm/mach-omap2/omap_hwmod.c: if (__clk_get_flags(oh->_clk) & CLK_IS_BASIC)
>
> Can that also be removed? If not, what clk types are on this platform?
> Maybe I can remove CLK_IS_BASIC from every clk type except for the ones
> that this code is checking for.
>
Hmm, I missed this in my update, only looked at the drivers/clk/ti
portion of code. However, this can be fixed with the following patch, I
would need to export the omap2_clk_is_hw_omap() func from the driver and
call it from the omap2 platform code. What do you think? Shall I post
this as an official change? This one still has the issue that I am
calling __clk_get_hw() though.
---
diff --git a/arch/arm/mach-omap2/omap_hwmod.c
b/arch/arm/mach-omap2/omap_hwmod.c
index 3a04c73..baadddf 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -648,10 +648,10 @@ static struct clockdomain *_get_clkdm(struct
omap_hwmod *oh)
if (oh->clkdm) {
return oh->clkdm;
} else if (oh->_clk) {
- if (__clk_get_flags(oh->_clk) & CLK_IS_BASIC)
+ if (!omap2_clk_is_hw_omap(__clk_get_hw(oh->_clk)))
return NULL;
clk = to_clk_hw_omap(__clk_get_hw(oh->_clk));
- return clk->clkdm;
+ return clk->clkdm;
}
return NULL;
}
diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h
index 1c0fac5..4223a39 100644
--- a/drivers/clk/ti/clock.h
+++ b/drivers/clk/ti/clock.h
@@ -303,7 +303,6 @@ long omap4_dpll_regm4xen_round_rate(struct clk_hw *hw,
int omap4_dpll_regm4xen_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req);
int omap2_clk_for_each(int (*fn)(struct clk_hw_omap *hw));
-bool omap2_clk_is_hw_omap(struct clk_hw *hw);
extern struct ti_clk_ll_ops *ti_clk_ll_ops;
diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h
index 78872ef..2821f7c 100644
--- a/include/linux/clk/ti.h
+++ b/include/linux/clk/ti.h
@@ -243,6 +243,7 @@ struct ti_clk_ll_ops {
#define to_clk_hw_omap(_hw) container_of(_hw, struct clk_hw_omap, hw)
+bool omap2_clk_is_hw_omap(struct clk_hw *hw);
int omap2_clk_disable_autoidle_all(void);
int omap2_clk_enable_autoidle_all(void);
int omap2_clk_allow_idle(struct clk *clk);
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2019-02-25 7:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 9:15 [PATCH 0/4] clk: ti: get rid of CLK_IS_BASIC Tero Kristo
2019-01-15 9:15 ` [PATCH 1/4] clk: ti: move clk_hw_omap list handling under generic part of the driver Tero Kristo
2019-01-15 9:15 ` [PATCH 2/4] clk: ti: add new API for checking if a provided clock is an OMAP clock Tero Kristo
2019-01-15 9:15 ` [PATCH 3/4] clk: ti: remove usage of CLK_IS_BASIC Tero Kristo
2019-01-15 9:15 ` [PATCH 4/4] clk: ti: generalize the init sequence of clk_hw_omap clocks Tero Kristo
2019-01-15 18:20 ` [PATCH 0/4] clk: ti: get rid of CLK_IS_BASIC Tony Lindgren
2019-01-15 18:31 ` Tero Kristo
2019-01-15 20:24 ` Andreas Kemnade
2019-01-21 19:58 ` Tony Lindgren
2019-02-15 19:19 ` Tero Kristo
2019-02-22 19:50 ` Stephen Boyd
2019-02-25 7:18 ` Tero Kristo [this message]
2019-02-25 17:12 ` Stephen Boyd
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=5e6295e2-6916-5ffb-e9e9-c0fa4ed29aa5@ti.com \
--to=t-kristo@ti.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox