diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2012-01-30 12:35:39 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-02-03 05:18:41 -0800 |
commit | 13cc1a5d0c7e3f71eb36228f659a0c7cbe4b83f5 (patch) | |
tree | 46f479ab49d502b16ee104d79aa6a6a7680bb168 /arch/arm/mach-tegra/clock.c | |
parent | 3efb99cdbb351f014b7d521ede3a8988138ef231 (diff) |
ARM: tegra: clock: Expand PLL usage restriction mechanism
Expand PLL usage restriction mechanism from Tegra3 only to common
tegra clock framework implementation: fail set parent API if new
parent is not allowed per usage policy.
Actual usage policy is architecture dependent and exists now only
on Tegra3.
Reviewed-on: http://git-master/r/77251
Change-Id: I2a8d60cc0ddfd2179961ef50418b193f2e1829c8
Signed-off-by: Alex Frid <afrid@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/78029
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'arch/arm/mach-tegra/clock.c')
-rw-r--r-- | arch/arm/mach-tegra/clock.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c index 0e650d7c85f9..f31da0bf1494 100644 --- a/arch/arm/mach-tegra/clock.c +++ b/arch/arm/mach-tegra/clock.c @@ -345,6 +345,11 @@ int clk_set_parent_locked(struct clk *c, struct clk *parent) goto out; } + if (!tegra_clk_is_parent_allowed(c, parent)) { + ret = -EINVAL; + goto out; + } + new_rate = clk_predict_rate_from_parent(c, parent); old_rate = clk_get_rate_locked(c); |