diff options
Diffstat (limited to 'include/linux/sh_clk.h')
-rw-r--r-- | include/linux/sh_clk.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h index 60c72395ec6b..1f208b2a1ed6 100644 --- a/include/linux/sh_clk.h +++ b/include/linux/sh_clk.h | |||
@@ -52,6 +52,7 @@ struct clk { | |||
52 | unsigned long flags; | 52 | unsigned long flags; |
53 | 53 | ||
54 | void __iomem *enable_reg; | 54 | void __iomem *enable_reg; |
55 | void __iomem *status_reg; | ||
55 | unsigned int enable_bit; | 56 | unsigned int enable_bit; |
56 | void __iomem *mapped_reg; | 57 | void __iomem *mapped_reg; |
57 | 58 | ||
@@ -116,22 +117,26 @@ long clk_round_parent(struct clk *clk, unsigned long target, | |||
116 | unsigned long *best_freq, unsigned long *parent_freq, | 117 | unsigned long *best_freq, unsigned long *parent_freq, |
117 | unsigned int div_min, unsigned int div_max); | 118 | unsigned int div_min, unsigned int div_max); |
118 | 119 | ||
119 | #define SH_CLK_MSTP(_parent, _enable_reg, _enable_bit, _flags) \ | 120 | #define SH_CLK_MSTP(_parent, _enable_reg, _enable_bit, _status_reg, _flags) \ |
120 | { \ | 121 | { \ |
121 | .parent = _parent, \ | 122 | .parent = _parent, \ |
122 | .enable_reg = (void __iomem *)_enable_reg, \ | 123 | .enable_reg = (void __iomem *)_enable_reg, \ |
123 | .enable_bit = _enable_bit, \ | 124 | .enable_bit = _enable_bit, \ |
125 | .status_reg = _status_reg, \ | ||
124 | .flags = _flags, \ | 126 | .flags = _flags, \ |
125 | } | 127 | } |
126 | 128 | ||
127 | #define SH_CLK_MSTP32(_p, _r, _b, _f) \ | 129 | #define SH_CLK_MSTP32(_p, _r, _b, _f) \ |
128 | SH_CLK_MSTP(_p, _r, _b, _f | CLK_ENABLE_REG_32BIT) | 130 | SH_CLK_MSTP(_p, _r, _b, 0, _f | CLK_ENABLE_REG_32BIT) |
129 | 131 | ||
130 | #define SH_CLK_MSTP16(_p, _r, _b, _f) \ | 132 | #define SH_CLK_MSTP32_STS(_p, _r, _b, _s, _f) \ |
131 | SH_CLK_MSTP(_p, _r, _b, _f | CLK_ENABLE_REG_16BIT) | 133 | SH_CLK_MSTP(_p, _r, _b, _s, _f | CLK_ENABLE_REG_32BIT) |
132 | 134 | ||
133 | #define SH_CLK_MSTP8(_p, _r, _b, _f) \ | 135 | #define SH_CLK_MSTP16(_p, _r, _b, _f) \ |
134 | SH_CLK_MSTP(_p, _r, _b, _f | CLK_ENABLE_REG_8BIT) | 136 | SH_CLK_MSTP(_p, _r, _b, 0, _f | CLK_ENABLE_REG_16BIT) |
137 | |||
138 | #define SH_CLK_MSTP8(_p, _r, _b, _f) \ | ||
139 | SH_CLK_MSTP(_p, _r, _b, 0, _f | CLK_ENABLE_REG_8BIT) | ||
135 | 140 | ||
136 | int sh_clk_mstp_register(struct clk *clks, int nr); | 141 | int sh_clk_mstp_register(struct clk *clks, int nr); |
137 | 142 | ||