aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-01-16 11:27:28 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-02 04:35:29 -0400
commit39c0cb02db5b8fdfac76d506b7a008b70bc960e9 (patch)
tree30e79dcadb5f6c26bba5fcf585cc309e240ff948 /arch/arm/common
parentb830b9b5b3d04bc22f0b9ded85b713f7d3c11b7f (diff)
ARM: ICST: merge common ICST VCO structures
The structures for the ICST307 and ICST525 VCO devices are identical, so merge them together. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/icst307.c14
-rw-r--r--arch/arm/common/icst525.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/common/icst307.c b/arch/arm/common/icst307.c
index 6d094c157540..2eebd960c01b 100644
--- a/arch/arm/common/icst307.c
+++ b/arch/arm/common/icst307.c
@@ -24,7 +24,7 @@
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 icst307_params *p, struct icst307_vco vco) 27unsigned long icst307_khz(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}
@@ -36,10 +36,10 @@ EXPORT_SYMBOL(icst307_khz);
36 */ 36 */
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 icst307_vco 39struct icst_vco
40icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq) 40icst307_khz_to_vco(const struct icst_params *p, unsigned long freq)
41{ 41{
42 struct icst307_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;
44 unsigned int i = 0, rd, best = (unsigned int)-1; 44 unsigned int i = 0, rd, best = (unsigned int)-1;
45 45
@@ -96,10 +96,10 @@ icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq)
96 96
97EXPORT_SYMBOL(icst307_khz_to_vco); 97EXPORT_SYMBOL(icst307_khz_to_vco);
98 98
99struct icst307_vco 99struct icst_vco
100icst307_ps_to_vco(const struct icst307_params *p, unsigned long period) 100icst307_ps_to_vco(const struct icst_params *p, unsigned long period)
101{ 101{
102 struct icst307_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max }; 102 struct icst_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max };
103 unsigned long f, ps; 103 unsigned long f, ps;
104 unsigned int i = 0, rd, best = (unsigned int)-1; 104 unsigned int i = 0, rd, best = (unsigned int)-1;
105 105
diff --git a/arch/arm/common/icst525.c b/arch/arm/common/icst525.c
index 3d377c5bdef6..fd5c2e7ed176 100644
--- a/arch/arm/common/icst525.c
+++ b/arch/arm/common/icst525.c
@@ -21,7 +21,7 @@
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 icst525_params *p, struct icst525_vco vco) 24unsigned long icst525_khz(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}
@@ -33,10 +33,10 @@ EXPORT_SYMBOL(icst525_khz);
33 */ 33 */
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 icst525_vco 36struct icst_vco
37icst525_khz_to_vco(const struct icst525_params *p, unsigned long freq) 37icst525_khz_to_vco(const struct icst_params *p, unsigned long freq)
38{ 38{
39 struct icst525_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;
41 unsigned int i = 0, rd, best = (unsigned int)-1; 41 unsigned int i = 0, rd, best = (unsigned int)-1;
42 42
@@ -94,10 +94,10 @@ icst525_khz_to_vco(const struct icst525_params *p, unsigned long freq)
94 94
95EXPORT_SYMBOL(icst525_khz_to_vco); 95EXPORT_SYMBOL(icst525_khz_to_vco);
96 96
97struct icst525_vco 97struct icst_vco
98icst525_ps_to_vco(const struct icst525_params *p, unsigned long period) 98icst525_ps_to_vco(const struct icst_params *p, unsigned long period)
99{ 99{
100 struct icst525_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max }; 100 struct icst_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max };
101 unsigned long f, ps; 101 unsigned long f, ps;
102 unsigned int i = 0, rd, best = (unsigned int)-1; 102 unsigned int i = 0, rd, best = (unsigned int)-1;
103 103