clk: Remove CLK_IS_BASIC clk flag
Subsystems (4)
Stephen Boyd
maintainerPATCH 1/1 clk: Remove CLK_IS_BASIC clk flag
This flag was historically used to indicate that a clk is a "basic" type of clk like a mux, divider, gate, etc. This never turned out to be very useful though because it was hard to cleanly split "basic" clks from other clks in a system. This one flag was a way for type introspection and it just didn't scale. If anything, it was used by the TI clk driver to indicate that a clk_hw wasn't contained in the SoC specific clk structure. We can get rid of this define now that TI is finding those clks a different way.
--- arch/mips/alchemy/common/clock.c | 2 +- drivers/clk/clk-composite.c | 2 +- drivers/clk/clk-divider.c | 2 +- drivers/clk/clk-fixed-factor.c | 2 +- drivers/clk/clk-fixed-rate.c | 2 +- drivers/clk/clk-fractional-divider.c | 2 +- drivers/clk/clk-gate.c | 2 +- drivers/clk/clk-gpio.c | 2 +- drivers/clk/clk-mux.c | 2 +- drivers/clk/clk-pwm.c | 2 +- drivers/clk/clk.c | 1 - drivers/clk/mmp/clk-gate.c | 2 +- drivers/pwm/pwm-meson.c | 2 +- include/linux/clk-provider.h | 2 +- 14 files changed, 13 insertions(+), 14 deletions(-)
arch/mips/alchemy/common/clock.c +1 -1
@@ -160,7 +160,7 @@ static struct clk __init *alchemy_clk_setup_cpu(const char *parent_name, id.name =ALCHEMY_CPU_CLK ; id.parent_names = &parent_name; id.num_parents =1 ; - id.flags =CLK_IS_BASIC ; + id.flags =0 ; id.ops = &alchemy_clkops_cpu; h->init = &id;
drivers/clk/clk-composite.c +1 -1
@@ -218,7 +218,7 @@ struct clk_hw *clk_hw_register_composite(struct device *dev, const char *name,return ERR_PTR (-ENOMEM ); init.name = name; - init.flags = flags |CLK_IS_BASIC ; + init.flags = flags; init.parent_names = parent_names; init.num_parents = num_parents; hw = &composite->hw;
drivers/clk/clk-divider.c +1 -1
@@ -475,7 +475,7 @@ static struct clk_hw *_register_divider(struct device *dev, const char *name, init.ops = &clk_divider_ro_ops; else init.ops = &clk_divider_ops; - init.flags = flags |CLK_IS_BASIC ; + init.flags = flags; init.parent_names = (parent_name ? &parent_name:NULL ); init.num_parents = (parent_name ?1 :0 );
drivers/clk/clk-fixed-factor.c +1 -1
@@ -84,7 +84,7 @@ struct clk_hw *clk_hw_register_fixed_factor(struct device *dev, init.name = name; init.ops = &clk_fixed_factor_ops; - init.flags = flags |CLK_IS_BASIC ; + init.flags = flags; init.parent_names = &parent_name; init.num_parents =1 ;
drivers/clk/clk-fixed-rate.c +1 -1
@@ -68,7 +68,7 @@ struct clk_hw *clk_hw_register_fixed_rate_with_accuracy(struct device *dev, init.name = name; init.ops = &clk_fixed_rate_ops; - init.flags = flags |CLK_IS_BASIC ; + init.flags = flags; init.parent_names = (parent_name ? &parent_name:NULL ); init.num_parents = (parent_name ?1 :0 );
drivers/clk/clk-fractional-divider.c +1 -1
@@ -151,7 +151,7 @@ struct clk_hw *clk_hw_register_fractional_divider(struct device *dev, init.name = name; init.ops = &clk_fractional_divider_ops; - init.flags = flags |CLK_IS_BASIC ; + init.flags = flags; init.parent_names = parent_name ? &parent_name :NULL ; init.num_parents = parent_name ?1 :0 ;
drivers/clk/clk-gate.c +1 -1
@@ -142,7 +142,7 @@ struct clk_hw *clk_hw_register_gate(struct device *dev, const char *name, init.name = name; init.ops = &clk_gate_ops; - init.flags = flags |CLK_IS_BASIC ; + init.flags = flags; init.parent_names = parent_name ? &parent_name :NULL ; init.num_parents = parent_name ?1 :0 ;
drivers/clk/clk-gpio.c +1 -1
@@ -137,7 +137,7 @@ static struct clk_hw *clk_register_gpio(struct device *dev, const char *name, init.name = name; init.ops = clk_gpio_ops; - init.flags = flags |CLK_IS_BASIC ; + init.flags = flags; init.parent_names = parent_names; init.num_parents = num_parents;
drivers/clk/clk-mux.c +1 -1
@@ -159,7 +159,7 @@ struct clk_hw *clk_hw_register_mux_table(struct device *dev, const char *name, init.ops = &clk_mux_ro_ops; else init.ops = &clk_mux_ops; - init.flags = flags |CLK_IS_BASIC ; + init.flags = flags; init.parent_names = parent_names; init.num_parents = num_parents;
drivers/clk/clk-pwm.c +1 -1
@@ -101,7 +101,7 @@ static int clk_pwm_probe(struct platform_device *pdev) init.name = clk_name; init.ops = &clk_pwm_ops; - init.flags =CLK_IS_BASIC ; + init.flags =0 ; init.num_parents =0 ; clk_pwm->pwm = pwm;
drivers/clk/clk.c +0 -1
@@ -2850,7 +2850,6 @@ static const struct {ENTRY (CLK_SET_PARENT_GATE ),ENTRY (CLK_SET_RATE_PARENT ),ENTRY (CLK_IGNORE_UNUSED ), -ENTRY (CLK_IS_BASIC ),ENTRY (CLK_GET_RATE_NOCACHE ),ENTRY (CLK_SET_RATE_NO_REPARENT ), ENTRY(CLK_GET_ACCURACY_NOCACHE),
drivers/clk/mmp/clk-gate.c +1 -1
@@ -108,7 +108,7 @@ struct clk *mmp_clk_register_gate(struct device *dev, const char *name, init.name = name; init.ops = &mmp_clk_gate_ops; - init.flags = flags |CLK_IS_BASIC ; + init.flags = flags; init.parent_names = (parent_name ? &parent_name :NULL ); init.num_parents = (parent_name ?1 :0 );
drivers/pwm/pwm-meson.c +1 -1
@@ -470,7 +470,7 @@ static int meson_pwm_init_channels(struct meson_pwm *meson, init.name = name; init.ops = &clk_mux_ops; - init.flags =CLK_IS_BASIC ; + init.flags =0 ; init.parent_names = meson->data->parent_names; init.num_parents = meson->data->num_parents;
include/linux/clk-provider.h +1 -1
@@ -24,7 +24,7 @@#define CLK_SET_RATE_PARENT BIT(2)/* propagate rate change up one level */ #define CLK_IGNORE_UNUSED BIT(3)/* do not gate even if unused */ /* unused */ -#define CLK_IS_BASIC BIT(5)/* Basic clk, can't do a to_clk_foo() */ +/* unused */ #define CLK_GET_RATE_NOCACHE BIT(6)/* do not use the cached clk rate */ #define CLK_SET_RATE_NO_REPARENT BIT(7)/* don't re-parent on rate change */ #define CLK_GET_ACCURACY_NOCACHE BIT(8)/* do not use the cached clk accuracy */
base-commit: 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b
prerequisite-patch-id: 6196ca807a15f9f4a67d5e6b8668b4f13442ac15
prerequisite-patch-id: 9532946d1be40c2b20af0591ac4636a4cf3b14dd
prerequisite-patch-id: 4e4a9591f5a4ac0d5a72e694da8fdae8c8dda352
prerequisite-patch-id: bcd75306e64ff866989a978127f6b16f7575d0d3
Signature · 1 line
Sent by a computer through tubes
Quoted 19 lines · Stephen Boyd
This flag was historically used to indicate that a clk is a "basic" type of clk like a mux, divider, gate, etc. This never turned out to be very useful though because it was hard to cleanly split "basic" clks from other clks in a system. This one flag was a way for type introspection and it just didn't scale. If anything, it was used by the TI clk driver to indicate that a
clk_hwwasn't contained in the SoC specific clk structure. We can get rid of this define now that TI is finding those clks a different way.Cc Tero Kristo <[email protected]>Cc Ralf Baechle <[email protected]>Cc Paul Burton <[email protected]>Cc James Hogan <[email protected]>Cc <[email protected]>Cc Thierry Reding <[email protected]>Cc Kevin Hilman <[email protected]>Cc <[email protected]>Cc <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Quoted 16 lines
--- arch/mips/alchemy/common/clock.c | 2 +- drivers/clk/clk-composite.c | 2 +- drivers/clk/clk-divider.c | 2 +- drivers/clk/clk-fixed-factor.c | 2 +- drivers/clk/clk-fixed-rate.c | 2 +- drivers/clk/clk-fractional-divider.c | 2 +- drivers/clk/clk-gate.c | 2 +- drivers/clk/clk-gpio.c | 2 +- drivers/clk/clk-mux.c | 2 +- drivers/clk/clk-pwm.c | 2 +- drivers/clk/clk.c | 1 - drivers/clk/mmp/clk-gate.c | 2 +- drivers/pwm/pwm-meson.c | 2 +- include/linux/clk-provider.h | 2 +- 14 files changed, 13 insertions(+), 14 deletions(-)
On Thu, Apr 25, 2019 at 11:14:47AM -0700, Stephen Boyd wrote:
[...]
Quoted 5 lines
base-commit:
9e98c678c2d6ae3a17cb2de55d17f69dddaa231b
prerequisite-patch-id:6196ca807a15f9f4a67d5e6b8668b4f13442ac15
prerequisite-patch-id:9532946d1be40c2b20af0591ac4636a4cf3b14dd
prerequisite-patch-id:4e4a9591f5a4ac0d5a72e694da8fdae8c8dda352
prerequisite-patch-id:bcd75306e64ff866989a978127f6b16f7575d0d3
Just curious: what are these? I mean, I have a pretty good guess what these are, but how do you use them?
Thierry
Stephen Boyd
maintainerQuoting Thierry Reding (2019-04-26 08:26:26)
Quoted 11 lines · Stephen Boyd
[...]
Quoted 5 lines
base-commit:
9e98c678c2d6ae3a17cb2de55d17f69dddaa231b
prerequisite-patch-id:6196ca807a15f9f4a67d5e6b8668b4f13442ac15
prerequisite-patch-id:9532946d1be40c2b20af0591ac4636a4cf3b14dd
prerequisite-patch-id:4e4a9591f5a4ac0d5a72e694da8fdae8c8dda352
prerequisite-patch-id:bcd75306e64ff866989a978127f6b16f7575d0d3Just curious: what are these? I mean, I have a pretty good guess what these are, but how do you use them?
I'm generating patches with git format-patch --base=<commit>. This chain shows that the base commit is v5.1-rc1, i.e. 9e98c678c2d6 ("Linux 5.1-rc1") and then that there are four patches applied on top of that commit that have these patch ids. If you were to pass the patches from the mailing list through 'git patch-id' you would see these patch ids. Or if I had pushed the patches out to linux-next I suppose I could have generated with a --base argument pointing to the tip of a 'clk-ti' branch.
For example, the first patch-id is essentially
https://lkml.kernel.org/r/[email protected]
piped to 'git patch-id'. When I do that I get
6196ca807a15f9f4a67d5e6b8668b4f13442ac15 0000000000000000000000000000000000000000
and when I do that to the patch I've applied locally I get:
$ git show b88b5b7182b0 | git patch-id 6196ca807a15f9f4a67d5e6b8668b4f13442ac15 b88b5b7182b07ebdc1ab692b4fc6a10abfff208d
I think there may be a typo in the docs or a bug in git though, because when I pass that same patch to 'git patch-id --stable' it produces another patch-id.
4cf9f89ca61d8002df1494b48fac618c66f6220d 0000000000000000000000000000000000000000
Caption: Something is wrong...
Either way, I'm not really using this so far but I figure it's useful if robots want to pick up on this and have a patch-id database for changes they've downloaded and tested from the list to figure out where to apply patches. I'd like to use it to do something similar so I can properly apply patches from the list onto the correct base commit and merge it all up. That's a little ways off though because I've yet to start working on a tool to do full on patch management via mailing lists. Also, I haven't seen anyone else using this git feature yet. Maybe I should add some hints in submitting-patches?