diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-16 11:27:28 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 04:35:29 -0400 |
commit | 39c0cb02db5b8fdfac76d506b7a008b70bc960e9 (patch) | |
tree | 30e79dcadb5f6c26bba5fcf585cc309e240ff948 /arch/arm/include | |
parent | b830b9b5b3d04bc22f0b9ded85b713f7d3c11b7f (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/include')
-rw-r--r-- | arch/arm/include/asm/hardware/icst.h | 32 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/icst307.h | 21 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/icst525.h | 21 |
3 files changed, 40 insertions, 34 deletions
diff --git a/arch/arm/include/asm/hardware/icst.h b/arch/arm/include/asm/hardware/icst.h new file mode 100644 index 000000000000..65b1edd4452b --- /dev/null +++ b/arch/arm/include/asm/hardware/icst.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/icst.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 ICST | ||
11 | * clock generators. See http://www.icst.com/ for more information | ||
12 | * on these devices. | ||
13 | */ | ||
14 | #ifndef ASMARM_HARDWARE_ICST_H | ||
15 | #define ASMARM_HARDWARE_ICST_H | ||
16 | |||
17 | struct icst_params { | ||
18 | unsigned long ref; | ||
19 | unsigned long vco_max; /* inclusive */ | ||
20 | unsigned short vd_min; /* inclusive */ | ||
21 | unsigned short vd_max; /* inclusive */ | ||
22 | unsigned char rd_min; /* inclusive */ | ||
23 | unsigned char rd_max; /* inclusive */ | ||
24 | }; | ||
25 | |||
26 | struct icst_vco { | ||
27 | unsigned short v; | ||
28 | unsigned char r; | ||
29 | unsigned char s; | ||
30 | }; | ||
31 | |||
32 | #endif | ||
diff --git a/arch/arm/include/asm/hardware/icst307.h b/arch/arm/include/asm/hardware/icst307.h index 554f128a1046..85932e902e99 100644 --- a/arch/arm/include/asm/hardware/icst307.h +++ b/arch/arm/include/asm/hardware/icst307.h | |||
@@ -16,23 +16,10 @@ | |||
16 | #ifndef ASMARM_HARDWARE_ICST307_H | 16 | #ifndef ASMARM_HARDWARE_ICST307_H |
17 | #define ASMARM_HARDWARE_ICST307_H | 17 | #define ASMARM_HARDWARE_ICST307_H |
18 | 18 | ||
19 | struct icst307_params { | 19 | #include <asm/hardware/icst.h> |
20 | unsigned long ref; | ||
21 | unsigned long vco_max; /* inclusive */ | ||
22 | unsigned short vd_min; /* inclusive */ | ||
23 | unsigned short vd_max; /* inclusive */ | ||
24 | unsigned char rd_min; /* inclusive */ | ||
25 | unsigned char rd_max; /* inclusive */ | ||
26 | }; | ||
27 | 20 | ||
28 | struct icst307_vco { | 21 | unsigned long icst307_khz(const struct icst_params *p, struct icst_vco vco); |
29 | unsigned short v; | 22 | struct icst_vco icst307_khz_to_vco(const struct icst_params *p, unsigned long freq); |
30 | unsigned char r; | 23 | struct icst_vco icst307_ps_to_vco(const struct icst_params *p, unsigned long period); |
31 | unsigned char s; | ||
32 | }; | ||
33 | |||
34 | unsigned long icst307_khz(const struct icst307_params *p, struct icst307_vco vco); | ||
35 | struct icst307_vco icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq); | ||
36 | struct icst307_vco icst307_ps_to_vco(const struct icst307_params *p, unsigned long period); | ||
37 | 24 | ||
38 | #endif | 25 | #endif |
diff --git a/arch/arm/include/asm/hardware/icst525.h b/arch/arm/include/asm/hardware/icst525.h index 58f0dc43e2ed..170deb2b605b 100644 --- a/arch/arm/include/asm/hardware/icst525.h +++ b/arch/arm/include/asm/hardware/icst525.h | |||
@@ -14,23 +14,10 @@ | |||
14 | #ifndef ASMARM_HARDWARE_ICST525_H | 14 | #ifndef ASMARM_HARDWARE_ICST525_H |
15 | #define ASMARM_HARDWARE_ICST525_H | 15 | #define ASMARM_HARDWARE_ICST525_H |
16 | 16 | ||
17 | struct icst525_params { | 17 | #include <asm/hardware/icst.h> |
18 | unsigned long ref; | ||
19 | unsigned long vco_max; /* inclusive */ | ||
20 | unsigned short vd_min; /* inclusive */ | ||
21 | unsigned short vd_max; /* inclusive */ | ||
22 | unsigned char rd_min; /* inclusive */ | ||
23 | unsigned char rd_max; /* inclusive */ | ||
24 | }; | ||
25 | 18 | ||
26 | struct icst525_vco { | 19 | unsigned long icst525_khz(const struct icst_params *p, struct icst_vco vco); |
27 | unsigned short v; | 20 | struct icst_vco icst525_khz_to_vco(const struct icst_params *p, unsigned long freq); |
28 | unsigned char r; | 21 | struct icst_vco icst525_ps_to_vco(const struct icst_params *p, unsigned long period); |
29 | unsigned char s; | ||
30 | }; | ||
31 | |||
32 | unsigned long icst525_khz(const struct icst525_params *p, struct icst525_vco vco); | ||
33 | struct icst525_vco icst525_khz_to_vco(const struct icst525_params *p, unsigned long freq); | ||
34 | struct icst525_vco icst525_ps_to_vco(const struct icst525_params *p, unsigned long period); | ||
35 | 22 | ||
36 | #endif | 23 | #endif |