summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2012-03-14 23:00:52 -0700
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-04-17 01:33:55 -0700
commitf7adaff03ba1bab6570736eed02145d39326a276 (patch)
treea21bb6d81579c2e74de6afcaf8b03079ff7e8e2f
parentf8bcc67d13d72deb7b506b4a1cad581f3caf45dd (diff)
ARM: tegra: clock: Apply shared bus ceiling always
Apply shared bus ceiling regardless of whether Tegra3 SHARED_CEILING user is enabled or disabled. Thus, we no longer need to enable ceiling user - and the bus itself via child-parent relations - to cap the bus rate. Bug 954896 Change-Id: I7f96f03f05fd39334c9ee977cd1ac18d86a1fc0d Signed-off-by: Alex Frid <afrid@nvidia.com> (cherry picked from commit 07b1a707aa14dcab37f095a3bb78af79a54c399b) Reviewed-on: http://git-master/r/95739 Reviewed-by: Daniel Solomon <daniels@nvidia.com> Tested-by: Daniel Solomon <daniels@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/tegra3_clocks.c10
-rw-r--r--arch/arm/mach-tegra/tegra3_dvfs.c14
2 files changed, 10 insertions, 14 deletions
diff --git a/arch/arm/mach-tegra/tegra3_clocks.c b/arch/arm/mach-tegra/tegra3_clocks.c
index 0bceeeb9469f..d5e101ec3502 100644
--- a/arch/arm/mach-tegra/tegra3_clocks.c
+++ b/arch/arm/mach-tegra/tegra3_clocks.c
@@ -3007,9 +3007,13 @@ static int tegra3_clk_shared_bus_update(struct clk *bus)
list_for_each_entry(c, &bus->shared_bus_list,
u.shared_bus_user.node) {
- /* Ignore requests from disabled users and from users with
- fixed bus-to-client ratio */
- if (c->u.shared_bus_user.enabled) {
+ /* Ignore requests from disabled floor and bw users, and from
+ * auto-users riding the bus. Always honor ceiling users, even
+ * if they are disabled - we do not want to keep enabled parent
+ * bus just because ceiling is set.
+ */
+ if (c->u.shared_bus_user.enabled ||
+ (c->u.shared_bus_user.mode == SHARED_CEILING)) {
switch (c->u.shared_bus_user.mode) {
case SHARED_BW:
bw += c->u.shared_bus_user.rate;
diff --git a/arch/arm/mach-tegra/tegra3_dvfs.c b/arch/arm/mach-tegra/tegra3_dvfs.c
index 48c4384b1aac..dcda3f3cae3b 100644
--- a/arch/arm/mach-tegra/tegra3_dvfs.c
+++ b/arch/arm/mach-tegra/tegra3_dvfs.c
@@ -783,19 +783,11 @@ static void core_cap_enable(bool enable)
{
int i;
- if (enable) {
+ if (enable)
tegra3_core_cap.refcnt++;
- if (tegra3_core_cap.refcnt == 1)
- for (i = 0; i < ARRAY_SIZE(core_cap_table); i++)
- if (core_cap_table[i].cap_clk)
- clk_enable(core_cap_table[i].cap_clk);
- } else if (tegra3_core_cap.refcnt) {
+ else if (tegra3_core_cap.refcnt)
tegra3_core_cap.refcnt--;
- if (tegra3_core_cap.refcnt == 0)
- for (i = ARRAY_SIZE(core_cap_table) - 1; i >= 0; i--)
- if (core_cap_table[i].cap_clk)
- clk_disable(core_cap_table[i].cap_clk);
- }
+
core_cap_update();
}