diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-10-21 09:06:38 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-12-15 16:46:08 -0500 |
commit | e425382ed90d221ef9031a1b2d97d9bfedcf90c3 (patch) | |
tree | ca36882dba4caf8a9726ed67216251360c80ef59 /arch/arm/plat-s3c24xx/clock.c | |
parent | c3391e36d697c997b6afeb045071e0be95219a3e (diff) |
[ARM] S3C24XX: Update clock data on resume
Update the clock settings on resume for suspend/resume
support so that if the boot loader changes anything or
the system's PLL is reset then we return with the correct
settings.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c24xx/clock.c')
-rw-r--r-- | arch/arm/plat-s3c24xx/clock.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/arm/plat-s3c24xx/clock.c b/arch/arm/plat-s3c24xx/clock.c index 334e696200be..a4a0a67a3074 100644 --- a/arch/arm/plat-s3c24xx/clock.c +++ b/arch/arm/plat-s3c24xx/clock.c | |||
@@ -47,6 +47,8 @@ | |||
47 | #include <mach/regs-clock.h> | 47 | #include <mach/regs-clock.h> |
48 | #include <mach/regs-gpio.h> | 48 | #include <mach/regs-gpio.h> |
49 | 49 | ||
50 | #include <plat/cpu-freq.h> | ||
51 | |||
50 | #include <plat/clock.h> | 52 | #include <plat/clock.h> |
51 | #include <plat/cpu.h> | 53 | #include <plat/cpu.h> |
52 | #include <plat/pll.h> | 54 | #include <plat/pll.h> |
@@ -327,24 +329,24 @@ int s3c24xx_register_clocks(struct clk **clks, int nr_clks) | |||
327 | 329 | ||
328 | /* initalise all the clocks */ | 330 | /* initalise all the clocks */ |
329 | 331 | ||
330 | int __init s3c24xx_setup_clocks(unsigned long xtal, | 332 | void __init_or_cpufreq s3c24xx_setup_clocks(unsigned long fclk, |
331 | unsigned long fclk, | 333 | unsigned long hclk, |
332 | unsigned long hclk, | 334 | unsigned long pclk) |
333 | unsigned long pclk) | ||
334 | { | 335 | { |
335 | printk(KERN_INFO "S3C24XX Clocks, (c) 2004 Simtec Electronics\n"); | 336 | clk_upll.rate = s3c24xx_get_pll(__raw_readl(S3C2410_UPLLCON), |
336 | 337 | clk_xtal.rate); | |
337 | /* initialise the main system clocks */ | ||
338 | |||
339 | clk_xtal.rate = xtal; | ||
340 | clk_upll.rate = s3c24xx_get_pll(__raw_readl(S3C2410_UPLLCON), xtal); | ||
341 | 338 | ||
342 | clk_mpll.rate = fclk; | 339 | clk_mpll.rate = fclk; |
343 | clk_h.rate = hclk; | 340 | clk_h.rate = hclk; |
344 | clk_p.rate = pclk; | 341 | clk_p.rate = pclk; |
345 | clk_f.rate = fclk; | 342 | clk_f.rate = fclk; |
343 | } | ||
346 | 344 | ||
347 | /* assume uart clocks are correctly setup */ | 345 | int __init s3c24xx_register_baseclocks(unsigned long xtal) |
346 | { | ||
347 | printk(KERN_INFO "S3C24XX Clocks, (c) 2004 Simtec Electronics\n"); | ||
348 | |||
349 | clk_xtal.rate = xtal; | ||
348 | 350 | ||
349 | /* register our clocks */ | 351 | /* register our clocks */ |
350 | 352 | ||
@@ -368,3 +370,4 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, | |||
368 | 370 | ||
369 | return 0; | 371 | return 0; |
370 | } | 372 | } |
373 | |||