clk: Remove CLK_IS_BASIC clk flag
authorStephen Boyd <sboyd@kernel.org>
Thu, 25 Apr 2019 17:57:37 +0000 (10:57 -0700)
committerStephen Boyd <sboyd@kernel.org>
Fri, 26 Apr 2019 17:40:49 +0000 (10:40 -0700)
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.

Cc: Tero Kristo <t-kristo@ti.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: <linux-mips@vger.kernel.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: <linux-pwm@vger.kernel.org>
Cc: <linux-amlogic@lists.infradead.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
14 files changed:
arch/mips/alchemy/common/clock.c
drivers/clk/clk-composite.c
drivers/clk/clk-divider.c
drivers/clk/clk-fixed-factor.c
drivers/clk/clk-fixed-rate.c
drivers/clk/clk-fractional-divider.c
drivers/clk/clk-gate.c
drivers/clk/clk-gpio.c
drivers/clk/clk-mux.c
drivers/clk/clk-pwm.c
drivers/clk/clk.c
drivers/clk/mmp/clk-gate.c
drivers/pwm/pwm-meson.c
include/linux/clk-provider.h

index d129475fd40dee71e759d4679c3b9eac48c24e91..a95a894aceaf1237852d5b18bb61a145099bc20f 100644 (file)
@@ -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;
 
index 46604214bba03e2581153e59fc08aa7c8fea7820..b06038b8f6586034df7385fd478a4a6b8b2d4fc2 100644 (file)
@@ -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;
index e5a17265cfaf390fa1c2a77990917240e85a2edc..568e10a33ea49b2eeffbcafcc2b2be787122eb26 100644 (file)
@@ -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);
 
index 241b3f8c61a93d7f25a51ebe74d6038aae61dc30..8aac2d1b6feac260f962b8cfab4bbcbdf022d00f 100644 (file)
@@ -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;
 
index 00ef4f5e53fe247d946100efcfe5ee93d12fa642..a7e4aef7a37624a2ce2b4829bf15e4aa7deafead 100644 (file)
@@ -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);
 
index fdfe2e423d1506e96a059cdb054796dd9c955bd6..aa45dd257fe38136e51b361bfd984730486576ca 100644 (file)
@@ -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;
 
index f05823cd9b21117a0dd04f3d86a6a6f658cc983d..f58a58d5d80a024fd0f26f7d8908692dc65e4c24 100644 (file)
@@ -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;
 
index c2f07f0d077c7659727cdbe39d0c970821db5c9b..9d930edd651626ac0997dca0d6d78d1fad107aad 100644 (file)
@@ -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;
 
index 2ad2df2e890933ac11483eac7673a9e7da6b19dd..7d60d690b7f2c3e24126f62504a2adbc7cff79a1 100644 (file)
@@ -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;
 
index 8cb9d117fdbf91dfd6625edeac4b42020413542c..02b472a1f9b0145b0b7ed70171ccbcc5d9b4bde1 100644 (file)
@@ -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;
index 96053a96fe2fc4878250aabf92601de729838cd3..7279573eefd5fb61700888c74ac05449f3fb28b7 100644 (file)
@@ -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),
index 7355595c42e21e4249590b40292cc2a814e7002b..1755916ddef2df7cd9e3e0595fcee74ffc3e0802 100644 (file)
@@ -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);
 
index c1ed641b3e26622041c0fead2931a13bface7454..4ae5d774443ec09eb6f31f4fd2a290ed268493a2 100644 (file)
@@ -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;
 
index b7cf80a712939a1818fd1045133faafcda755271..9245a377295b62bcc049e236a5fe2920849cc761 100644 (file)
@@ -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 */