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/mach-s3c2410 | |
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/mach-s3c2410')
-rw-r--r-- | arch/arm/mach-s3c2410/s3c2410.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index 4e23bc05f4b5..feb141b1f915 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/clk.h> | ||
19 | #include <linux/sysdev.h> | 20 | #include <linux/sysdev.h> |
20 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
@@ -28,6 +29,8 @@ | |||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
30 | 31 | ||
32 | #include <plat/cpu-freq.h> | ||
33 | |||
31 | #include <mach/regs-clock.h> | 34 | #include <mach/regs-clock.h> |
32 | #include <plat/regs-serial.h> | 35 | #include <plat/regs-serial.h> |
33 | 36 | ||
@@ -65,13 +68,19 @@ void __init s3c2410_map_io(void) | |||
65 | iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc)); | 68 | iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc)); |
66 | } | 69 | } |
67 | 70 | ||
68 | void __init s3c2410_init_clocks(int xtal) | 71 | void __init_or_cpufreq s3c2410_setup_clocks(void) |
69 | { | 72 | { |
73 | struct clk *xtal_clk; | ||
70 | unsigned long tmp; | 74 | unsigned long tmp; |
75 | unsigned long xtal; | ||
71 | unsigned long fclk; | 76 | unsigned long fclk; |
72 | unsigned long hclk; | 77 | unsigned long hclk; |
73 | unsigned long pclk; | 78 | unsigned long pclk; |
74 | 79 | ||
80 | xtal_clk = clk_get(NULL, "xtal"); | ||
81 | xtal = clk_get_rate(xtal_clk); | ||
82 | clk_put(xtal_clk); | ||
83 | |||
75 | /* now we've got our machine bits initialised, work out what | 84 | /* now we've got our machine bits initialised, work out what |
76 | * clocks we've got */ | 85 | * clocks we've got */ |
77 | 86 | ||
@@ -93,7 +102,13 @@ void __init s3c2410_init_clocks(int xtal) | |||
93 | * console to use them | 102 | * console to use them |
94 | */ | 103 | */ |
95 | 104 | ||
96 | s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); | 105 | s3c24xx_setup_clocks(fclk, hclk, pclk); |
106 | } | ||
107 | |||
108 | void __init s3c2410_init_clocks(int xtal) | ||
109 | { | ||
110 | s3c24xx_register_baseclocks(xtal); | ||
111 | s3c2410_setup_clocks(); | ||
97 | s3c2410_baseclk_add(); | 112 | s3c2410_baseclk_add(); |
98 | } | 113 | } |
99 | 114 | ||