diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2011-10-04 06:41:43 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-10-04 06:48:42 -0400 |
commit | 52e329ebb05983153bbde7351c94449018651290 (patch) | |
tree | 13b266d0cf3210eb1fa1057176fb19249099eb95 /arch/arm/mach-s3c64xx | |
parent | c0468b0244464a9d85e527fd0bfee91caed697a7 (diff) |
ARM: SAMSUNG: Consolidate plat/pll.h
Removed
- arch/arm/plat-s3c24xx/include/plat/pll.h
- arch/arm/mach-s3c64xx/include/mach/pll.h
- arch/arm/plat-s5p/include/plat/pll.h
- arch/arm/plat-samsung/include/plat/pll6553x.h
And created
- arch/arm/plat-samsung/include/plat/pll.h
Cc: Ben Dooks <ben-linux@fluff.org>
[kgene.kim@samsung.com: changed title]
[kgene.kim@samsung.com: fixed conflicts in plat-s5p/include/pll.h]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r-- | arch/arm/mach-s3c64xx/clock.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/include/mach/pll.h | 45 |
2 files changed, 3 insertions, 47 deletions
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index 8cf39e33579..4adc51ceb51 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -25,13 +25,13 @@ | |||
25 | 25 | ||
26 | #include <mach/regs-sys.h> | 26 | #include <mach/regs-sys.h> |
27 | #include <mach/regs-clock.h> | 27 | #include <mach/regs-clock.h> |
28 | #include <mach/pll.h> | ||
29 | 28 | ||
30 | #include <plat/cpu.h> | 29 | #include <plat/cpu.h> |
31 | #include <plat/devs.h> | 30 | #include <plat/devs.h> |
32 | #include <plat/cpu-freq.h> | 31 | #include <plat/cpu-freq.h> |
33 | #include <plat/clock.h> | 32 | #include <plat/clock.h> |
34 | #include <plat/clock-clksrc.h> | 33 | #include <plat/clock-clksrc.h> |
34 | #include <plat/pll.h> | ||
35 | 35 | ||
36 | /* fin_apll, fin_mpll and fin_epll are all the same clock, which we call | 36 | /* fin_apll, fin_mpll and fin_epll are all the same clock, which we call |
37 | * ext_xtal_mux for want of an actual name from the manual. | 37 | * ext_xtal_mux for want of an actual name from the manual. |
@@ -735,7 +735,8 @@ void __init_or_cpufreq s3c6400_setup_clocks(void) | |||
735 | /* For now assume the mux always selects the crystal */ | 735 | /* For now assume the mux always selects the crystal */ |
736 | clk_ext_xtal_mux.parent = xtal_clk; | 736 | clk_ext_xtal_mux.parent = xtal_clk; |
737 | 737 | ||
738 | epll = s3c6400_get_epll(xtal); | 738 | epll = s3c_get_pll6553x(xtal, __raw_readl(S3C_EPLL_CON0), |
739 | __raw_readl(S3C_EPLL_CON1)); | ||
739 | mpll = s3c6400_get_pll(xtal, __raw_readl(S3C_MPLL_CON)); | 740 | mpll = s3c6400_get_pll(xtal, __raw_readl(S3C_MPLL_CON)); |
740 | apll = s3c6400_get_pll(xtal, __raw_readl(S3C_APLL_CON)); | 741 | apll = s3c6400_get_pll(xtal, __raw_readl(S3C_APLL_CON)); |
741 | 742 | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/pll.h b/arch/arm/mach-s3c64xx/include/mach/pll.h deleted file mode 100644 index 5ef0bb698ee..00000000000 --- a/arch/arm/mach-s3c64xx/include/mach/pll.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | /* arch/arm/plat-s3c64xx/include/plat/pll.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX PLL code | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C6400_PLL_MDIV_MASK ((1 << (25-16+1)) - 1) | ||
16 | #define S3C6400_PLL_PDIV_MASK ((1 << (13-8+1)) - 1) | ||
17 | #define S3C6400_PLL_SDIV_MASK ((1 << (2-0+1)) - 1) | ||
18 | #define S3C6400_PLL_MDIV_SHIFT (16) | ||
19 | #define S3C6400_PLL_PDIV_SHIFT (8) | ||
20 | #define S3C6400_PLL_SDIV_SHIFT (0) | ||
21 | |||
22 | #include <asm/div64.h> | ||
23 | #include <plat/pll6553x.h> | ||
24 | |||
25 | static inline unsigned long s3c6400_get_pll(unsigned long baseclk, | ||
26 | u32 pllcon) | ||
27 | { | ||
28 | u32 mdiv, pdiv, sdiv; | ||
29 | u64 fvco = baseclk; | ||
30 | |||
31 | mdiv = (pllcon >> S3C6400_PLL_MDIV_SHIFT) & S3C6400_PLL_MDIV_MASK; | ||
32 | pdiv = (pllcon >> S3C6400_PLL_PDIV_SHIFT) & S3C6400_PLL_PDIV_MASK; | ||
33 | sdiv = (pllcon >> S3C6400_PLL_SDIV_SHIFT) & S3C6400_PLL_SDIV_MASK; | ||
34 | |||
35 | fvco *= mdiv; | ||
36 | do_div(fvco, (pdiv << sdiv)); | ||
37 | |||
38 | return (unsigned long)fvco; | ||
39 | } | ||
40 | |||
41 | static inline unsigned long s3c6400_get_epll(unsigned long baseclk) | ||
42 | { | ||
43 | return s3c_get_pll6553x(baseclk, __raw_readl(S3C_EPLL_CON0), | ||
44 | __raw_readl(S3C_EPLL_CON1)); | ||
45 | } | ||