summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sunxi/clk-factors.c
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2014-10-20 22:10:26 +0800
committerMaxime Ripard <maxime.ripard@free-electrons.com>2014-10-21 21:40:56 +0200
commite94f8cb32d47b157b2af1906eb965290e89ee3fe (patch)
tree192452c87d48dd90c9cb64f2b175cae0d1472ea1 /drivers/clk/sunxi/clk-factors.c
parentf114040e3ea6e07372334ade75d1ee0775c355e1 (diff)
downloadlinux-e94f8cb32d47b157b2af1906eb965290e89ee3fe.tar.bz2
clk: sunxi: make factors clock mux mask configurable
Some of the factors-style clocks on the A80 have different widths for the mux values in the registers. Add a .muxmask field to clk_factors_config to make it configurable. Passing a bitmask instead of a width parameter will allow reuse in case we support table-based muxes in the future. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'drivers/clk/sunxi/clk-factors.c')
-rw-r--r--drivers/clk/sunxi/clk-factors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c
index f83ba097126c..5521e866fa5e 100644
--- a/drivers/clk/sunxi/clk-factors.c
+++ b/drivers/clk/sunxi/clk-factors.c
@@ -224,7 +224,7 @@ struct clk * __init sunxi_factors_register(struct device_node *node,
/* set up gate properties */
mux->reg = reg;
mux->shift = data->mux;
- mux->mask = SUNXI_FACTORS_MUX_MASK;
+ mux->mask = data->muxmask;
mux->lock = factors->lock;
mux_hw = &mux->hw;
}