Message ID | 1547543715-16467-1-git-send-email-t-kristo@ti.com |
---|---|
Headers | show |
Series | clk: ti: get rid of CLK_IS_BASIC | expand |
* Tero Kristo <t-kristo@ti.com> [190115 09:15]: > 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. Does this also fix the issue Andreas was fixing earlier or is this separate clean-up? Regards, Tony
On 15/01/2019 20:20, Tony Lindgren wrote: > * Tero Kristo <t-kristo@ti.com> [190115 09:15]: >> 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. > > Does this also fix the issue Andreas was fixing earlier > or is this separate clean-up? The series from Andreas would be needed on top of this. -Tero -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Hi Tero, On Tue, 15 Jan 2019 20:31:54 +0200 Tero Kristo <t-kristo@ti.com> wrote: > On 15/01/2019 20:20, Tony Lindgren wrote: > > * Tero Kristo <t-kristo@ti.com> [190115 09:15]: > >> 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. > > > > Does this also fix the issue Andreas was fixing earlier > > or is this separate clean-up? > > The series from Andreas would be needed on top of this. > thanks for this cleanup. I will rebase my work upon it the next days. Regards, Andreas
* Tero Kristo <t-kristo@ti.com> [190115 18:32]: > On 15/01/2019 20:20, Tony Lindgren wrote: > > * Tero Kristo <t-kristo@ti.com> [190115 09:15]: > > > 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. > > > > Does this also fix the issue Andreas was fixing earlier > > or is this separate clean-up? > > The series from Andreas would be needed on top of this. OK so I acked Andreas' series, and here's an ack for this series too: Acked-by: Tony Lindgren <tony@atomide.com>
On 21/01/2019 21:58, Tony Lindgren wrote: > * Tero Kristo <t-kristo@ti.com> [190115 18:32]: >> On 15/01/2019 20:20, Tony Lindgren wrote: >>> * Tero Kristo <t-kristo@ti.com> [190115 09:15]: >>>> 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. >>> >>> Does this also fix the issue Andreas was fixing earlier >>> or is this separate clean-up? >> >> The series from Andreas would be needed on top of this. > > OK so I acked Andreas' series, and here's an ack for > this series too: > > Acked-by: Tony Lindgren <tony@atomide.com> > Queued up for 5.1, thanks. -Tero -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
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.
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
Quoting Tero Kristo (2019-02-24 23:18:57) > 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. Looks ok to me. Please post it as an official change. I think we should look into making clk domains with genpds and plumb that through the clk framework so that devices calling clk_get() can have their domains attached automatically on clk_get(). Maybe that would help here. Not sure.