aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorDeepak Sikri <deepak.sikri@st.com>2012-11-10 01:43:45 -0500
committerMike Turquette <mturquette@linaro.org>2012-11-21 14:45:59 -0500
commitef0fd0a207c00b09449f33724322ba762d822d97 (patch)
tree189ce9d8cf39a07acb36f437b763ca020c69eb02 /drivers/clk
parentcd4b519aa5bdce92fcacc1d4bbe0fa16b4e16144 (diff)
CLK: SPEAr: Update clock rate table
This patch updates the existing rate tables with new frequencies. Signed-off-by: Deepak Sikri <deepak.sikri@st.com> Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com> Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/spear/spear1310_clock.c14
-rw-r--r--drivers/clk/spear/spear1340_clock.c89
-rw-r--r--drivers/clk/spear/spear3xx_clock.c6
-rw-r--r--drivers/clk/spear/spear6xx_clock.c1
4 files changed, 89 insertions, 21 deletions
diff --git a/drivers/clk/spear/spear1310_clock.c b/drivers/clk/spear/spear1310_clock.c
index b64d51153a78..bc7f37e131cd 100644
--- a/drivers/clk/spear/spear1310_clock.c
+++ b/drivers/clk/spear/spear1310_clock.c
@@ -313,6 +313,20 @@ static struct aux_clk_masks i2s_sclk_masks = {
313/* i2s prs1 aux rate configuration table, in ascending order of rates */ 313/* i2s prs1 aux rate configuration table, in ascending order of rates */
314static struct aux_rate_tbl i2s_prs1_rtbl[] = { 314static struct aux_rate_tbl i2s_prs1_rtbl[] = {
315 /* For parent clk = 49.152 MHz */ 315 /* For parent clk = 49.152 MHz */
316 {.xscale = 1, .yscale = 12, .eq = 0}, /* 2.048 MHz, smp freq = 8Khz */
317 {.xscale = 11, .yscale = 96, .eq = 0}, /* 2.816 MHz, smp freq = 11Khz */
318 {.xscale = 1, .yscale = 6, .eq = 0}, /* 4.096 MHz, smp freq = 16Khz */
319 {.xscale = 11, .yscale = 48, .eq = 0}, /* 5.632 MHz, smp freq = 22Khz */
320
321 /*
322 * with parent clk = 49.152, freq gen is 8.192 MHz, smp freq = 32Khz
323 * with parent clk = 12.288, freq gen is 2.048 MHz, smp freq = 8Khz
324 */
325 {.xscale = 1, .yscale = 3, .eq = 0},
326
327 /* For parent clk = 49.152 MHz */
328 {.xscale = 17, .yscale = 37, .eq = 0}, /* 11.289 MHz, smp freq = 44Khz*/
329
316 {.xscale = 1, .yscale = 2, .eq = 0}, /* 12.288 MHz */ 330 {.xscale = 1, .yscale = 2, .eq = 0}, /* 12.288 MHz */
317}; 331};
318 332
diff --git a/drivers/clk/spear/spear1340_clock.c b/drivers/clk/spear/spear1340_clock.c
index 8f00533959a5..d4de680bf51f 100644
--- a/drivers/clk/spear/spear1340_clock.c
+++ b/drivers/clk/spear/spear1340_clock.c
@@ -190,6 +190,7 @@ static struct pll_rate_tbl pll4_rtbl[] = {
190 * different values of vco1div2 190 * different values of vco1div2
191 */ 191 */
192static struct frac_rate_tbl amba_synth_rtbl[] = { 192static struct frac_rate_tbl amba_synth_rtbl[] = {
193 {.div = 0x073A8}, /* for vco1div2 = 600 MHz */
193 {.div = 0x06062}, /* for vco1div2 = 500 MHz */ 194 {.div = 0x06062}, /* for vco1div2 = 500 MHz */
194 {.div = 0x04D1B}, /* for vco1div2 = 400 MHz */ 195 {.div = 0x04D1B}, /* for vco1div2 = 400 MHz */
195 {.div = 0x04000}, /* for vco1div2 = 332 MHz */ 196 {.div = 0x04000}, /* for vco1div2 = 332 MHz */
@@ -220,6 +221,12 @@ static struct frac_rate_tbl amba_synth_rtbl[] = {
220 * 500 400 200 0x02800 221 * 500 400 200 0x02800
221 * 500 500 250 0x02000 222 * 500 500 250 0x02000
222 * -------------------------------------------------------------------- 223 * --------------------------------------------------------------------
224 * 600 200 100 0x06000
225 * 600 250 125 0x04CCE
226 * 600 332 166 0x039D5
227 * 600 400 200 0x03000
228 * 600 500 250 0x02666
229 * --------------------------------------------------------------------
223 * 664 200 100 0x06a38 230 * 664 200 100 0x06a38
224 * 664 250 125 0x054FD 231 * 664 250 125 0x054FD
225 * 664 332 166 0x04000 232 * 664 332 166 0x04000
@@ -238,28 +245,50 @@ static struct frac_rate_tbl sys_synth_rtbl[] = {
238 {.div = 0x08000}, 245 {.div = 0x08000},
239 {.div = 0x06a38}, 246 {.div = 0x06a38},
240 {.div = 0x06666}, 247 {.div = 0x06666},
248 {.div = 0x06000},
241 {.div = 0x054FD}, 249 {.div = 0x054FD},
242 {.div = 0x05000}, 250 {.div = 0x05000},
243 {.div = 0x04D18}, 251 {.div = 0x04D18},
252 {.div = 0x04CCE},
244 {.div = 0x04000}, 253 {.div = 0x04000},
254 {.div = 0x039D5},
245 {.div = 0x0351E}, 255 {.div = 0x0351E},
246 {.div = 0x03333}, 256 {.div = 0x03333},
247 {.div = 0x03031}, 257 {.div = 0x03031},
258 {.div = 0x03000},
248 {.div = 0x02A7E}, 259 {.div = 0x02A7E},
249 {.div = 0x02800}, 260 {.div = 0x02800},
250 {.div = 0x0268D}, 261 {.div = 0x0268D},
262 {.div = 0x02666},
251 {.div = 0x02000}, 263 {.div = 0x02000},
252}; 264};
253 265
254/* aux rate configuration table, in ascending order of rates */ 266/* aux rate configuration table, in ascending order of rates */
255static struct aux_rate_tbl aux_rtbl[] = { 267static struct aux_rate_tbl aux_rtbl[] = {
256 /* For VCO1div2 = 500 MHz */ 268 /* 12.29MHz for vic1div2=600MHz and 10.24MHz for VCO1div2=500MHz */
257 {.xscale = 10, .yscale = 204, .eq = 0}, /* 12.29 MHz */ 269 {.xscale = 5, .yscale = 122, .eq = 0},
258 {.xscale = 4, .yscale = 21, .eq = 0}, /* 48 MHz */ 270 /* 14.70MHz for vic1div2=600MHz and 12.29MHz for VCO1div2=500MHz */
259 {.xscale = 2, .yscale = 6, .eq = 0}, /* 83 MHz */ 271 {.xscale = 10, .yscale = 204, .eq = 0},
260 {.xscale = 2, .yscale = 4, .eq = 0}, /* 125 MHz */ 272 /* 48MHz for vic1div2=600MHz and 40 MHz for VCO1div2=500MHz */
261 {.xscale = 1, .yscale = 3, .eq = 1}, /* 166 MHz */ 273 {.xscale = 4, .yscale = 25, .eq = 0},
262 {.xscale = 1, .yscale = 2, .eq = 1}, /* 250 MHz */ 274 /* 57.14MHz for vic1div2=600MHz and 48 MHz for VCO1div2=500MHz */
275 {.xscale = 4, .yscale = 21, .eq = 0},
276 /* 83.33MHz for vic1div2=600MHz and 69.44MHz for VCO1div2=500MHz */
277 {.xscale = 5, .yscale = 18, .eq = 0},
278 /* 100MHz for vic1div2=600MHz and 83.33 MHz for VCO1div2=500MHz */
279 {.xscale = 2, .yscale = 6, .eq = 0},
280 /* 125MHz for vic1div2=600MHz and 104.1MHz for VCO1div2=500MHz */
281 {.xscale = 5, .yscale = 12, .eq = 0},
282 /* 150MHz for vic1div2=600MHz and 125MHz for VCO1div2=500MHz */
283 {.xscale = 2, .yscale = 4, .eq = 0},
284 /* 166MHz for vic1div2=600MHz and 138.88MHz for VCO1div2=500MHz */
285 {.xscale = 5, .yscale = 18, .eq = 1},
286 /* 200MHz for vic1div2=600MHz and 166MHz for VCO1div2=500MHz */
287 {.xscale = 1, .yscale = 3, .eq = 1},
288 /* 250MHz for vic1div2=600MHz and 208.33MHz for VCO1div2=500MHz */
289 {.xscale = 5, .yscale = 12, .eq = 1},
290 /* 300MHz for vic1div2=600MHz and 250MHz for VCO1div2=500MHz */
291 {.xscale = 1, .yscale = 2, .eq = 1},
263}; 292};
264 293
265/* gmac rate configuration table, in ascending order of rates */ 294/* gmac rate configuration table, in ascending order of rates */
@@ -273,16 +302,23 @@ static struct aux_rate_tbl gmac_rtbl[] = {
273 302
274/* clcd rate configuration table, in ascending order of rates */ 303/* clcd rate configuration table, in ascending order of rates */
275static struct frac_rate_tbl clcd_rtbl[] = { 304static struct frac_rate_tbl clcd_rtbl[] = {
305 {.div = 0x18000}, /* 25 Mhz , for vc01div4 = 300 MHz*/
306 {.div = 0x1638E}, /* 27 Mhz , for vc01div4 = 300 MHz*/
276 {.div = 0x14000}, /* 25 Mhz , for vc01div4 = 250 MHz*/ 307 {.div = 0x14000}, /* 25 Mhz , for vc01div4 = 250 MHz*/
277 {.div = 0x1284B}, /* 27 Mhz , for vc01div4 = 250 MHz*/ 308 {.div = 0x1284B}, /* 27 Mhz , for vc01div4 = 250 MHz*/
278 {.div = 0x0D8D3}, /* 58 Mhz , for vco1div4 = 393 MHz */ 309 {.div = 0x0D8D3}, /* 58 Mhz , for vco1div4 = 393 MHz */
279 {.div = 0x0B72C}, /* 58 Mhz , for vco1div4 = 332 MHz */ 310 {.div = 0x0B72C}, /* 58 Mhz , for vco1div4 = 332 MHz */
311 {.div = 0x0A584}, /* 58 Mhz , for vco1div4 = 300 MHz */
312 {.div = 0x093B1}, /* 65 Mhz , for vc01div4 = 300 MHz*/
280 {.div = 0x089EE}, /* 58 Mhz , for vc01div4 = 250 MHz*/ 313 {.div = 0x089EE}, /* 58 Mhz , for vc01div4 = 250 MHz*/
314 {.div = 0x081BA}, /* 74 Mhz , for vc01div4 = 300 MHz*/
281 {.div = 0x07BA0}, /* 65 Mhz , for vc01div4 = 250 MHz*/ 315 {.div = 0x07BA0}, /* 65 Mhz , for vc01div4 = 250 MHz*/
282 {.div = 0x06f1C}, /* 72 Mhz , for vc01div4 = 250 MHz*/ 316 {.div = 0x06f1C}, /* 72 Mhz , for vc01div4 = 250 MHz*/
283 {.div = 0x06E58}, /* 58 Mhz , for vco1div4 = 200 MHz */ 317 {.div = 0x06E58}, /* 58 Mhz , for vco1div4 = 200 MHz */
284 {.div = 0x06c1B}, /* 74 Mhz , for vc01div4 = 250 MHz*/ 318 {.div = 0x06c1B}, /* 74 Mhz , for vc01div4 = 250 MHz*/
319 {.div = 0x058E3}, /* 108 Mhz , for vc01div4 = 300 MHz*/
285 {.div = 0x04A12}, /* 108 Mhz , for vc01div4 = 250 MHz*/ 320 {.div = 0x04A12}, /* 108 Mhz , for vc01div4 = 250 MHz*/
321 {.div = 0x040A5}, /* 148.5 Mhz , for vc01div4 = 300 MHz*/
286 {.div = 0x0378E}, /* 144 Mhz , for vc01div4 = 250 MHz*/ 322 {.div = 0x0378E}, /* 144 Mhz , for vc01div4 = 250 MHz*/
287 {.div = 0x0360D}, /* 148 Mhz , for vc01div4 = 250 MHz*/ 323 {.div = 0x0360D}, /* 148 Mhz , for vc01div4 = 250 MHz*/
288 {.div = 0x035E0}, /* 148.5 MHz, for vc01div4 = 250 MHz*/ 324 {.div = 0x035E0}, /* 148.5 MHz, for vc01div4 = 250 MHz*/
@@ -351,20 +387,31 @@ static struct aux_rate_tbl adc_rtbl[] = {
351 387
352/* General synth rate configuration table, in ascending order of rates */ 388/* General synth rate configuration table, in ascending order of rates */
353static struct frac_rate_tbl gen_rtbl[] = { 389static struct frac_rate_tbl gen_rtbl[] = {
354 /* For vco1div4 = 250 MHz */ 390 {.div = 0x1A92B}, /* 22.5792 MHz for vco1div4=300 MHz*/
355 {.div = 0x1624E}, /* 22.5792 MHz */ 391 {.div = 0x186A0}, /* 24.576 MHz for vco1div4=300 MHz*/
356 {.div = 0x14585}, /* 24.576 MHz */ 392 {.div = 0x18000}, /* 25 MHz for vco1div4=300 MHz*/
357 {.div = 0x14000}, /* 25 MHz */ 393 {.div = 0x1624E}, /* 22.5792 MHz for vco1div4=250 MHz*/
358 {.div = 0x0B127}, /* 45.1584 MHz */ 394 {.div = 0x14585}, /* 24.576 MHz for vco1div4=250 MHz*/
359 {.div = 0x0A000}, /* 50 MHz */ 395 {.div = 0x14000}, /* 25 MHz for vco1div4=250 MHz*/
360 {.div = 0x061A8}, /* 81.92 MHz */ 396 {.div = 0x0D495}, /* 45.1584 MHz for vco1div4=300 MHz*/
361 {.div = 0x05000}, /* 100 MHz */ 397 {.div = 0x0C000}, /* 50 MHz for vco1div4=300 MHz*/
362 {.div = 0x02800}, /* 200 MHz */ 398 {.div = 0x0B127}, /* 45.1584 MHz for vco1div4=250 MHz*/
363 {.div = 0x02620}, /* 210 MHz */ 399 {.div = 0x0A000}, /* 50 MHz for vco1div4=250 MHz*/
364 {.div = 0x02460}, /* 220 MHz */ 400 {.div = 0x07530}, /* 81.92 MHz for vco1div4=300 MHz*/
365 {.div = 0x022C0}, /* 230 MHz */ 401 {.div = 0x061A8}, /* 81.92 MHz for vco1div4=250 MHz*/
366 {.div = 0x02160}, /* 240 MHz */ 402 {.div = 0x06000}, /* 100 MHz for vco1div4=300 MHz*/
367 {.div = 0x02000}, /* 250 MHz */ 403 {.div = 0x05000}, /* 100 MHz for vco1div4=250 MHz*/
404 {.div = 0x03000}, /* 200 MHz for vco1div4=300 MHz*/
405 {.div = 0x02DB6}, /* 210 MHz for vco1div4=300 MHz*/
406 {.div = 0x02BA2}, /* 220 MHz for vco1div4=300 MHz*/
407 {.div = 0x029BD}, /* 230 MHz for vco1div4=300 MHz*/
408 {.div = 0x02800}, /* 200 MHz for vco1div4=250 MHz*/
409 {.div = 0x02666}, /* 250 MHz for vco1div4=300 MHz*/
410 {.div = 0x02620}, /* 210 MHz for vco1div4=250 MHz*/
411 {.div = 0x02460}, /* 220 MHz for vco1div4=250 MHz*/
412 {.div = 0x022C0}, /* 230 MHz for vco1div4=250 MHz*/
413 {.div = 0x02160}, /* 240 MHz for vco1div4=250 MHz*/
414 {.div = 0x02000}, /* 250 MHz for vco1div4=250 MHz*/
368}; 415};
369 416
370/* clock parents */ 417/* clock parents */
diff --git a/drivers/clk/spear/spear3xx_clock.c b/drivers/clk/spear/spear3xx_clock.c
index ff35ebca1d8d..a07c067fe960 100644
--- a/drivers/clk/spear/spear3xx_clock.c
+++ b/drivers/clk/spear/spear3xx_clock.c
@@ -107,6 +107,12 @@ static struct pll_rate_tbl pll_rtbl[] = {
107/* aux rate configuration table, in ascending order of rates */ 107/* aux rate configuration table, in ascending order of rates */
108static struct aux_rate_tbl aux_rtbl[] = { 108static struct aux_rate_tbl aux_rtbl[] = {
109 /* For PLL1 = 332 MHz */ 109 /* For PLL1 = 332 MHz */
110 {.xscale = 1, .yscale = 81, .eq = 0}, /* 2.049 MHz */
111 {.xscale = 1, .yscale = 59, .eq = 0}, /* 2.822 MHz */
112 {.xscale = 2, .yscale = 81, .eq = 0}, /* 4.098 MHz */
113 {.xscale = 3, .yscale = 89, .eq = 0}, /* 5.644 MHz */
114 {.xscale = 4, .yscale = 81, .eq = 0}, /* 8.197 MHz */
115 {.xscale = 4, .yscale = 59, .eq = 0}, /* 11.254 MHz */
110 {.xscale = 2, .yscale = 27, .eq = 0}, /* 12.296 MHz */ 116 {.xscale = 2, .yscale = 27, .eq = 0}, /* 12.296 MHz */
111 {.xscale = 2, .yscale = 8, .eq = 0}, /* 41.5 MHz */ 117 {.xscale = 2, .yscale = 8, .eq = 0}, /* 41.5 MHz */
112 {.xscale = 2, .yscale = 4, .eq = 0}, /* 83 MHz */ 118 {.xscale = 2, .yscale = 4, .eq = 0}, /* 83 MHz */
diff --git a/drivers/clk/spear/spear6xx_clock.c b/drivers/clk/spear/spear6xx_clock.c
index e8d2b3109b34..8a81770be4c5 100644
--- a/drivers/clk/spear/spear6xx_clock.c
+++ b/drivers/clk/spear/spear6xx_clock.c
@@ -92,6 +92,7 @@ static struct pll_rate_tbl pll_rtbl[] = {
92/* aux rate configuration table, in ascending order of rates */ 92/* aux rate configuration table, in ascending order of rates */
93static struct aux_rate_tbl aux_rtbl[] = { 93static struct aux_rate_tbl aux_rtbl[] = {
94 /* For PLL1 = 332 MHz */ 94 /* For PLL1 = 332 MHz */
95 {.xscale = 2, .yscale = 27, .eq = 0}, /* 12.296 MHz */
95 {.xscale = 2, .yscale = 8, .eq = 0}, /* 41.5 MHz */ 96 {.xscale = 2, .yscale = 8, .eq = 0}, /* 41.5 MHz */
96 {.xscale = 2, .yscale = 4, .eq = 0}, /* 83 MHz */ 97 {.xscale = 2, .yscale = 4, .eq = 0}, /* 83 MHz */
97 {.xscale = 1, .yscale = 2, .eq = 1}, /* 166 MHz */ 98 {.xscale = 1, .yscale = 2, .eq = 1}, /* 166 MHz */