1. 08 3月, 2011 1 次提交
  2. 26 2月, 2011 2 次提交
    • P
      OMAP2+: clock: autoidle as many clocks as possible if CONFIG_OMAP_RESET_CLOCKS · b80b956d
      Paul Walmsley 提交于
      Attempt to enable autoidle for as many clocks as possible in the
      OMAP2+-common CONFIG_OMAP_RESET_CLOCKS code.  Currently, this only
      enables DPLL autoidle for OMAP3/4 DPLLs; but future patches will
      enable autoidle for other clocks and the OMAP2 DPLL/APLLs.
      
      In the long run, we should probably get rid of
      CONFIG_OMAP_RESET_CLOCKS, and unconditionally run the code that it
      selects.  Otherwise, the state of the clock tree won't match the
      hardware state - this could result in clocks being enabled or disabled
      unpredictably.
      
      Based on a patch by Rajendra Nayak <rnayak@ti.com> that did this in
      the pm34xx.c/pm44xx.c code.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      b80b956d
    • R
      OMAP: clock: Add allow_idle/deny_idle support in clkops · 58e846fe
      Rajendra Nayak 提交于
      On OMAP various clock nodes (dpll's, mx post dividers, interface clocks)
      support hardware level autogating which can be controlled from
      software.
      Support such functionality by adding two new function pointer
      allow_idle and deny_idle in the clkops structure.
      
      These function pointers can be populated for any clock
      node which supports hardware level autogating.
      
      Also add 2 new functions (omap_clk_enable_autoidle_all and
      omap_clk_disable_autoidle_all) which can be called from
      architecture specific PM core code, if hardware level
      autogating (for all supported clock nodes) is to be
      enabled or disabled.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: use spinlock rather than mutex due to race; renamed functions;
       functions now return ints]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      58e846fe
  3. 09 10月, 2010 1 次提交
    • P
      OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks · 6041c27f
      Paul Walmsley 提交于
      Reduce the amount of debugging generated by default when unused clocks
      are being disabled by the clock code.  The previous code would only
      generate debug-level messages, but some people who wished to run
      production kernels with debug-level messages enabled reported that the
      large number of clock disable messages were slowing boot.  Now to
      enable clock-by-clock disable messages, DEBUG needs to be defined in
      mach-omap2/clock.c.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tuukka Tikkanen <tuukka.tikkanen@nokia.com>
      Cc: Tim Bird <tim.bird@am.sony.com>
      6041c27f
  4. 21 5月, 2010 2 次提交
  5. 25 2月, 2010 3 次提交
    • S
      OMAP4: clock: Add dummy clock nodes for interface clocks · 7c43d547
      Santosh Shilimkar 提交于
      On OMAP4 platform the iclk control is completly under hardware control
      and no software control is available.
      
      This difference w.r.t previous OMAP's needs all the common driver
      accross OMAP's , cpu_is_xxxx() checks. To avoid poulluting the
      drivers dummy clock nodes are created (The autogeneration
      script has been updated accordingly).
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      [paul@pwsan.com: made OMAP1 dummy_ck common and edited patch to reuse that]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      7c43d547
    • P
      OMAP clock: add omap_clk_get_by_name() for use by OMAP hwmod core code · 74be8427
      Paul Walmsley 提交于
      The OMAP hwmod core code is intended to use SoC IP block description
      structures that are autogenerated from TI's OMAP hardware database.
      Currently the hwmod code uses clkdev device + connection addressing to
      identify clocks.  This causes problems in the hwmod autogeneration
      process, since the TI hardware database doesn't use platform_device or
      clkdev addressing; it uses a single clock signal name string, which
      tends to bear some resemblance to what is used in the OMAP TRMs.  This
      patch adds a non-exported function to the OMAP clock code,
      omap_clk_get_by_name().  A subsequent patch will convert the hwmod
      code to use this function.
      
      This function is for use only by core code, and practically, no other
      code outside the hwmod code should need it.  Device driver code in the
      kernel must not use this function, which is why it is not exported.
      Drivers should use the appropriate clock alias provided by the clkdev
      data structures, so driver code can be completely SoC-independent.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      74be8427
    • P
      OMAP clock: drop .id field; ensure each clock has a unique name · b92c170d
      Paul Walmsley 提交于
      After the clkdev conversion, the struct clk.id field became
      superfluous, so, drop it.  Bring the clock names closer to the TRMs
      and ensure they are unique for debugfs.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      b92c170d
  6. 04 2月, 2010 1 次提交
  7. 30 1月, 2010 1 次提交
  8. 27 1月, 2010 1 次提交
  9. 09 1月, 2010 2 次提交
    • P
      OMAP clock/CPUFreq: add clk_exit_cpufreq_table() · 4e37c10d
      Paul Walmsley 提交于
      A subsequent patch adds code on OMAP2xxx to dynamically allocate the
      CPUFreq frequency table in clk_init_cpufreq_table(), so for it to
      avoid a leak, it will need a corresponding function to free the
      memory.  This patch adds clk_exit_cpufreq_table() with generic
      code to call a chip-specific variant inside the clockfw_lock spinlock via
      struct clk_functions.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      4e37c10d
    • P
      OMAP clock: remove incorrect EXPORT_SYMBOL()s · d1e62498
      Paul Walmsley 提交于
      The only symbols that should be exported are symbols that are to be
      called from loadable kernel modules, e.g., device drivers.  In the
      context of plat-omap/clock.c, these should only be the Linux clock
      interface symbols as defined by include/linux/clk.h.  Core code
      doesn't need these symbols to be exported.  Also, clean up an old
      comment while here.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      d1e62498
  10. 12 12月, 2009 2 次提交
  11. 21 10月, 2009 1 次提交
    • T
      omap: headers: Move remaining headers from include/mach to include/plat · ce491cf8
      Tony Lindgren 提交于
      Move the remaining headers under plat-omap/include/mach
      to plat-omap/include/plat. Also search and replace the
      files using these headers to include using the right path.
      
      This was done with:
      
      #!/bin/bash
      mach_dir_old="arch/arm/plat-omap/include/mach"
      plat_dir_new="arch/arm/plat-omap/include/plat"
      headers=$(cd $mach_dir_old && ls *.h)
      omap_dirs="arch/arm/*omap*/ \
      drivers/video/omap \
      sound/soc/omap"
      other_files="drivers/leds/leds-ams-delta.c \
      drivers/mfd/menelaus.c \
      drivers/mfd/twl4030-core.c \
      drivers/mtd/nand/ams-delta.c"
      
      for header in $headers; do
      	old="#include <mach\/$header"
      	new="#include <plat\/$header"
      	for dir in $omap_dirs; do
      		find $dir -type f -name \*.[chS] | \
      			xargs sed -i "s/$old/$new/"
      	done
      	find drivers/ -type f -name \*omap*.[chS] | \
      		xargs sed -i "s/$old/$new/"
      	for file in $other_files; do
      		sed -i "s/$old/$new/" $file
      	done
      done
      
      for header in $(ls $mach_dir_old/*.h); do
      	git mv $header $plat_dir_new/
      done
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ce491cf8
  12. 04 9月, 2009 1 次提交
  13. 29 5月, 2009 1 次提交
  14. 13 5月, 2009 1 次提交
  15. 23 4月, 2009 1 次提交
    • P
      OMAP2xxx clock: pre-initialize struct clks early · c8088112
      Paul Walmsley 提交于
      Commit 3f0a820c breaks OMAP2xxx boot
      during initial propagate_rate() on osc_ck and sys_ck.  Fix by
      pre-initializing all struct clks before running any other clock init
      code.  Incorporates review comments from Russell King
      <rmk+kernel@arm.linux.org.uk>.
      
      Resolves
      
      <1>Unable to handle kernel NULL pointer dereference at virtual address 00000000
      <1>pgd = c0004000
      <1>[00000000] *pgd=00000000
      Internal error: Oops: 5 [#1]
      Modules linked in:
      CPU: 0    Not tainted  (2.6.29-omap1 #37)
      PC is at propagate_rate+0x10/0x60
      LR is at omap2_clk_init+0x30/0x218
      ...
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Tested-by: NJarkko Nikula <jarkko.nikula@nokia.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      c8088112
  16. 03 3月, 2009 1 次提交
    • R
      [ARM] omap: clk_set_parent: deny changing parent if clock is enabled · 4da37821
      Russell King 提交于
      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: NRichard Woodruff <r-woodruff2@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4da37821
  17. 14 2月, 2009 1 次提交
    • R
      [ARM] omap: arrange for clock recalc methods to return the rate · 8b9dbc16
      Russell King 提交于
      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: NRussell King <rmk+kernel@arm.linux.org.uk>
      8b9dbc16
  18. 09 2月, 2009 10 次提交
  19. 08 2月, 2009 2 次提交
  20. 05 11月, 2008 1 次提交
  21. 06 9月, 2008 1 次提交
  22. 24 8月, 2008 1 次提交
  23. 07 8月, 2008 1 次提交
  24. 03 7月, 2008 1 次提交
    • H
      ARM: OMAP: CLKFW: Initial debugfs support for omap clock framework · 137b3ee2
      Hiroshi DOYU 提交于
      debugfs can provide the infrastructure to trace the dependencies of
      clock tree hierarchy quite visibly. This patch enables to keep track
      of clock tree hierarchy and expose their attributes under each clock
      directry as below:
      
      	omap:~# tree -d -L 2 /debug/clock/omap_32k_fck/
      	/debug/clock/omap_32k_fck/
      	|-- gpt10_fck
      	|-- gpt11_fck
      	|-- gpt1_fck
      	|-- per_32k_alwon_fck
      	|   |-- gpio2_fck
      	|   |-- gpio3_fck
      	|   |-- gpio4_fck
      	|   |-- gpio5_fck
      	|   |-- gpio6_fck
      	|   `-- wdt3_fck
      	|-- ts_fck
      	`-- wkup_32k_fck
      	    |-- gpio1_fck
      	    `-- wdt2_fck
      
      	14 directories
      	omap:~# tree  /debug/clock/omap_32k_fck/gpt10_fck/
      	/debug/clock/omap_32k_fck/gpt10_fck/
      	|-- flags
      	|-- rate
      	`-- usecount
      
      	0 directories, 3 files
      
      Although, compared with David Brownell's small patch, this may look
      bit overkilling, I expect that this debugfs can deal with other PRCM
      complexities at the same time. For example, powerdomain dependencies
      can be expressed by using symbolic links of these clocks if
      powerdomain supports dubgfs as well.
      Signed-off-by: NHiroshi DOYU <Hiroshi.DOYU@nokia.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      137b3ee2