diff options
author | Alexander Müller <serveralex@gmail.com> | 2016-08-27 13:40:51 -0400 |
---|---|---|
committer | Michael Turquette <mturquette@baylibre.com> | 2016-09-01 20:31:49 -0400 |
commit | e0818a3960418bfef1bbc120bfe8346ff9f3c5c7 (patch) | |
tree | bad19db62e8b29b7d0fecaa68f14ca83f22d0191 | |
parent | d0c175da68d7e8f6b52b9fcaffae1d73d51a8655 (diff) |
meson: clk: Rename register names according to Amlogic datasheet
Signed-off-by: Alexander Müller <serveralex@gmail.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/1472319654-59048-4-git-send-email-serveralex@gmail.com
-rw-r--r-- | drivers/clk/meson/meson8b.c | 26 | ||||
-rw-r--r-- | drivers/clk/meson/meson8b.h | 11 |
2 files changed, 18 insertions, 19 deletions
diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index d52ae534e056..24395dc2ae14 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c | |||
@@ -113,17 +113,17 @@ static struct clk_fixed_rate meson8b_xtal = { | |||
113 | 113 | ||
114 | static struct meson_clk_pll meson8b_fixed_pll = { | 114 | static struct meson_clk_pll meson8b_fixed_pll = { |
115 | .m = { | 115 | .m = { |
116 | .reg_off = MESON8B_REG_PLL_FIXED, | 116 | .reg_off = HHI_MPLL_CNTL, |
117 | .shift = 0, | 117 | .shift = 0, |
118 | .width = 9, | 118 | .width = 9, |
119 | }, | 119 | }, |
120 | .n = { | 120 | .n = { |
121 | .reg_off = MESON8B_REG_PLL_FIXED, | 121 | .reg_off = HHI_MPLL_CNTL, |
122 | .shift = 9, | 122 | .shift = 9, |
123 | .width = 5, | 123 | .width = 5, |
124 | }, | 124 | }, |
125 | .od = { | 125 | .od = { |
126 | .reg_off = MESON8B_REG_PLL_FIXED, | 126 | .reg_off = HHI_MPLL_CNTL, |
127 | .shift = 16, | 127 | .shift = 16, |
128 | .width = 2, | 128 | .width = 2, |
129 | }, | 129 | }, |
@@ -139,17 +139,17 @@ static struct meson_clk_pll meson8b_fixed_pll = { | |||
139 | 139 | ||
140 | static struct meson_clk_pll meson8b_vid_pll = { | 140 | static struct meson_clk_pll meson8b_vid_pll = { |
141 | .m = { | 141 | .m = { |
142 | .reg_off = MESON8B_REG_PLL_VID, | 142 | .reg_off = HHI_VID_PLL_CNTL, |
143 | .shift = 0, | 143 | .shift = 0, |
144 | .width = 9, | 144 | .width = 9, |
145 | }, | 145 | }, |
146 | .n = { | 146 | .n = { |
147 | .reg_off = MESON8B_REG_PLL_VID, | 147 | .reg_off = HHI_VID_PLL_CNTL, |
148 | .shift = 9, | 148 | .shift = 9, |
149 | .width = 5, | 149 | .width = 5, |
150 | }, | 150 | }, |
151 | .od = { | 151 | .od = { |
152 | .reg_off = MESON8B_REG_PLL_VID, | 152 | .reg_off = HHI_VID_PLL_CNTL, |
153 | .shift = 16, | 153 | .shift = 16, |
154 | .width = 2, | 154 | .width = 2, |
155 | }, | 155 | }, |
@@ -165,17 +165,17 @@ static struct meson_clk_pll meson8b_vid_pll = { | |||
165 | 165 | ||
166 | static struct meson_clk_pll meson8b_sys_pll = { | 166 | static struct meson_clk_pll meson8b_sys_pll = { |
167 | .m = { | 167 | .m = { |
168 | .reg_off = MESON8B_REG_PLL_SYS, | 168 | .reg_off = HHI_SYS_PLL_CNTL, |
169 | .shift = 0, | 169 | .shift = 0, |
170 | .width = 9, | 170 | .width = 9, |
171 | }, | 171 | }, |
172 | .n = { | 172 | .n = { |
173 | .reg_off = MESON8B_REG_PLL_SYS, | 173 | .reg_off = HHI_SYS_PLL_CNTL, |
174 | .shift = 9, | 174 | .shift = 9, |
175 | .width = 5, | 175 | .width = 5, |
176 | }, | 176 | }, |
177 | .od = { | 177 | .od = { |
178 | .reg_off = MESON8B_REG_PLL_SYS, | 178 | .reg_off = HHI_SYS_PLL_CNTL, |
179 | .shift = 16, | 179 | .shift = 16, |
180 | .width = 2, | 180 | .width = 2, |
181 | }, | 181 | }, |
@@ -252,7 +252,7 @@ static struct clk_fixed_factor meson8b_fclk_div7 = { | |||
252 | * forthcoming coordinated clock rates feature | 252 | * forthcoming coordinated clock rates feature |
253 | */ | 253 | */ |
254 | static struct meson_clk_cpu meson8b_cpu_clk = { | 254 | static struct meson_clk_cpu meson8b_cpu_clk = { |
255 | .reg_off = MESON8B_REG_SYS_CPU_CNTL1, | 255 | .reg_off = HHI_SYS_CPU_CLK_CNTL1, |
256 | .div_table = cpu_div_table, | 256 | .div_table = cpu_div_table, |
257 | .clk_nb.notifier_call = meson_clk_cpu_notifier_cb, | 257 | .clk_nb.notifier_call = meson_clk_cpu_notifier_cb, |
258 | .hw.init = &(struct clk_init_data){ | 258 | .hw.init = &(struct clk_init_data){ |
@@ -266,7 +266,7 @@ static struct meson_clk_cpu meson8b_cpu_clk = { | |||
266 | static u32 mux_table_clk81[] = { 6, 5, 7 }; | 266 | static u32 mux_table_clk81[] = { 6, 5, 7 }; |
267 | 267 | ||
268 | struct clk_mux meson8b_mpeg_clk_sel = { | 268 | struct clk_mux meson8b_mpeg_clk_sel = { |
269 | .reg = (void *)MESON8B_REG_HHI_MPEG, | 269 | .reg = (void *)HHI_MPEG_CLK_CNTL, |
270 | .mask = 0x7, | 270 | .mask = 0x7, |
271 | .shift = 12, | 271 | .shift = 12, |
272 | .flags = CLK_MUX_READ_ONLY, | 272 | .flags = CLK_MUX_READ_ONLY, |
@@ -288,7 +288,7 @@ struct clk_mux meson8b_mpeg_clk_sel = { | |||
288 | }; | 288 | }; |
289 | 289 | ||
290 | struct clk_divider meson8b_mpeg_clk_div = { | 290 | struct clk_divider meson8b_mpeg_clk_div = { |
291 | .reg = (void *)MESON8B_REG_HHI_MPEG, | 291 | .reg = (void *)HHI_MPEG_CLK_CNTL, |
292 | .shift = 0, | 292 | .shift = 0, |
293 | .width = 7, | 293 | .width = 7, |
294 | .lock = &clk_lock, | 294 | .lock = &clk_lock, |
@@ -302,7 +302,7 @@ struct clk_divider meson8b_mpeg_clk_div = { | |||
302 | }; | 302 | }; |
303 | 303 | ||
304 | struct clk_gate meson8b_clk81 = { | 304 | struct clk_gate meson8b_clk81 = { |
305 | .reg = (void *)MESON8B_REG_HHI_MPEG, | 305 | .reg = (void *)HHI_MPEG_CLK_CNTL, |
306 | .bit_idx = 7, | 306 | .bit_idx = 7, |
307 | .lock = &clk_lock, | 307 | .lock = &clk_lock, |
308 | .hw.init = &(struct clk_init_data){ | 308 | .hw.init = &(struct clk_init_data){ |
diff --git a/drivers/clk/meson/meson8b.h b/drivers/clk/meson/meson8b.h index 5b9cb9f72471..b2f29f7c3389 100644 --- a/drivers/clk/meson/meson8b.h +++ b/drivers/clk/meson/meson8b.h | |||
@@ -30,11 +30,10 @@ | |||
30 | * | 30 | * |
31 | * [0] http://dn.odroid.com/S805/Datasheet/S805_Datasheet%20V0.8%2020150126.pdf | 31 | * [0] http://dn.odroid.com/S805/Datasheet/S805_Datasheet%20V0.8%2020150126.pdf |
32 | */ | 32 | */ |
33 | #define MESON8B_REG_SYS_CPU_CNTL1 0x015c /* 0x57 offset in data sheet */ | 33 | #define HHI_SYS_CPU_CLK_CNTL1 0x15c /* 0x57 offset in data sheet */ |
34 | #define MESON8B_REG_HHI_MPEG 0x0174 /* 0x5d offset in data sheet */ | 34 | #define HHI_MPEG_CLK_CNTL 0x174 /* 0x5d offset in data sheet */ |
35 | #define MESON8B_REG_MALI 0x01b0 /* 0x6c offset in data sheet */ | 35 | #define HHI_MPLL_CNTL 0x280 /* 0xa0 offset in data sheet */ |
36 | #define MESON8B_REG_PLL_FIXED 0x0280 | 36 | #define HHI_SYS_PLL_CNTL 0x300 /* 0xc0 offset in data sheet */ |
37 | #define MESON8B_REG_PLL_SYS 0x0300 | 37 | #define HHI_VID_PLL_CNTL 0x320 /* 0xc8 offset in data sheet */ |
38 | #define MESON8B_REG_PLL_VID 0x0320 | ||
39 | 38 | ||
40 | #endif /* __MESON8B_H */ | 39 | #endif /* __MESON8B_H */ |