diff for duplicates of <1488294662.3913.11.camel@synopsys.com> diff --git a/a/1.txt b/N1/1.txt index 4e938fb..629a561 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,6 +1,6 @@ Hi Vineet, -On Wed, 2017-02-22@10:34 -0800, Vineet Gupta wrote: +On Wed, 2017-02-22 at 10:34 -0800, Vineet Gupta wrote: > On 02/22/2017 02:36 AM, Vlad Zakharov wrote: > > > > We were reading clock rate directly from device tree "clock-frequency" @@ -15,48 +15,48 @@ On Wed, 2017-02-22@10:34 -0800, Vineet Gupta wrote: > > driver. This approach is much more flexible and will work for both fixed > > and mutable clocks. > > -> > Signed-off-by: Vlad Zakharov <vzakhar at synopsys.com> +> > Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com> > > --- -> > ?arch/arc/kernel/setup.c | 6 ++++-- -> > ?1 file changed, 4 insertions(+), 2 deletions(-) +> > arch/arc/kernel/setup.c | 6 ++++-- +> > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c > > index 3093fa8..49b0804 100644 > > --- a/arch/arc/kernel/setup.c > > +++ b/arch/arc/kernel/setup.c > > @@ -10,6 +10,7 @@ -> > ?#include <linux/fs.h> -> > ?#include <linux/delay.h> -> > ?#include <linux/root_dev.h> +> > #include <linux/fs.h> +> > #include <linux/delay.h> +> > #include <linux/root_dev.h> > > +#include <linux/clk.h> -> > ?#include <linux/clk-provider.h> -> > ?#include <linux/clocksource.h> -> > ?#include <linux/console.h> +> > #include <linux/clk-provider.h> +> > #include <linux/clocksource.h> +> > #include <linux/console.h> > > @@ -488,7 +489,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) -> > ?{ -> > ? char *str; -> > ? int cpu_id = ptr_to_cpu(v); +> > { +> > char *str; +> > int cpu_id = ptr_to_cpu(v); > > - struct device_node *core_clk = of_find_node_by_name(NULL, "core_clk"); > > + struct device *cpu_dev = get_cpu_device(cpu_id); > > + struct clk *cpu_clk = clk_get(cpu_dev, "core_clk"); -> > ? u32 freq = 0; -> > ? -> > ? if (!cpu_online(cpu_id)) { +> > u32 freq = 0; +> > +> > if (!cpu_online(cpu_id)) { > > @@ -502,7 +504,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) -> > ? -> > ? seq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE)); -> > ? +> > +> > seq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE)); +> > > > - of_property_read_u32(core_clk, "clock-frequency", &freq); > > + freq = clk_get_rate(cpu_clk); -> > ? if (freq) -> > ? seq_printf(m, "CPU speed\t: %u.%02u Mhz\n", -> > ? ???freq / 1000000, (freq / 10000) % 100); +> > if (freq) +> > seq_printf(m, "CPU speed\t: %u.%02u Mhz\n", +> > freq / 1000000, (freq / 10000) % 100); > > I'm not too familiar with clk API, do u need to clk_put() afterwards ? @Alexey can > u please check ! I'm not really sure why clk_put() got in the picture here at all. -As it is mentioned here?http://elixir.free-electrons.com/source/include/linux/clk.h?v=4.10#L305 +As it is mentioned here http://elixir.free-electrons.com/source/include/linux/clk.h?v=4.10#L305 clk_put() means "free" the clock source. Anyways this patch alone was not sufficient due to missing changes in .dts files and diff --git a/a/content_digest b/N1/content_digest index 4932066..350bbfc 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,14 +1,17 @@ "ref\01487759796-14418-1-git-send-email-vzakhar@synopsys.com\0" "ref\0d1db32ca-333e-e900-171e-3b0735cba2a2@synopsys.com\0" - "From\0Alexey.Brodkin@synopsys.com (Alexey Brodkin)\0" - "Subject\0[PATCH] arc: get rate from clk driver instead of reading device tree\0" + "From\0Alexey Brodkin <Alexey.Brodkin@synopsys.com>\0" + "Subject\0Re: [PATCH] arc: get rate from clk driver instead of reading device tree\0" "Date\0Tue, 28 Feb 2017 15:11:03 +0000\0" - "To\0linux-snps-arc@lists.infradead.org\0" + "To\0Vineet Gupta <Vineet.Gupta1@synopsys.com>\0" + "Cc\0linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>" + Vlad Zakharov <Vladislav.Zakharov@synopsys.com> + " linux-snps-arc@lists.infradead.org <linux-snps-arc@lists.infradead.org>\0" "\00:1\0" "b\0" "Hi Vineet,\n" "\n" - "On Wed, 2017-02-22@10:34 -0800, Vineet Gupta wrote:\n" + "On Wed, 2017-02-22 at 10:34 -0800, Vineet Gupta wrote:\n" "> On 02/22/2017 02:36 AM, Vlad Zakharov wrote:\n" "> > \n" "> > We were reading clock rate directly from device tree \"clock-frequency\"\n" @@ -23,48 +26,48 @@ "> > driver. This approach is much more flexible and will work for both fixed\n" "> > and mutable clocks.\n" "> > \n" - "> > Signed-off-by: Vlad Zakharov <vzakhar at synopsys.com>\n" + "> > Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>\n" "> > ---\n" - "> > ?arch/arc/kernel/setup.c | 6 ++++--\n" - "> > ?1 file changed, 4 insertions(+), 2 deletions(-)\n" + "> > \302\240arch/arc/kernel/setup.c | 6 ++++--\n" + "> > \302\2401 file changed, 4 insertions(+), 2 deletions(-)\n" "> > \n" "> > diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c\n" "> > index 3093fa8..49b0804 100644\n" "> > --- a/arch/arc/kernel/setup.c\n" "> > +++ b/arch/arc/kernel/setup.c\n" "> > @@ -10,6 +10,7 @@\n" - "> > ?#include <linux/fs.h>\n" - "> > ?#include <linux/delay.h>\n" - "> > ?#include <linux/root_dev.h>\n" + "> > \302\240#include <linux/fs.h>\n" + "> > \302\240#include <linux/delay.h>\n" + "> > \302\240#include <linux/root_dev.h>\n" "> > +#include <linux/clk.h>\n" - "> > ?#include <linux/clk-provider.h>\n" - "> > ?#include <linux/clocksource.h>\n" - "> > ?#include <linux/console.h>\n" + "> > \302\240#include <linux/clk-provider.h>\n" + "> > \302\240#include <linux/clocksource.h>\n" + "> > \302\240#include <linux/console.h>\n" "> > @@ -488,7 +489,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)\n" - "> > ?{\n" - "> > ?\tchar *str;\n" - "> > ?\tint cpu_id = ptr_to_cpu(v);\n" + "> > \302\240{\n" + "> > \302\240\tchar *str;\n" + "> > \302\240\tint cpu_id = ptr_to_cpu(v);\n" "> > -\tstruct device_node *core_clk = of_find_node_by_name(NULL, \"core_clk\");\n" "> > +\tstruct device *cpu_dev = get_cpu_device(cpu_id);\n" "> > +\tstruct clk *cpu_clk = clk_get(cpu_dev, \"core_clk\");\n" - "> > ?\tu32 freq = 0;\n" - "> > ?\n" - "> > ?\tif (!cpu_online(cpu_id)) {\n" + "> > \302\240\tu32 freq = 0;\n" + "> > \302\240\n" + "> > \302\240\tif (!cpu_online(cpu_id)) {\n" "> > @@ -502,7 +504,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)\n" - "> > ?\n" - "> > ?\tseq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE));\n" - "> > ?\n" + "> > \302\240\n" + "> > \302\240\tseq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE));\n" + "> > \302\240\n" "> > -\tof_property_read_u32(core_clk, \"clock-frequency\", &freq);\n" "> > +\tfreq = clk_get_rate(cpu_clk);\n" - "> > ?\tif (freq)\n" - "> > ?\t\tseq_printf(m, \"CPU speed\\t: %u.%02u Mhz\\n\",\n" - "> > ?\t\t\t???freq / 1000000, (freq / 10000) % 100);\n" + "> > \302\240\tif (freq)\n" + "> > \302\240\t\tseq_printf(m, \"CPU speed\\t: %u.%02u Mhz\\n\",\n" + "> > \302\240\t\t\t\302\240\302\240\302\240freq / 1000000, (freq / 10000) % 100);\n" "> \n" "> I'm not too familiar with clk API, do u need to clk_put() afterwards ? @Alexey can\n" "> u please check !\n" "\n" "I'm not really sure why clk_put() got in the picture here at all.\n" - "As it is mentioned here?http://elixir.free-electrons.com/source/include/linux/clk.h?v=4.10#L305\n" + "As it is mentioned here\302\240http://elixir.free-electrons.com/source/include/linux/clk.h?v=4.10#L305\n" "clk_put() means \"free\" the clock source.\n" "\n" "Anyways this patch alone was not sufficient due to missing changes in .dts files and\n" @@ -72,4 +75,4 @@ "\n" -Alexey -91ae04834f500990beb62ab37a743b9e7482d5f41815482903a7fdc714b97d05 +886c729ffb0cafb36f0998d03e1839a1a50a3b28625463adee54b73105eeb2c6
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.