aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2416
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-05 21:21:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-05 21:21:21 -0400
commitc861cd3e92d92ae946e19099f198018fcb4fd887 (patch)
treefab678a30a85cf80038c560221d6ab01812a3891 /arch/arm/mach-s3c2416
parent7abec10c623d9e0416dab6919a0ea22e6283516b (diff)
parentb8bc83971cc20cae3c3b65c26a804f350d74960c (diff)
Merge branch 'next/devel2' of git://git.linaro.org/people/arnd/arm-soc
* 'next/devel2' of git://git.linaro.org/people/arnd/arm-soc: (30 commits) ARM: mmp: register internal sram bank ARM: mmp: register audio sram bank ARM: mmp: add sram allocator gpio/samsung: Complain loudly if we don't know the SoC ARM: S3C64XX: Fix SoC identification for S3C64xx devices ARM: S3C2443: Remove redundant s3c_register_clocks call for init_clocks ARM: S3C24XX: Add devname for hsmmc1 pclk ARM: S3C24XX: use clk_get_rate to init fclk in common_setup_clocks ARM: S3C2443: Accommodate cpufreq frequency scheme in armdiv ARM: S3C2443: handle unset armdiv values gracefully ARM: S3C2443: Add get_rate operation for clk_armdiv ARM: S3C2416: Add comment describing the armdiv/armclk ARM: S3C2443: Move clk_arm and clk_armdiv to common code ARM: S3C24XX: Add infrastructure to transmit armdiv to common code ARM: S3C2416: Add armdiv_mask constant ARM: EXYNOS4: Add support for M-5MOLS camera on Nuri board ARM: EXYNOS4: Enable MFC on ORIGEN ARM: SAMSUNG: Add support s3c2416-adc for S3C2416/S3C2450 ARM: SAMSUNG: Add support s3c2443-adc for S3C2443 ARM: SAMSUNG: Allow overriding of adc device name for S3C24XX ...
Diffstat (limited to 'arch/arm/mach-s3c2416')
-rw-r--r--arch/arm/mach-s3c2416/clock.c21
-rw-r--r--arch/arm/mach-s3c2416/s3c2416.c3
2 files changed, 15 insertions, 9 deletions
diff --git a/arch/arm/mach-s3c2416/clock.c b/arch/arm/mach-s3c2416/clock.c
index 72b7c6274c79..afbbe8bc21d1 100644
--- a/arch/arm/mach-s3c2416/clock.c
+++ b/arch/arm/mach-s3c2416/clock.c
@@ -28,6 +28,14 @@
28#include <mach/regs-clock.h> 28#include <mach/regs-clock.h>
29#include <mach/regs-s3c2443-clock.h> 29#include <mach/regs-s3c2443-clock.h>
30 30
31/* armdiv
32 *
33 * this clock is sourced from msysclk and can have a number of
34 * divider values applied to it to then be fed into armclk.
35 * The real clock definition is done in s3c2443-clock.c,
36 * only the armdiv divisor table must be defined here.
37*/
38
31static unsigned int armdiv[8] = { 39static unsigned int armdiv[8] = {
32 [0] = 1, 40 [0] = 1,
33 [1] = 2, 41 [1] = 2,
@@ -125,16 +133,9 @@ static struct clk hsmmc0_clk = {
125 .ctrlbit = S3C2416_HCLKCON_HSMMC0, 133 .ctrlbit = S3C2416_HCLKCON_HSMMC0,
126}; 134};
127 135
128static inline unsigned int s3c2416_fclk_div(unsigned long clkcon0)
129{
130 clkcon0 &= 7 << S3C2443_CLKDIV0_ARMDIV_SHIFT;
131
132 return armdiv[clkcon0 >> S3C2443_CLKDIV0_ARMDIV_SHIFT];
133}
134
135void __init_or_cpufreq s3c2416_setup_clocks(void) 136void __init_or_cpufreq s3c2416_setup_clocks(void)
136{ 137{
137 s3c2443_common_setup_clocks(s3c2416_get_pll, s3c2416_fclk_div); 138 s3c2443_common_setup_clocks(s3c2416_get_pll);
138} 139}
139 140
140 141
@@ -158,7 +159,9 @@ void __init s3c2416_init_clocks(int xtal)
158 159
159 clk_epll.parent = &clk_epllref.clk; 160 clk_epll.parent = &clk_epllref.clk;
160 161
161 s3c2443_common_init_clocks(xtal, s3c2416_get_pll, s3c2416_fclk_div); 162 s3c2443_common_init_clocks(xtal, s3c2416_get_pll,
163 armdiv, ARRAY_SIZE(armdiv),
164 S3C2416_CLKDIV0_ARMDIV_MASK);
162 165
163 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) 166 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
164 s3c_register_clksrc(clksrcs[ptr], 1); 167 s3c_register_clksrc(clksrcs[ptr], 1);
diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c
index 7dbee81c8908..ee214bc83c83 100644
--- a/arch/arm/mach-s3c2416/s3c2416.c
+++ b/arch/arm/mach-s3c2416/s3c2416.c
@@ -60,6 +60,7 @@
60#include <plat/iic-core.h> 60#include <plat/iic-core.h>
61#include <plat/fb-core.h> 61#include <plat/fb-core.h>
62#include <plat/nand-core.h> 62#include <plat/nand-core.h>
63#include <plat/adc-core.h>
63 64
64static struct map_desc s3c2416_iodesc[] __initdata = { 65static struct map_desc s3c2416_iodesc[] __initdata = {
65 IODESC_ENT(WATCHDOG), 66 IODESC_ENT(WATCHDOG),
@@ -97,6 +98,8 @@ int __init s3c2416_init(void)
97 98
98 s3c_fb_setname("s3c2443-fb"); 99 s3c_fb_setname("s3c2443-fb");
99 100
101 s3c_adc_setname("s3c2416-adc");
102
100#ifdef CONFIG_PM 103#ifdef CONFIG_PM
101 register_syscore_ops(&s3c2416_pm_syscore_ops); 104 register_syscore_ops(&s3c2416_pm_syscore_ops);
102#endif 105#endif