diff options
author | Sekhar Nori <nsekhar@ti.com> | 2010-07-20 07:16:49 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-09-24 10:40:24 -0400 |
commit | b39639b820ca64e55c39b5217773919ca7973cec (patch) | |
tree | 53b2eba184359e1aa748e40891b3fd4149228697 /arch/arm/mach-davinci/clock.h | |
parent | 0a477f6b8c1849701981f6e00e7afcd35af75546 (diff) |
davinci: clock: add support for setting sysclk rate
Setting sysclk rate will be useful in cases where the
sysclk is not at a fixed ratio to the PLL output but
can asynchronously be changed.
This support forms the basis of attempt to keep the AEMIF
clock constant on OMAP-L138 even as PLL0 output changes
as ARM clock is changed to save power.
This patch has been tested on OMAP-L138.
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/clock.h')
-rw-r--r-- | arch/arm/mach-davinci/clock.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/clock.h b/arch/arm/mach-davinci/clock.h index 01e36483ac3d..11099980b58b 100644 --- a/arch/arm/mach-davinci/clock.h +++ b/arch/arm/mach-davinci/clock.h | |||
@@ -70,6 +70,9 @@ | |||
70 | #include <linux/list.h> | 70 | #include <linux/list.h> |
71 | #include <asm/clkdev.h> | 71 | #include <asm/clkdev.h> |
72 | 72 | ||
73 | #define PLLSTAT_GOSTAT BIT(0) | ||
74 | #define PLLCMD_GOSET BIT(0) | ||
75 | |||
73 | struct pll_data { | 76 | struct pll_data { |
74 | u32 phys_base; | 77 | u32 phys_base; |
75 | void __iomem *base; | 78 | void __iomem *base; |
@@ -86,6 +89,7 @@ struct clk { | |||
86 | struct module *owner; | 89 | struct module *owner; |
87 | const char *name; | 90 | const char *name; |
88 | unsigned long rate; | 91 | unsigned long rate; |
92 | unsigned long maxrate; /* H/W supported max rate */ | ||
89 | u8 usecount; | 93 | u8 usecount; |
90 | u8 lpsc; | 94 | u8 lpsc; |
91 | u8 gpsc; | 95 | u8 gpsc; |
@@ -118,6 +122,7 @@ struct clk { | |||
118 | int davinci_clk_init(struct clk_lookup *clocks); | 122 | int davinci_clk_init(struct clk_lookup *clocks); |
119 | int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv, | 123 | int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv, |
120 | unsigned int mult, unsigned int postdiv); | 124 | unsigned int mult, unsigned int postdiv); |
125 | int davinci_set_sysclk_rate(struct clk *clk, unsigned long rate); | ||
121 | 126 | ||
122 | extern struct platform_device davinci_wdt_device; | 127 | extern struct platform_device davinci_wdt_device; |
123 | extern void davinci_watchdog_reset(struct platform_device *); | 128 | extern void davinci_watchdog_reset(struct platform_device *); |