aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/rockchip/clk.h
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2014-11-20 14:38:50 -0500
committerHeiko Stuebner <heiko@sntech.de>2014-11-25 03:57:07 -0500
commit4f8a7c549f373f33c065c9cbb5a5f3f1a9d8f56c (patch)
tree6c3adc9b74f0663ec871a0cc45309b7044657d68 /drivers/clk/rockchip/clk.h
parent12c0a0e81e2f9c03404a3e095517c022991aad43 (diff)
clk: rockchip: add ability to specify pll-specific flags
This adds a flag parameter to plls that allows us to create special flags to tweak the behaviour of the plls if necessary. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Tested-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'drivers/clk/rockchip/clk.h')
-rw-r--r--drivers/clk/rockchip/clk.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
index 6baf6655b5c3..eefd39a3820b 100644
--- a/drivers/clk/rockchip/clk.h
+++ b/drivers/clk/rockchip/clk.h
@@ -90,6 +90,7 @@ struct rockchip_pll_rate_table {
90 * @mode_shift: offset inside the mode-register for the mode of this pll. 90 * @mode_shift: offset inside the mode-register for the mode of this pll.
91 * @lock_shift: offset inside the lock register for the lock status. 91 * @lock_shift: offset inside the lock register for the lock status.
92 * @type: Type of PLL to be registered. 92 * @type: Type of PLL to be registered.
93 * @pll_flags: hardware-specific flags
93 * @rate_table: Table of usable pll rates 94 * @rate_table: Table of usable pll rates
94 */ 95 */
95struct rockchip_pll_clock { 96struct rockchip_pll_clock {
@@ -103,11 +104,12 @@ struct rockchip_pll_clock {
103 int mode_shift; 104 int mode_shift;
104 int lock_shift; 105 int lock_shift;
105 enum rockchip_pll_type type; 106 enum rockchip_pll_type type;
107 u8 pll_flags;
106 struct rockchip_pll_rate_table *rate_table; 108 struct rockchip_pll_rate_table *rate_table;
107}; 109};
108 110
109#define PLL(_type, _id, _name, _pnames, _flags, _con, _mode, _mshift, \ 111#define PLL(_type, _id, _name, _pnames, _flags, _con, _mode, _mshift, \
110 _lshift, _rtable) \ 112 _lshift, _pflags, _rtable) \
111 { \ 113 { \
112 .id = _id, \ 114 .id = _id, \
113 .type = _type, \ 115 .type = _type, \
@@ -119,6 +121,7 @@ struct rockchip_pll_clock {
119 .mode_offset = _mode, \ 121 .mode_offset = _mode, \
120 .mode_shift = _mshift, \ 122 .mode_shift = _mshift, \
121 .lock_shift = _lshift, \ 123 .lock_shift = _lshift, \
124 .pll_flags = _pflags, \
122 .rate_table = _rtable, \ 125 .rate_table = _rtable, \
123 } 126 }
124 127
@@ -127,7 +130,7 @@ struct clk *rockchip_clk_register_pll(enum rockchip_pll_type pll_type,
127 void __iomem *base, int con_offset, int grf_lock_offset, 130 void __iomem *base, int con_offset, int grf_lock_offset,
128 int lock_shift, int reg_mode, int mode_shift, 131 int lock_shift, int reg_mode, int mode_shift,
129 struct rockchip_pll_rate_table *rate_table, 132 struct rockchip_pll_rate_table *rate_table,
130 spinlock_t *lock); 133 u8 clk_pll_flags, spinlock_t *lock);
131 134
132struct rockchip_cpuclk_clksel { 135struct rockchip_cpuclk_clksel {
133 int reg; 136 int reg;