aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-01-16 12:28:44 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-02 04:35:31 -0400
commit64fceb1dcd1aa6a9f2e53cf8830b38bb007b375b (patch)
treeccf7b5a9fc9bbf65962b6bc7ba0d4adac0206c8e /arch/arm/common
parent4de2edbd15ff70c77e1d018611d06f7801fc2b72 (diff)
ARM: ICST: use Hz instead of kHz
This makes the ICST support fit more nicely with the clk API, eliminating the need to *1000 and /1000 in places. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/icst307.c8
-rw-r--r--arch/arm/common/icst525.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/common/icst307.c b/arch/arm/common/icst307.c
index f6063c95e256..66c69e597b70 100644
--- a/arch/arm/common/icst307.c
+++ b/arch/arm/common/icst307.c
@@ -24,12 +24,12 @@
24 */ 24 */
25static unsigned char s2div[8] = { 10, 2, 8, 4, 5, 7, 3, 6 }; 25static unsigned char s2div[8] = { 10, 2, 8, 4, 5, 7, 3, 6 };
26 26
27unsigned long icst307_khz(const struct icst_params *p, struct icst_vco vco) 27unsigned long icst307_hz(const struct icst_params *p, struct icst_vco vco)
28{ 28{
29 return p->ref * 2 * (vco.v + 8) / ((vco.r + 2) * s2div[vco.s]); 29 return p->ref * 2 * (vco.v + 8) / ((vco.r + 2) * s2div[vco.s]);
30} 30}
31 31
32EXPORT_SYMBOL(icst307_khz); 32EXPORT_SYMBOL(icst307_hz);
33 33
34/* 34/*
35 * Ascending divisor S values. 35 * Ascending divisor S values.
@@ -37,7 +37,7 @@ EXPORT_SYMBOL(icst307_khz);
37static unsigned char idx2s[8] = { 1, 6, 3, 4, 7, 5, 2, 0 }; 37static unsigned char idx2s[8] = { 1, 6, 3, 4, 7, 5, 2, 0 };
38 38
39struct icst_vco 39struct icst_vco
40icst307_khz_to_vco(const struct icst_params *p, unsigned long freq) 40icst307_hz_to_vco(const struct icst_params *p, unsigned long freq)
41{ 41{
42 struct icst_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max }; 42 struct icst_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max };
43 unsigned long f; 43 unsigned long f;
@@ -94,4 +94,4 @@ icst307_khz_to_vco(const struct icst_params *p, unsigned long freq)
94 return vco; 94 return vco;
95} 95}
96 96
97EXPORT_SYMBOL(icst307_khz_to_vco); 97EXPORT_SYMBOL(icst307_hz_to_vco);
diff --git a/arch/arm/common/icst525.c b/arch/arm/common/icst525.c
index 34dc2e1b9efc..c1d22b7c4763 100644
--- a/arch/arm/common/icst525.c
+++ b/arch/arm/common/icst525.c
@@ -21,12 +21,12 @@
21 */ 21 */
22static unsigned char s2div[8] = { 10, 2, 8, 4, 5, 7, 9, 6 }; 22static unsigned char s2div[8] = { 10, 2, 8, 4, 5, 7, 9, 6 };
23 23
24unsigned long icst525_khz(const struct icst_params *p, struct icst_vco vco) 24unsigned long icst525_hz(const struct icst_params *p, struct icst_vco vco)
25{ 25{
26 return p->ref * 2 * (vco.v + 8) / ((vco.r + 2) * s2div[vco.s]); 26 return p->ref * 2 * (vco.v + 8) / ((vco.r + 2) * s2div[vco.s]);
27} 27}
28 28
29EXPORT_SYMBOL(icst525_khz); 29EXPORT_SYMBOL(icst525_hz);
30 30
31/* 31/*
32 * Ascending divisor S values. 32 * Ascending divisor S values.
@@ -34,7 +34,7 @@ EXPORT_SYMBOL(icst525_khz);
34static unsigned char idx2s[] = { 1, 3, 4, 7, 5, 2, 6, 0 }; 34static unsigned char idx2s[] = { 1, 3, 4, 7, 5, 2, 6, 0 };
35 35
36struct icst_vco 36struct icst_vco
37icst525_khz_to_vco(const struct icst_params *p, unsigned long freq) 37icst525_hz_to_vco(const struct icst_params *p, unsigned long freq)
38{ 38{
39 struct icst_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max }; 39 struct icst_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max };
40 unsigned long f; 40 unsigned long f;
@@ -92,4 +92,4 @@ icst525_khz_to_vco(const struct icst_params *p, unsigned long freq)
92 return vco; 92 return vco;
93} 93}
94 94
95EXPORT_SYMBOL(icst525_khz_to_vco); 95EXPORT_SYMBOL(icst525_hz_to_vco);