summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/include/mach/powergate.h
diff options
context:
space:
mode:
authorKaran Jhavar <kjhavar@nvidia.com>2011-05-16 17:00:43 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2012-03-22 23:28:00 -0700
commitef2d9d41b4254d13802f9fce8ce10b12640bd0a8 (patch)
tree485e9474b8def07f80cc44d3e84b96002fb6526d /arch/arm/mach-tegra/include/mach/powergate.h
parent42dfb57c2b9cd6bf6d8284e3da184e20ff1d21a9 (diff)
ARM: tegra: power: Refactored kernel powergate code
This change provides a centralized location for powergating modules. It would take care of switching on/off clocks while un-powergating/ powergating modules respectively. Bug: 814267 Original-Change-Id: Ic80dc517f634c29085c8e089bdaa32c6fd742710 Reviewed-on: http://git-master/r/31776 Reviewed-by: Niket Sirsi <nsirsi@nvidia.com> Tested-by: Niket Sirsi <nsirsi@nvidia.com> Rebase-Id: Re0c233ed4bacc27feb7b210cddc6ff3e487c528f
Diffstat (limited to 'arch/arm/mach-tegra/include/mach/powergate.h')
-rw-r--r--arch/arm/mach-tegra/include/mach/powergate.h37
1 files changed, 32 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/include/mach/powergate.h b/arch/arm/mach-tegra/include/mach/powergate.h
index a16cc9edd184..53b0f92b538c 100644
--- a/arch/arm/mach-tegra/include/mach/powergate.h
+++ b/arch/arm/mach-tegra/include/mach/powergate.h
@@ -47,12 +47,39 @@
struct clk;
-int tegra_powergate_power_on(int id);
-int tegra_powergate_power_off(int id);
int tegra_powergate_remove_clamping(int id);
-const char* tegra_powergate_get_name(int id);
+const char *tegra_powergate_get_name(int id);
-/* Must be called with clk disabled, and returns with clk enabled */
-int tegra_powergate_sequence_power_up(int id, struct clk *clk);
+/*
+ * Functions to powergate/un-powergate partitions.
+ * Handle clk management in the API's.
+ *
+ * tegra_powergate_partition_with_clk_off() can be called with
+ * clks ON. It disables all required clks.
+ *
+ * tegra_unpowergate_partition_with_clk_on() can be called with
+ * all required clks OFF. Returns with all clks ON.
+ *
+ * Warning: In general drivers should take care of the module
+ * clks and use tegra_powergate_partition() &
+ * tegra_unpowergate_partition() API's.
+ */
+int tegra_powergate_partition_with_clk_off(int id);
+int tegra_unpowergate_partition_with_clk_on(int id);
+
+/*
+ * Functions to powergate un-powergate partitions.
+ * Drivers are responsible for clk enable-disable
+ *
+ * tegra_powergate_partition() should be called with all
+ * required clks OFF. Drivers should disable clks BEFORE
+ * calling this fucntion
+ *
+ * tegra_unpowergate_partition should be called with all
+ * required clks OFF. Returns with all clks OFF. Drivers
+ * should enable all clks AFTER this function
+ */
+int tegra_powergate_partition(int id);
+int tegra_unpowergate_partition(int id);
#endif /* _MACH_TEGRA_POWERGATE_H_ */