Commit 4de2edbd15ff70c77e1d018611d06f7801fc2b72

Authored by Russell King
1 parent 643761ac43

ARM: ICST: provide definitions for max/min VCO frequencies

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Showing 9 changed files with 23 additions and 8 deletions Side-by-side Diff

arch/arm/common/icst307.c
... ... @@ -53,7 +53,7 @@
53 53 /*
54 54 * f must be between 6MHz and 200MHz (3.3 or 5V)
55 55 */
56   - if (f > 6000 && f <= p->vco_max)
  56 + if (f > ICST307_VCO_MIN && f <= p->vco_max)
57 57 break;
58 58 } while (i < ARRAY_SIZE(idx2s));
59 59  
arch/arm/common/icst525.c
... ... @@ -51,7 +51,7 @@
51 51 * f must be between 10MHz and
52 52 * 320MHz (5V) or 200MHz (3V)
53 53 */
54   - if (f > 10000 && f <= p->vco_max)
  54 + if (f > ICST525_VCO_MIN && f <= p->vco_max)
55 55 break;
56 56 } while (i < ARRAY_SIZE(idx2s));
57 57  
arch/arm/include/asm/hardware/icst307.h
... ... @@ -21,5 +21,12 @@
21 21 unsigned long icst307_khz(const struct icst_params *p, struct icst_vco vco);
22 22 struct icst_vco icst307_khz_to_vco(const struct icst_params *p, unsigned long freq);
23 23  
  24 +/*
  25 + * ICST307 VCO frequency must be between 6MHz and 200MHz (3.3 or 5V).
  26 + * This frequency is pre-output divider.
  27 + */
  28 +#define ICST307_VCO_MIN 6000
  29 +#define ICST307_VCO_MAX 200000
  30 +
24 31 #endif
arch/arm/include/asm/hardware/icst525.h
... ... @@ -19,5 +19,13 @@
19 19 unsigned long icst525_khz(const struct icst_params *p, struct icst_vco vco);
20 20 struct icst_vco icst525_khz_to_vco(const struct icst_params *p, unsigned long freq);
21 21  
  22 +/*
  23 + * ICST525 VCO frequency must be between 10MHz and 200MHz (3V) or 320MHz (5V).
  24 + * This frequency is pre-output divider.
  25 + */
  26 +#define ICST525_VCO_MIN 10000
  27 +#define ICST525_VCO_MAX_3V 200000
  28 +#define ICST525_VCO_MAX_5V 320000
  29 +
22 30 #endif
arch/arm/mach-integrator/cpu.c
... ... @@ -33,7 +33,7 @@
33 33  
34 34 static const struct icst_params lclk_params = {
35 35 .ref = 24000,
36   - .vco_max = 320000,
  36 + .vco_max = ICST525_VCO_MAX_5V,
37 37 .vd_min = 8,
38 38 .vd_max = 132,
39 39 .rd_min = 24,
... ... @@ -42,7 +42,7 @@
42 42  
43 43 static const struct icst_params cclk_params = {
44 44 .ref = 24000,
45   - .vco_max = 320000,
  45 + .vco_max = ICST525_VCO_MAX_5V,
46 46 .vd_min = 12,
47 47 .vd_max = 160,
48 48 .rd_min = 24,
arch/arm/mach-integrator/impd1.c
... ... @@ -42,7 +42,7 @@
42 42  
43 43 static const struct icst_params impd1_vco_params = {
44 44 .ref = 24000, /* 24 MHz */
45   - .vco_max = 200000, /* 200 MHz */
  45 + .vco_max = ICST525_VCO_MAX_3V,
46 46 .vd_min = 12,
47 47 .vd_max = 519,
48 48 .rd_min = 3,
arch/arm/mach-integrator/integrator_cp.c
... ... @@ -270,7 +270,7 @@
270 270  
271 271 static const struct icst_params cp_auxvco_params = {
272 272 .ref = 24000,
273   - .vco_max = 320000,
  273 + .vco_max = ICST525_VCO_MAX_5V,
274 274 .vd_min = 8,
275 275 .vd_max = 263,
276 276 .rd_min = 3,
arch/arm/mach-realview/core.c
... ... @@ -275,7 +275,7 @@
275 275 */
276 276 static const struct icst_params realview_oscvco_params = {
277 277 .ref = 24000,
278   - .vco_max = 200000,
  278 + .vco_max = ICST307_VCO_MAX,
279 279 .vd_min = 4 + 8,
280 280 .vd_max = 511 + 8,
281 281 .rd_min = 1 + 2,
arch/arm/mach-versatile/core.c
... ... @@ -381,7 +381,7 @@
381 381 */
382 382 static const struct icst_params versatile_oscvco_params = {
383 383 .ref = 24000,
384   - .vco_max = 200000,
  384 + .vco_max = ICST307_VCO_MAX,
385 385 .vd_min = 4 + 8,
386 386 .vd_max = 511 + 8,
387 387 .rd_min = 1 + 2,