summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/dvfs.h
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2012-05-26 20:12:01 -0700
committerSimone Willett <swillett@nvidia.com>2012-06-07 12:56:02 -0700
commitcc87e66730f603e339476619818d7b30906a172a (patch)
tree5211271034a156c5a4c53eee27f8f743ab59afc0 /arch/arm/mach-tegra/dvfs.h
parent25c3334f0e1ea6bde84c0514bad0eb1859566dba (diff)
ARM: tegra: dvfs: Re-factor CPU alternative dvfs
Removed alternative frequencies table from dvfs structure, and replaced it with table pointer to facilitate future support for multiple alternative tables. Actually supported alternative dvfs table (Tegra3 CPU cold zone table) is not changed. Change-Id: Ia8c1d1f2dd450f0e48685e769ca925b8e6f5b57b Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/104882 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/dvfs.h')
-rw-r--r--arch/arm/mach-tegra/dvfs.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/arm/mach-tegra/dvfs.h b/arch/arm/mach-tegra/dvfs.h
index a53a04ba95a2..f0de99146972 100644
--- a/arch/arm/mach-tegra/dvfs.h
+++ b/arch/arm/mach-tegra/dvfs.h
@@ -73,12 +73,6 @@ struct dvfs_rail {
struct rail_stats stats;
};
-enum dvfs_alt_freqs {
- ALT_FREQS_NOT_SUPPORTED = 0,
- ALT_FREQS_DISABLED,
- ALT_FREQS_ENABLED,
-};
-
struct dvfs {
/* Used only by tegra2_clock.c */
const char *clk_name;
@@ -88,11 +82,10 @@ struct dvfs {
/* Must be initialized before tegra_dvfs_init */
int freqs_mult;
unsigned long freqs[MAX_DVFS_FREQS];
- unsigned long alt_freqs[MAX_DVFS_FREQS];
+ unsigned long *alt_freqs;
const int *millivolts;
struct dvfs_rail *dvfs_rail;
bool auto_dvfs;
- enum dvfs_alt_freqs alt_freqs_state;
/* Filled in by tegra_dvfs_init */
int max_millivolts;
@@ -124,7 +117,7 @@ struct dvfs_rail *tegra_dvfs_get_rail_by_name(const char *reg_id);
int tegra_dvfs_predict_millivolts(struct clk *c, unsigned long rate);
void tegra_dvfs_core_cap_enable(bool enable);
void tegra_dvfs_core_cap_level_set(int level);
-int tegra_dvfs_alt_freqs_set(struct dvfs *d, bool enable);
+int tegra_dvfs_alt_freqs_set(struct dvfs *d, unsigned long *alt_freqs);
void tegra_cpu_dvfs_alter(int edp_thermal_index, bool before_clk_update);
#else
static inline void tegra_soc_init_dvfs(void)
@@ -160,7 +153,8 @@ static inline void tegra_dvfs_core_cap_enable(bool enable)
{}
static inline void tegra_dvfs_core_cap_level_set(int level)
{}
-static inline int tegra_dvfs_alt_freqs_set(struct dvfs *d, bool enable)
+static inline int tegra_dvfs_alt_freqs_set(struct dvfs *d,
+ unsigned long *alt_freqs)
{ return 0; }
static inline void tegra_cpu_dvfs_alter(int edp_thermal_index,
bool before_clk_update)