summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2011-08-25 14:30:52 +0300
committerVarun Colbert <vcolbert@nvidia.com>2011-09-01 21:09:59 -0700
commitc5a6bce1959c8f2aff90b197624f4584356638e8 (patch)
tree1e0d01d5b6ae40b646495e6bd7ffa4abe00aa4cc
parentf15635d60e6b00ebf8d57f03c6a4c8cbd69ff60b (diff)
nvhost: power: Remove minimum clock rate
As each client has its own instance of all shared clocks, minimum clock rates can be removed from nvhost and be delegated to clock subsystem. Bug 868554 Change-Id: Iaa59c8a7f9bd6e992280895acf800594bc3b4508 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/49611 Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
-rw-r--r--drivers/video/tegra/host/nvhost_acm.c13
-rw-r--r--drivers/video/tegra/host/nvhost_acm.h1
2 files changed, 3 insertions, 11 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c
index cb55055a47bd..b7a06f380d27 100644
--- a/drivers/video/tegra/host/nvhost_acm.c
+++ b/drivers/video/tegra/host/nvhost_acm.c
@@ -36,7 +36,6 @@
#define ACM_POWERDOWN_HANDLER_DELAY_MSEC 25
#define ACM_SUSPEND_WAIT_FOR_IDLE_TIMEOUT (2 * HZ)
#define POWERGATE_DELAY 10
-
#define HOST_EMC_FLOOR 300000000
#define MAX_DEVID_LENGTH 16
@@ -386,10 +385,8 @@ static const char *get_module_clk_id_tegra2(const char *module, int index,
name = "emc";
}
- if (name) {
+ if (name)
info->default_rate = UINT_MAX;
- info->min_rate = UINT_MAX;
- }
return name;
}
@@ -416,10 +413,9 @@ static const char *get_module_clk_id_tegra3(const char *module, int index,
}
if (name) {
- if (strcmp(name, "emc") == 0) {
+ if (strcmp(name, "emc") == 0)
info->default_rate = HOST_EMC_FLOOR;
- info->min_rate = info->default_rate;
- } else if (strcmp(name, "gr2d") == 0)
+ else if (strcmp(name, "gr2d") == 0)
info->default_rate = 0;
else
info->default_rate = UINT_MAX;
@@ -435,7 +431,6 @@ static const char *get_module_clk(const char *module,
{
const char *clk_id = NULL;
char devname[MAX_DEVID_LENGTH];
- info->min_rate = 0;
switch (tegra_get_chipid()) {
case TEGRA_CHIPID_TEGRA2:
@@ -460,7 +455,6 @@ static const char *get_module_clk(const char *module,
}
info->default_rate = clk_round_rate(info->clk, info->default_rate);
- info->min_rate = clk_round_rate(info->clk, info->min_rate);
if (info->default_rate < 0) {
pr_err("%s: can't get maximum rate for %s\n",
__func__, clk_id);
@@ -521,7 +515,6 @@ int nvhost_module_set_rate(struct nvhost_module *mod, void *priv,
list_for_each_entry(m, &mod->client_list, node) {
if (m->priv == priv) {
rate = clk_round_rate(mod->clk[index].clk, rate);
- rate = max(mod->clk[index].min_rate, rate);
m->rate[index] = rate;
break;
}
diff --git a/drivers/video/tegra/host/nvhost_acm.h b/drivers/video/tegra/host/nvhost_acm.h
index 81f07acb2003..c726277ca00d 100644
--- a/drivers/video/tegra/host/nvhost_acm.h
+++ b/drivers/video/tegra/host/nvhost_acm.h
@@ -48,7 +48,6 @@ struct nvhost_module_client {
struct nvhost_module_clock_info {
struct clk *clk;
unsigned long default_rate;
- unsigned long min_rate;
};
struct nvhost_module {