]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/clock.c
[PATCH] ARM: OMAP: Hang while entering userspace
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / clock.c
index 3d88de5e8fa7f0c47d85e24747d0058dc4872705..1cbd1e1e888d919bc5b982a8f86269eb8e0ba471 100644 (file)
@@ -4,6 +4,9 @@
  *  Copyright (C) 2004 - 2005 Nokia corporation
  *  Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
  *
+ *  Modified to use omap shared clock framework by
+ *  Tony Lindgren <tony@atomide.com>
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -547,27 +550,22 @@ static int omap1_clk_set_rate(struct clk *clk, unsigned long rate)
        int  ret = -EINVAL;
        int  dsor_exp;
        __u16  regval;
-       unsigned long  flags;
 
-       if(clk->set_rate != 0) {
-               spin_lock_irqsave(&clockfw_lock, flags);
+       if (clk->set_rate)
                ret = clk->set_rate(clk, rate);
-               spin_unlock_irqrestore(&clockfw_lock, flags);
-       } else if (clk->flags & RATE_CKCTL) {
+       else if (clk->flags & RATE_CKCTL) {
                dsor_exp = calc_dsor_exp(clk, rate);
                if (dsor_exp > 3)
                        dsor_exp = -EINVAL;
                if (dsor_exp < 0)
                        return dsor_exp;
 
-               spin_lock_irqsave(&clockfw_lock, flags);
                regval = omap_readw(ARM_CKCTL);
                regval &= ~(3 << clk->rate_offset);
                regval |= dsor_exp << clk->rate_offset;
                regval = verify_ckctl_value(regval);
                omap_writew(regval, ARM_CKCTL);
                clk->rate = clk->parent->rate / (1 << dsor_exp);
-               spin_unlock_irqrestore(&clockfw_lock, flags);
                ret = 0;
        }