ARM: ICST: provide definitions for max/min VCO frequencies
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 16 Jan 2010 18:08:47 +0000 (18:08 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 2 May 2010 08:35:30 +0000 (09:35 +0100)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/common/icst307.c
arch/arm/common/icst525.c
arch/arm/include/asm/hardware/icst307.h
arch/arm/include/asm/hardware/icst525.h
arch/arm/mach-integrator/cpu.c
arch/arm/mach-integrator/impd1.c
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-realview/core.c
arch/arm/mach-versatile/core.c

index f78f5b5880c28d7d73156024af97f0159db7f05c..f6063c95e256ffc397712c0ee18b5cf5ea27a99f 100644 (file)
@@ -53,7 +53,7 @@ icst307_khz_to_vco(const struct icst_params *p, unsigned long freq)
                /*
                 * f must be between 6MHz and 200MHz (3.3 or 5V)
                 */
-               if (f > 6000 && f <= p->vco_max)
+               if (f > ICST307_VCO_MIN && f <= p->vco_max)
                        break;
        } while (i < ARRAY_SIZE(idx2s));
 
index eadf983ee434bf2c598a6505a438d194eca9b05c..34dc2e1b9efc1711bdec6049108d8667664ffef1 100644 (file)
@@ -51,7 +51,7 @@ icst525_khz_to_vco(const struct icst_params *p, unsigned long freq)
                 * f must be between 10MHz and
                 *  320MHz (5V) or 200MHz (3V)
                 */
-               if (f > 10000 && f <= p->vco_max)
+               if (f > ICST525_VCO_MIN && f <= p->vco_max)
                        break;
        } while (i < ARRAY_SIZE(idx2s));
 
index 8d0820a654db8fa4450a0458c209a4d88d7df7c3..0c4e37e3fdefd03cda412c311c512168717d5951 100644 (file)
 unsigned long icst307_khz(const struct icst_params *p, struct icst_vco vco);
 struct icst_vco icst307_khz_to_vco(const struct icst_params *p, unsigned long freq);
 
+/*
+ * ICST307 VCO frequency must be between 6MHz and 200MHz (3.3 or 5V).
+ * This frequency is pre-output divider.
+ */
+#define ICST307_VCO_MIN        6000
+#define ICST307_VCO_MAX        200000
+
 #endif
index 42a274e59fa2a36c1c647e0ebfcc2b2c2cfdb2ef..3b72c132e24f27771e4240ce06cce45de6da9da6 100644 (file)
 unsigned long icst525_khz(const struct icst_params *p, struct icst_vco vco);
 struct icst_vco icst525_khz_to_vco(const struct icst_params *p, unsigned long freq);
 
+/*
+ * ICST525 VCO frequency must be between 10MHz and 200MHz (3V) or 320MHz (5V).
+ * This frequency is pre-output divider.
+ */
+#define ICST525_VCO_MIN                10000
+#define ICST525_VCO_MAX_3V     200000
+#define ICST525_VCO_MAX_5V     320000
+
 #endif
index c4e5debeb48c9f6230270d0bbc25c4cd03545c29..1671b4a363b1c99bfd5711ff4d8e4cc9dd404fed 100644 (file)
@@ -33,7 +33,7 @@ static struct cpufreq_driver integrator_driver;
 
 static const struct icst_params lclk_params = {
        .ref            = 24000,
-       .vco_max        = 320000,
+       .vco_max        = ICST525_VCO_MAX_5V,
        .vd_min         = 8,
        .vd_max         = 132,
        .rd_min         = 24,
@@ -42,7 +42,7 @@ static const struct icst_params lclk_params = {
 
 static const struct icst_params cclk_params = {
        .ref            = 24000,
-       .vco_max        = 320000,
+       .vco_max        = ICST525_VCO_MAX_5V,
        .vd_min         = 12,
        .vd_max         = 160,
        .rd_min         = 24,
index dfb961b67afa52d9bbb746fde10c5e36ae99a476..5aca7ebea3cea0f6b433f81f3352af36587ff8a8 100644 (file)
@@ -42,7 +42,7 @@ struct impd1_module {
 
 static const struct icst_params impd1_vco_params = {
        .ref            = 24000,        /* 24 MHz */
-       .vco_max        = 200000,       /* 200 MHz */
+       .vco_max        = ICST525_VCO_MAX_3V,
        .vd_min         = 12,
        .vd_max         = 519,
        .rd_min         = 3,
index 15bfbe2e1df8f0a90fb1a85038f8e863cbe4f1bd..27f95106b47cd14865fb4f374242a22533b16bdd 100644 (file)
@@ -270,7 +270,7 @@ static void __init intcp_init_irq(void)
 
 static const struct icst_params cp_auxvco_params = {
        .ref            = 24000,
-       .vco_max        = 320000,
+       .vco_max        = ICST525_VCO_MAX_5V,
        .vd_min         = 8,
        .vd_max         = 263,
        .rd_min         = 3,
index ac504745fed1a0c3772e8e07ee559ea8fe0459c0..5a850f0dc36c4e44a7d1936449890deab10a0d62 100644 (file)
@@ -275,7 +275,7 @@ struct mmci_platform_data realview_mmc1_plat_data = {
  */
 static const struct icst_params realview_oscvco_params = {
        .ref            = 24000,
-       .vco_max        = 200000,
+       .vco_max        = ICST307_VCO_MAX,
        .vd_min         = 4 + 8,
        .vd_max         = 511 + 8,
        .rd_min         = 1 + 2,
index ded71343553f0ff124bbcad4b28863c1f39757f7..f8ed561ec6988e04aebecea24c2b29b4d82cf28f 100644 (file)
@@ -381,7 +381,7 @@ static struct mmci_platform_data mmc0_plat_data = {
  */
 static const struct icst_params versatile_oscvco_params = {
        .ref            = 24000,
-       .vco_max        = 200000,
+       .vco_max        = ICST307_VCO_MAX,
        .vd_min         = 4 + 8,
        .vd_max         = 511 + 8,
        .rd_min         = 1 + 2,