summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/clock.h
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2011-05-13 23:58:33 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:06 -0800
commit7359d83b54df8dc87e33833d5fedf76415ac8871 (patch)
treeae9e2d38a992c4c6a2edc099350d2c89df2865fb /arch/arm/mach-tegra/clock.h
parentcad4f00d69356e5610073298e833b40004b08fd1 (diff)
ARM: tegra: clock: Synchronize Tegra3 clocks scaling
On Tegra3 clocks of major h/w engines - 2D/EPP/3D/MPE/VDE/SE - are sourced from PLLC through integer dividers. Low resolution of these dividers does not allow to set scaling frequency levels matching intermediate voltage steps within core voltage range. Only changing the source frequency can achieve it. However, re-locking common PLL while engines are running requires synchronization of engines clock control, and complex operations including switching to backup sources during PLL stabilization time. This commit introduces a new virtual clock "cbus" to support clocks synchronization and PLLC re-locking procedures. The dvfs table for cbus clock is constructed from frequency steps close to maximum rates for each characterized core voltage level. Engine clocks exposed to the drivers are no longer physical module clocks, but shared cbus users. Setting the rate for such clock specifies the clock floor. The final cbus rate is determined as maximum floor setting for all enabled engines, and rounded up along the cbus dvfs ladder. Actual engine clock rate is set equal to the cbus clock rate. Hence, engines will be running close to maximum frequency for minimum voltage that satisfies all floor requests. Special case: Host1x. This clock will be always configured at 1/2 of cbus clock rate, and its shared user floor request is ignored by cbus target frequency calculations. Added cbus dvfs tables and updated VDE engine dvfs data. Original-Change-Id: Ic02ea08227f920dc4f47b2389c311a23cea472f6 Reviewed-on: http://git-master/r/36199 Reviewed-by: Niket Sirsi <nsirsi@nvidia.com> Tested-by: Niket Sirsi <nsirsi@nvidia.com> Rebase-Id: R1b7556f1cca12987e4f7c8c6342778da1cec1915
Diffstat (limited to 'arch/arm/mach-tegra/clock.h')
-rw-r--r--arch/arm/mach-tegra/clock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/clock.h b/arch/arm/mach-tegra/clock.h
index f33818caecbe..e7d93a5634a5 100644
--- a/arch/arm/mach-tegra/clock.h
+++ b/arch/arm/mach-tegra/clock.h
@@ -141,6 +141,7 @@ struct clk {
u32 reg_shift;
struct list_head shared_bus_list;
+ struct clk_mux_sel shared_bus_backup;
union {
struct {
@@ -177,6 +178,9 @@ struct clk {
struct list_head node;
bool enabled;
unsigned long rate;
+ const char *client_id;
+ struct clk *client;
+ u32 client_div;
} shared_bus_user;
} u;