summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/clock.c
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2011-10-01 16:00:51 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:09 -0800
commitaa7c1a90e996fa6c9f0baa353b715cdacb6aeef9 (patch)
tree7b34faa9bd4409fcc4320c4b46bade72d053373a /arch/arm/mach-tegra/clock.c
parent36dbc27d0dd8e6a44758ce1631a45fb0458421e8 (diff)
ARM: tegra: clock: Re-factor shared bus locking
Current code: - on tegra2 unnecessary covers with bus lock shared user state update - on tegra3 does not cover shared bus rate update at all Modified to cover with bus lock shared bus rate update only on both tegra2 and tegra3. Change-Id: Iaa2597136a521adf4285c61eb579c917c2c7965c Reviewed-on: http://git-master/r/55640 Tested-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com> Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: R1b28f32ae37d47c56855023b18c943bf8fd93c74
Diffstat (limited to 'arch/arm/mach-tegra/clock.c')
-rw-r--r--arch/arm/mach-tegra/clock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 155d22f1a637..4b14cbc765d3 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -648,10 +648,14 @@ EXPORT_SYMBOL(tegra_is_clk_enabled);
int tegra_clk_shared_bus_update(struct clk *c)
{
int ret = 0;
+ unsigned long flags;
+
+ clk_lock_save(c, &flags);
if (c->ops && c->ops->shared_bus_update)
ret = c->ops->shared_bus_update(c);
+ clk_unlock_restore(c, &flags);
return ret;
}