diff options
author | Chen-Yu Tsai <wens@csie.org> | 2014-10-20 18:10:26 +0400 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-10-21 23:40:56 +0400 |
commit | e94f8cb32d47b157b2af1906eb965290e89ee3fe (patch) | |
tree | 192452c87d48dd90c9cb64f2b175cae0d1472ea1 /drivers/clk/sunxi/clk-factors.h | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
download | linux-e94f8cb32d47b157b2af1906eb965290e89ee3fe.tar.xz |
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.h')
-rw-r--r-- | drivers/clk/sunxi/clk-factors.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/clk/sunxi/clk-factors.h b/drivers/clk/sunxi/clk-factors.h index 9913840018d3..912238fde132 100644 --- a/drivers/clk/sunxi/clk-factors.h +++ b/drivers/clk/sunxi/clk-factors.h @@ -7,8 +7,6 @@ #define SUNXI_FACTORS_NOT_APPLICABLE (0) -#define SUNXI_FACTORS_MUX_MASK 0x3 - struct clk_factors_config { u8 nshift; u8 nwidth; @@ -24,6 +22,7 @@ struct clk_factors_config { struct factors_data { int enable; int mux; + int muxmask; struct clk_factors_config *table; void (*getter) (u32 *rate, u32 parent_rate, u8 *n, u8 *k, u8 *m, u8 *p); const char *name; |