aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/clock.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-davinci/clock.h')
-rw-r--r--arch/arm/mach-davinci/clock.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/arm/mach-davinci/clock.h b/arch/arm/mach-davinci/clock.h
index 27233cb4a2fb..c92d77a3008d 100644
--- a/arch/arm/mach-davinci/clock.h
+++ b/arch/arm/mach-davinci/clock.h
@@ -22,6 +22,10 @@
22/* PLL/Reset register offsets */ 22/* PLL/Reset register offsets */
23#define PLLCTL 0x100 23#define PLLCTL 0x100
24#define PLLCTL_PLLEN BIT(0) 24#define PLLCTL_PLLEN BIT(0)
25#define PLLCTL_PLLPWRDN BIT(1)
26#define PLLCTL_PLLRST BIT(3)
27#define PLLCTL_PLLDIS BIT(4)
28#define PLLCTL_PLLENSRC BIT(5)
25#define PLLCTL_CLKMODE BIT(8) 29#define PLLCTL_CLKMODE BIT(8)
26 30
27#define PLLM 0x110 31#define PLLM 0x110
@@ -65,15 +69,20 @@ struct clk {
65 const char *name; 69 const char *name;
66 unsigned long rate; 70 unsigned long rate;
67 u8 usecount; 71 u8 usecount;
68 u8 flags;
69 u8 lpsc; 72 u8 lpsc;
70 u8 psc_ctlr; 73 u8 gpsc;
74 u32 flags;
71 struct clk *parent; 75 struct clk *parent;
76 struct list_head children; /* list of children */
77 struct list_head childnode; /* parent's child list node */
72 struct pll_data *pll_data; 78 struct pll_data *pll_data;
73 u32 div_reg; 79 u32 div_reg;
80 unsigned long (*recalc) (struct clk *);
81 int (*set_rate) (struct clk *clk, unsigned long rate);
82 int (*round_rate) (struct clk *clk, unsigned long rate);
74}; 83};
75 84
76/* Clock flags */ 85/* Clock flags: SoC-specific flags start at BIT(16) */
77#define ALWAYS_ENABLED BIT(1) 86#define ALWAYS_ENABLED BIT(1)
78#define CLK_PSC BIT(2) 87#define CLK_PSC BIT(2)
79#define PSC_DSP BIT(3) /* PSC uses DSP domain, not ARM */ 88#define PSC_DSP BIT(3) /* PSC uses DSP domain, not ARM */
@@ -94,6 +103,8 @@ struct davinci_clk {
94 } 103 }
95 104
96int davinci_clk_init(struct davinci_clk *clocks); 105int davinci_clk_init(struct davinci_clk *clocks);
106int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv,
107 unsigned int mult, unsigned int postdiv);
97 108
98extern struct platform_device davinci_wdt_device; 109extern struct platform_device davinci_wdt_device;
99 110