diff for duplicates of <1562268.fb58QJ4jV7@diego> diff --git a/a/1.txt b/N1/1.txt index 34e50cb..419ce33 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,8 +1,8 @@ Hi Xing, Am Dienstag, 29. Dezember 2015, 10:34:09 schrieb Xing Zheng: -> On 2015年12月29日 09:59, Yakir Yang wrote: -> > On 12/28/2015 08:41 PM, Heiko Stübner wrote: +> On 2015?12?29? 09:59, Yakir Yang wrote: +> > On 12/28/2015 08:41 PM, Heiko St?bner wrote: > >> Am Montag, 28. Dezember 2015, 17:03:53 schrieb Xing Zheng: > >>> Due to referred old version TRM, there is incorrect emac clock node, > >>> we should fix it. The SEL_21_9 is the parent of SEL_21_4. @@ -63,3 +63,10 @@ it fixes the issue at least. Heiko +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: clk-keep-req-rate.diff +Type: text/x-patch +Size: 2997 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160101/1db1687e/attachment-0001.bin> diff --git a/a/2.hdr b/a/2.hdr deleted file mode 100644 index beef6cf..0000000 --- a/a/2.hdr +++ /dev/null @@ -1,3 +0,0 @@ -Content-Disposition: attachment; filename="clk-keep-req-rate.diff" -Content-Transfer-Encoding: 7Bit -Content-Type: text/x-patch; charset="UTF-8"; name="clk-keep-req-rate.diff" diff --git a/a/2.txt b/a/2.txt deleted file mode 100644 index 156ed6a..0000000 --- a/a/2.txt +++ /dev/null @@ -1,97 +0,0 @@ -diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c -index 7bbb0fd..83a7234 100644 ---- a/drivers/clk/clk.c -+++ b/drivers/clk/clk.c -@@ -1423,6 +1423,9 @@ static struct clk_core *clk_propagate_rate_change(struct clk_core *core, - return fail_clk; - } - -+static int clk_core_set_rate_nolock(struct clk_core *core, -+ unsigned long req_rate); -+ - /* - * walk down a subtree and set the new rates notifying the rate - * change on the way -@@ -1438,6 +1441,7 @@ static void clk_change_rate(struct clk_core *core) - - old_rate = core->rate; - -+printk("%s: %s requested %lu, new %lu\n", __func__, core->name, core->req_rate, core->new_rate); - if (core->new_parent) - best_parent_rate = core->new_parent->rate; - else if (core->parent) -@@ -1507,6 +1511,12 @@ static void clk_change_rate(struct clk_core *core) - /* handle the new child who might not be in core->children yet */ - if (core->new_child) - clk_change_rate(core->new_child); -+ -+ /* FIXME: add flag to limit to specific clocks? */ -+ if (core->req_rate && core->new_rate != old_rate) { -+ printk("\t\ttrying to adapt %s\n", core->name); -+ clk_core_set_rate_nolock(core, core->req_rate); -+ } - } - - static int clk_core_set_rate_nolock(struct clk_core *core, -@@ -1520,8 +1530,10 @@ static int clk_core_set_rate_nolock(struct clk_core *core, - return 0; - - /* bail early if nothing to do */ -- if (rate == clk_core_get_rate_nolock(core)) -+ if (rate == clk_core_get_rate_nolock(core)) { -+ core->req_rate = req_rate; - return 0; -+ } - - if ((core->flags & CLK_SET_RATE_GATE) && core->prepare_count) - return -EBUSY; -@@ -1612,9 +1624,14 @@ int clk_set_rate_range(struct clk *clk, unsigned long min, unsigned long max) - clk_prepare_lock(); - - if (min != clk->min_rate || max != clk->max_rate) { -+ unsigned long rate = clk->core->req_rate; -+ -+ if (!rate) -+ rate = clk->core->rate; -+ - clk->min_rate = min; - clk->max_rate = max; -- ret = clk_core_set_rate_nolock(clk->core, clk->core->req_rate); -+ ret = clk_core_set_rate_nolock(clk->core, rate); - } - - clk_prepare_unlock(); -@@ -2451,7 +2468,7 @@ static int __clk_init(struct device *dev, struct clk *clk_user) - rate = core->parent->rate; - else - rate = 0; -- core->rate = core->req_rate = rate; -+ core->rate = rate; - - /* - * walk the list of orphan clocks and reparent any that are children of -@@ -2798,6 +2815,7 @@ int __clk_get(struct clk *clk) - - void __clk_put(struct clk *clk) - { -+ unsigned long rate; - struct module *owner; - - if (!clk || WARN_ON_ONCE(IS_ERR(clk))) -@@ -2806,9 +2824,13 @@ void __clk_put(struct clk *clk) - clk_prepare_lock(); - - hlist_del(&clk->clks_node); -- if (clk->min_rate > clk->core->req_rate || -- clk->max_rate < clk->core->req_rate) -- clk_core_set_rate_nolock(clk->core, clk->core->req_rate); -+ -+ rate = clk->core->req_rate; -+ if (!rate) -+ rate = clk->core->rate; -+ -+ if (clk->min_rate > rate || clk->max_rate < rate) -+ clk_core_set_rate_nolock(clk->core, rate); - - owner = clk->core->owner; - kref_put(&clk->core->ref, __clk_release); diff --git a/a/content_digest b/N1/content_digest index 13abfdd..008b1f9 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,32 +1,17 @@ "ref\01451293433-32392-1-git-send-email-zhengxing@rock-chips.com\0" "ref\05681E8E4.2010303@rock-chips.com\0" "ref\05681F121.3070307@rock-chips.com\0" - "From\0Heiko St\303\274bner <heiko@sntech.de>\0" - "Subject\0Re: [RESEND PATCH v1 4/4] clk: rockchip: rk3036: fix and add node id for emac clock\0" + "From\0heiko@sntech.de (Heiko St\303\274bner)\0" + "Subject\0[RESEND PATCH v1 4/4] clk: rockchip: rk3036: fix and add node id for emac clock\0" "Date\0Fri, 01 Jan 2016 23:10:54 +0100\0" - "To\0Xing Zheng <zhengxing@rock-chips.com>\0" - "Cc\0Yakir Yang <ykk@rock-chips.com>" - Mark Rutland <mark.rutland@arm.com> - devicetree@vger.kernel.org - Pawel Moll <pawel.moll@arm.com> - Ian Campbell <ijc+devicetree@hellion.org.uk> - Michael Turquette <mturquette@baylibre.com> - Kumar Gala <galak@codeaurora.org> - Stephen Boyd <sboyd@codeaurora.org> - linux-kernel@vger.kernel.org - linux-rockchip@lists.infradead.org - Rob Herring <robh+dt@kernel.org> - linux-arm-kernel@lists.infradead.org - keescook@google.com - linux-clk@vger.kernel.org - " leozwang@google.com\0" - "\01:1\0" + "To\0linux-arm-kernel@lists.infradead.org\0" + "\00:1\0" "b\0" "Hi Xing,\n" "\n" "Am Dienstag, 29. Dezember 2015, 10:34:09 schrieb Xing Zheng:\n" - "> On 2015\345\271\26412\346\234\21029\346\227\245 09:59, Yakir Yang wrote:\n" - "> > On 12/28/2015 08:41 PM, Heiko St\303\274bner wrote:\n" + "> On 2015?12?29? 09:59, Yakir Yang wrote:\n" + "> > On 12/28/2015 08:41 PM, Heiko St?bner wrote:\n" "> >> Am Montag, 28. Dezember 2015, 17:03:53 schrieb Xing Zheng:\n" "> >>> Due to referred old version TRM, there is incorrect emac clock node,\n" "> >>> we should fix it. The SEL_21_9 is the parent of SEL_21_4.\n" @@ -86,106 +71,13 @@ "it fixes the issue at least.\n" "\n" "\n" - Heiko - "\01:2\0" - "fn\0clk-keep-req-rate.diff\0" - "b\0" - "diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c\n" - "index 7bbb0fd..83a7234 100644\n" - "--- a/drivers/clk/clk.c\n" - "+++ b/drivers/clk/clk.c\n" - "@@ -1423,6 +1423,9 @@ static struct clk_core *clk_propagate_rate_change(struct clk_core *core,\n" - " \treturn fail_clk;\n" - " }\n" - " \n" - "+static int clk_core_set_rate_nolock(struct clk_core *core,\n" - "+\t\t\t\t unsigned long req_rate);\n" - "+\n" - " /*\n" - " * walk down a subtree and set the new rates notifying the rate\n" - " * change on the way\n" - "@@ -1438,6 +1441,7 @@ static void clk_change_rate(struct clk_core *core)\n" - " \n" - " \told_rate = core->rate;\n" - " \n" - "+printk(\"%s: %s requested %lu, new %lu\\n\", __func__, core->name, core->req_rate, core->new_rate);\n" - " \tif (core->new_parent)\n" - " \t\tbest_parent_rate = core->new_parent->rate;\n" - " \telse if (core->parent)\n" - "@@ -1507,6 +1511,12 @@ static void clk_change_rate(struct clk_core *core)\n" - " \t/* handle the new child who might not be in core->children yet */\n" - " \tif (core->new_child)\n" - " \t\tclk_change_rate(core->new_child);\n" - "+\n" - "+\t/* FIXME: add flag to limit to specific clocks? */\n" - "+\tif (core->req_rate && core->new_rate != old_rate) {\n" - "+\t\tprintk(\"\\t\\ttrying to adapt %s\\n\", core->name);\n" - "+\t\tclk_core_set_rate_nolock(core, core->req_rate);\n" - "+\t}\n" - " }\n" - " \n" - " static int clk_core_set_rate_nolock(struct clk_core *core,\n" - "@@ -1520,8 +1530,10 @@ static int clk_core_set_rate_nolock(struct clk_core *core,\n" - " \t\treturn 0;\n" - " \n" - " \t/* bail early if nothing to do */\n" - "-\tif (rate == clk_core_get_rate_nolock(core))\n" - "+\tif (rate == clk_core_get_rate_nolock(core)) {\n" - "+\t\tcore->req_rate = req_rate;\n" - " \t\treturn 0;\n" - "+\t}\n" - " \n" - " \tif ((core->flags & CLK_SET_RATE_GATE) && core->prepare_count)\n" - " \t\treturn -EBUSY;\n" - "@@ -1612,9 +1624,14 @@ int clk_set_rate_range(struct clk *clk, unsigned long min, unsigned long max)\n" - " \tclk_prepare_lock();\n" - " \n" - " \tif (min != clk->min_rate || max != clk->max_rate) {\n" - "+\t\tunsigned long rate = clk->core->req_rate;\n" - "+\n" - "+\t\tif (!rate)\n" - "+\t\t\trate = clk->core->rate;\n" - "+\n" - " \t\tclk->min_rate = min;\n" - " \t\tclk->max_rate = max;\n" - "-\t\tret = clk_core_set_rate_nolock(clk->core, clk->core->req_rate);\n" - "+\t\tret = clk_core_set_rate_nolock(clk->core, rate);\n" - " \t}\n" - " \n" - " \tclk_prepare_unlock();\n" - "@@ -2451,7 +2468,7 @@ static int __clk_init(struct device *dev, struct clk *clk_user)\n" - " \t\trate = core->parent->rate;\n" - " \telse\n" - " \t\trate = 0;\n" - "-\tcore->rate = core->req_rate = rate;\n" - "+\tcore->rate = rate;\n" - " \n" - " \t/*\n" - " \t * walk the list of orphan clocks and reparent any that are children of\n" - "@@ -2798,6 +2815,7 @@ int __clk_get(struct clk *clk)\n" - " \n" - " void __clk_put(struct clk *clk)\n" - " {\n" - "+\tunsigned long rate;\n" - " \tstruct module *owner;\n" - " \n" - " \tif (!clk || WARN_ON_ONCE(IS_ERR(clk)))\n" - "@@ -2806,9 +2824,13 @@ void __clk_put(struct clk *clk)\n" - " \tclk_prepare_lock();\n" - " \n" - " \thlist_del(&clk->clks_node);\n" - "-\tif (clk->min_rate > clk->core->req_rate ||\n" - "-\t clk->max_rate < clk->core->req_rate)\n" - "-\t\tclk_core_set_rate_nolock(clk->core, clk->core->req_rate);\n" - "+\n" - "+\trate = clk->core->req_rate;\n" - "+\tif (!rate)\n" - "+\t\trate = clk->core->rate;\n" - "+\n" - "+\tif (clk->min_rate > rate || clk->max_rate < rate)\n" - "+\t\tclk_core_set_rate_nolock(clk->core, rate);\n" - " \n" - " \towner = clk->core->owner;\n" - " \tkref_put(&clk->core->ref, __clk_release);" + "Heiko\n" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: clk-keep-req-rate.diff\n" + "Type: text/x-patch\n" + "Size: 2997 bytes\n" + "Desc: not available\n" + URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160101/1db1687e/attachment-0001.bin> -25b1e7c215adaf4333f1822e8719000d56423a3ac191af2130c876bb42799f50 +2bbdb66ebc12d4de28ee521045c28f835abd49a4a50662ed8ac377719d90bfd8
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.