Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1252574
| From | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] clk: Make of_clk_get_parent_name() robust with #clock-cells = 1 |
| Date | 2015-10-21 10:50 +0200 |
| Message-ID | <qlXfQ-6bq-17@gated-at.bofh.it> (permalink) |
| References | <qjWQW-880-25@gated-at.bofh.it> <qk08a-4Qv-13@gated-at.bofh.it> |
| Organization | Free Electrons |
Stephen, On Thu, 15 Oct 2015 16:19:38 -0700, Stephen Boyd wrote: > If a clock provider has #clock-cells = 1 and we call > of_clk_get_parent_name() on it we may end up returning the name > of the provider node if the provider doesn't have a > clock-output-names property. This doesn't make sense, especially > when you consider that calling of_clk_get_parent_name() on such a > node with different indices will return the same name each time. > > Let's try getting the clock from the framework via of_clk_get() > instead, and only fallback to the node name if we have a provider > with #clock-cells = 0. This way, we can't hand out the same name > for different clocks when we don't actually know their names. > > Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> > --- > drivers/clk/clk.c | 22 ++++++++++++++++++++-- > 1 file changed, 20 insertions(+), 2 deletions(-) Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> I tested on top of 4.3-rc5 and the Armada XP per-CPU clocks are now properly parented with their common parent "cpuclk". Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] clk: Make of_clk_get_parent_name() robust with #clock-cells = 1 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2015-10-21 10:50 +0200
csiph-web