summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/clock.h
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2010-10-13 19:16:27 -0700
committerColin Cross <ccross@android.com>2010-10-25 14:57:40 -0700
commit4fb700a34f482ca050cb3c7751e7d6b1b40646db (patch)
tree59b88d000057bb02aa6a087b2c622ce8e5e701d5 /arch/arm/mach-tegra/clock.h
parentbc77f9721e8cf0d0533e8709707f839601f090f4 (diff)
[ARM] tegra: clock: Move unshared clk struct members into union
Change-Id: I4e03194d4a86c73eea4773fbdcaf773e06b6eebf Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch/arm/mach-tegra/clock.h')
-rw-r--r--arch/arm/mach-tegra/clock.h97
1 files changed, 50 insertions, 47 deletions
diff --git a/arch/arm/mach-tegra/clock.h b/arch/arm/mach-tegra/clock.h
index ea907886ebb9..419cf2248652 100644
--- a/arch/arm/mach-tegra/clock.h
+++ b/arch/arm/mach-tegra/clock.h
@@ -47,7 +47,7 @@ struct clk_mux_sel {
u32 value;
};
-struct clk_pll_table {
+struct clk_pll_freq_table {
unsigned long input_rate;
unsigned long output_rate;
u16 n;
@@ -74,57 +74,60 @@ enum clk_state {
struct clk {
/* node for master clocks list */
- struct list_head node;
- struct list_head children; /* list of children */
- struct list_head sibling; /* node for children */
-#ifdef CONFIG_DEBUG_FS
- struct dentry *dent;
- struct dentry *parent_dent;
-#endif
- struct clk_ops *ops;
- struct clk *parent;
- struct clk_lookup lookup;
- unsigned long dvfs_rate;
- unsigned long rate;
- unsigned long requested_rate;
- unsigned long max_rate;
- bool is_dvfs;
- bool auto_dvfs;
- u32 flags;
- u32 refcnt;
- const char *name;
- u32 reg;
- u32 reg_shift;
- unsigned int clk_num;
- enum clk_state state;
+ struct list_head node; /* node for list of all clocks */
+ struct list_head children; /* list of children */
+ struct list_head sibling; /* node for children */
+ struct list_head dvfs; /* list of dvfs dependencies */
+ struct clk_lookup lookup;
+
#ifdef CONFIG_DEBUG_FS
- bool set;
+ struct dentry *dent;
+ struct dentry *parent_dent;
+ bool set;
#endif
+ struct clk_ops *ops;
+ unsigned long dvfs_rate;
+ unsigned long rate;
+ unsigned long max_rate;
+ bool is_dvfs;
+ bool auto_dvfs;
+ u32 flags;
+ const char *name;
+
+ u32 refcnt;
+ unsigned long requested_rate;
+ enum clk_state state;
+ struct clk *parent;
+ u32 div;
+ u32 mul;
- /* PLL */
- unsigned long input_min;
- unsigned long input_max;
- unsigned long cf_min;
- unsigned long cf_max;
- unsigned long vco_min;
- unsigned long vco_max;
- const struct clk_pll_table *pll_table;
- int pll_lock_delay;
-
- /* DIV */
- u32 div;
- u32 mul;
-
- /* MUX */
const struct clk_mux_sel *inputs;
- u32 sel;
- u32 reg_mask;
-
- /* Virtual cpu clock */
- struct clk *main;
- struct clk *backup;
+ u32 reg;
+ u32 reg_shift;
- struct list_head dvfs;
+ union {
+ struct {
+ unsigned int clk_num;
+ } periph;
+ struct {
+ unsigned long input_min;
+ unsigned long input_max;
+ unsigned long cf_min;
+ unsigned long cf_max;
+ unsigned long vco_min;
+ unsigned long vco_max;
+ const struct clk_pll_freq_table *freq_table;
+ int lock_delay;
+ } pll;
+ struct {
+ u32 sel;
+ u32 reg_mask;
+ } mux;
+ struct {
+ struct clk *main;
+ struct clk *backup;
+ } cpu;
+ } u;
};