1. 03 Mar, 2009 1 commit
    • Russell King's avatar
      [ARM] omap: clk_set_parent: deny changing parent if clock is enabled · 4da37821
      Russell King authored
      Richard Woodruff writes:
      | The historic usage of this has been against single use leaf clocks
      | (1st instance of gptimer).  When it was used it did:
      |       clk_get()
      |       clk_set_parent()
      |       clk_enable()
      |
      | This usage was ok for that. Use on a disabled clock is needed.
      |
      | If there are multiple users on the clock or it is enabled there are
      | problems.
      |
      | The call can still be unfriendly if 2 different drivers are using the
      | clock with their own clock get/enable. It might be the function should
      | return an error if usecount != 0 to stop surprises.  It is all around
      | better if the parenting is done when the clock is off.
      
      This is a good reason to ensure that the clock is not enabled when
      clk_set_parent() is called.
      Acked-by: default avatarRichard Woodruff <r-woodruff2@ti.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      4da37821
  2. 23 Feb, 2009 3 commits
  3. 19 Feb, 2009 1 commit
    • Russell King's avatar
      [ARM] omap: add support for bypassing DPLLs · c0bf3132
      Russell King authored
      This roughly corresponds with OMAP commits: 7d06c48, 3241b19,
      88b5d9b, 18a5500, 9c909ac, 5c6497b, 8b1f0bd, 2ac1da8.
      
      For both OMAP2 and OMAP3, we note the reference and bypass clocks in
      the DPLL data structure.  Whenever we modify the DPLL rate, we first
      ensure that both the reference and bypass clocks are enabled.  Then,
      we decide whether to use the reference and DPLL, or the bypass clock
      if the desired rate is identical to the bypass rate, and program the
      DPLL appropriately.  Finally, we update the clock's parent, and then
      disable the unused clocks.
      
      This keeps the parents correctly balanced, and more importantly ensures
      that the bypass clock is running whenever we reprogram the DPLL.  This
      is especially important because the procedure for reprogramming the DPLL
      involves switching to the bypass clock.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      c0bf3132
  4. 14 Feb, 2009 1 commit
    • Russell King's avatar
      [ARM] omap: arrange for clock recalc methods to return the rate · 8b9dbc16
      Russell King authored
      linux-omap source commit 33d000c99ee393fe2042f93e8422f94976d276ce
      introduces a way to "dry run" clock changes before they're committed.
      However, this involves putting logic to handle this into each and
      every recalc function, and unfortunately due to the caching, led to
      some bugs.
      
      Solve both of issues by making the recalc methods always return the
      clock rate for the clock, which the caller decides what to do with.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      8b9dbc16
  5. 08 Feb, 2009 34 commits