To make it reusable in a composite clock. Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx> --- drivers/clk/clk-mux.c | 11 +---------- include/linux/clk.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index 22e131faae61..d5fe640dce1b 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c @@ -20,15 +20,6 @@ #include <linux/clk.h> #include <linux/err.h> -struct clk_mux { - struct clk clk; - void __iomem *reg; - int shift; - int width; -}; - -#define to_clk_mux(_clk) container_of(_clk, struct clk_mux, clk) - static int clk_mux_get_parent(struct clk *clk) { struct clk_mux *m = container_of(clk, struct clk_mux, clk); @@ -53,7 +44,7 @@ static int clk_mux_set_parent(struct clk *clk, u8 idx) return 0; } -static struct clk_ops clk_mux_ops = { +struct clk_ops clk_mux_ops = { .set_rate = clk_parent_set_rate, .round_rate = clk_parent_round_rate, .get_parent = clk_mux_get_parent, diff --git a/include/linux/clk.h b/include/linux/clk.h index 419a2c4c86b8..13b1e529f57b 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -282,6 +282,17 @@ struct clk *clk_fractional_divider( u8 clk_divider_flags); void clk_fractional_divider_free(struct clk *clk_fd); +struct clk_mux { + struct clk clk; + void __iomem *reg; + int shift; + int width; +}; + +#define to_clk_mux(_clk) container_of(_clk, struct clk_mux, clk) + +extern struct clk_ops clk_mux_ops; + struct clk *clk_mux_alloc(const char *name, void __iomem *reg, u8 shift, u8 width, const char **parents, u8 num_parents, unsigned flags); -- 2.20.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox