ARM: tegra: clock: Add shared bus clock type
Some clocks may have multiple downstream users that need to request a
higher clock rate. Shared bus clocks provide a unique shared_bus_user
clock to each user. The frequency of the bus is set to the highest
enabled shared_bus_user clock, with a minimum value set by the
shared bus. Drivers can use clk_enable and clk_disable to enable
or disable their requirement, and clk_set_rate to set the minimum rate.
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Colin Cross <ccross@android.com>
diff --git a/arch/arm/mach-tegra/clock.h b/arch/arm/mach-tegra/clock.h
index a63dbf9..bb755c2 100644
--- a/arch/arm/mach-tegra/clock.h
+++ b/arch/arm/mach-tegra/clock.h
@@ -85,6 +85,7 @@
struct clk_ops *ops;
unsigned long rate;
unsigned long max_rate;
+ unsigned long min_rate;
u32 flags;
const char *name;
@@ -98,6 +99,8 @@
u32 reg;
u32 reg_shift;
+ struct list_head shared_bus_list;
+
union {
struct {
unsigned int clk_num;
@@ -120,6 +123,11 @@
struct clk *main;
struct clk *backup;
} cpu;
+ struct {
+ struct list_head node;
+ bool enabled;
+ unsigned long rate;
+ } shared_bus_user;
} u;
spinlock_t spinlock;