diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-16 15:16:10 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 04:35:33 -0400 |
commit | c5a0adb51002e51a4254cb7f0ab7190d41d8b930 (patch) | |
tree | b6ae6bd13b1aa722e7d96876da28cd5ac3722188 /arch/arm/include/asm/hardware | |
parent | 232eaf7f268f765b52170bec42bfa0c5825aa239 (diff) |
ARM: ICST: kill duplicate icst code
The only difference between ICST307 and ICST525 are the two arrays
for calculating the S parameter; the code is now identical. Merge
the two files and kill the duplicated code.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/hardware')
-rw-r--r-- | arch/arm/include/asm/hardware/icst.h | 24 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/icst307.h | 34 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/icst525.h | 33 |
3 files changed, 24 insertions, 67 deletions
diff --git a/arch/arm/include/asm/hardware/icst.h b/arch/arm/include/asm/hardware/icst.h index 4d403680fa47..10382a3dcec9 100644 --- a/arch/arm/include/asm/hardware/icst.h +++ b/arch/arm/include/asm/hardware/icst.h | |||
@@ -32,4 +32,28 @@ struct icst_vco { | |||
32 | unsigned char s; | 32 | unsigned char s; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | unsigned long icst_hz(const struct icst_params *p, struct icst_vco vco); | ||
36 | struct icst_vco icst_hz_to_vco(const struct icst_params *p, unsigned long freq); | ||
37 | |||
38 | /* | ||
39 | * ICST307 VCO frequency must be between 6MHz and 200MHz (3.3 or 5V). | ||
40 | * This frequency is pre-output divider. | ||
41 | */ | ||
42 | #define ICST307_VCO_MIN 6000000 | ||
43 | #define ICST307_VCO_MAX 200000000 | ||
44 | |||
45 | extern const unsigned char icst307_s2div[]; | ||
46 | extern const unsigned char icst307_idx2s[]; | ||
47 | |||
48 | /* | ||
49 | * ICST525 VCO frequency must be between 10MHz and 200MHz (3V) or 320MHz (5V). | ||
50 | * This frequency is pre-output divider. | ||
51 | */ | ||
52 | #define ICST525_VCO_MIN 10000000 | ||
53 | #define ICST525_VCO_MAX_3V 200000000 | ||
54 | #define ICST525_VCO_MAX_5V 320000000 | ||
55 | |||
56 | extern const unsigned char icst525_s2div[]; | ||
57 | extern const unsigned char icst525_idx2s[]; | ||
58 | |||
35 | #endif | 59 | #endif |
diff --git a/arch/arm/include/asm/hardware/icst307.h b/arch/arm/include/asm/hardware/icst307.h deleted file mode 100644 index d76fc6e09e47..000000000000 --- a/arch/arm/include/asm/hardware/icst307.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/icst307.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Support functions for calculating clocks/divisors for the ICS307 | ||
11 | * clock generators. See http://www.icst.com/ for more information | ||
12 | * on these devices. | ||
13 | * | ||
14 | * This file is similar to the icst525.h file | ||
15 | */ | ||
16 | #ifndef ASMARM_HARDWARE_ICST307_H | ||
17 | #define ASMARM_HARDWARE_ICST307_H | ||
18 | |||
19 | #include <asm/hardware/icst.h> | ||
20 | |||
21 | unsigned long icst307_hz(const struct icst_params *p, struct icst_vco vco); | ||
22 | struct icst_vco icst307_hz_to_vco(const struct icst_params *p, unsigned long freq); | ||
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 6000000 | ||
29 | #define ICST307_VCO_MAX 200000000 | ||
30 | |||
31 | extern const unsigned char icst307_s2div[]; | ||
32 | extern const unsigned char icst307_idx2s[]; | ||
33 | |||
34 | #endif | ||
diff --git a/arch/arm/include/asm/hardware/icst525.h b/arch/arm/include/asm/hardware/icst525.h deleted file mode 100644 index 2f9b95386b1b..000000000000 --- a/arch/arm/include/asm/hardware/icst525.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/icst525.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Support functions for calculating clocks/divisors for the ICST525 | ||
11 | * clock generators. See http://www.icst.com/ for more information | ||
12 | * on these devices. | ||
13 | */ | ||
14 | #ifndef ASMARM_HARDWARE_ICST525_H | ||
15 | #define ASMARM_HARDWARE_ICST525_H | ||
16 | |||
17 | #include <asm/hardware/icst.h> | ||
18 | |||
19 | unsigned long icst525_hz(const struct icst_params *p, struct icst_vco vco); | ||
20 | struct icst_vco icst525_hz_to_vco(const struct icst_params *p, unsigned long freq); | ||
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 10000000 | ||
27 | #define ICST525_VCO_MAX_3V 200000000 | ||
28 | #define ICST525_VCO_MAX_5V 320000000 | ||
29 | |||
30 | extern const unsigned char icst525_s2div[]; | ||
31 | extern const unsigned char icst525_idx2s[]; | ||
32 | |||
33 | #endif | ||