1. 31 3月, 2011 1 次提交
  2. 10 3月, 2011 1 次提交
    • P
      OMAP2+: clockdomain: add flag that will block autodeps from being added for a clockdomain · 570b54c7
      Paul Walmsley 提交于
      Add a new clockdomain flag, CLKDM_NO_AUTODEPS, which, when marked on a
      clockdomain, will prevent "autodeps" from being associated with the
      clockdomain.  ("Autodeps" are sleep dependencies and wakeup
      dependencies from/to processor modules that are automatically added to
      a clockdomain when it is in hardware-supervised idle mode.  They are
      deprecated -- a relic from the old CDP trees -- but are still in use
      for OMAP3.)
      
      Also, prevent the hwmod code from adding or removing initiator
      dependencies for clockdomains with this flag set.
      
      This patch should allow others to test which clockdomains actually
      still need autodeps.
      
      Thanks to Kevin Hilman <khilman@ti.com> for noting that the original
      version should also modify the hwmod code.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      570b54c7
  3. 26 2月, 2011 5 次提交
    • R
      OMAP: clockdomain: Arch specific funcs for clkdm_clk_enable/disable · 4da71ae6
      Rajendra Nayak 提交于
      Define the following architecture specific funtions for omap2/3/4
      .clkdm_clk_enable
      .clkdm_clk_disable
      
      Convert the platform-independent framework to call these functions.
      Also rename the api's by removing the omap2_ preamble.
      Hence call omap2_clkdm_k_enable as clkdm_clk_enable and
      omap2_clkdm_clk_disable as clkdm_clk_disable.a
      
      Remove unused functions (_enable/_disable_hwsup) and unsed
      headers from clockdomain.c file.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      4da71ae6
    • R
      OMAP: clockdomain: Arch specific funcs for hwsup control of clkdm · 5cd1937b
      Rajendra Nayak 提交于
      Define the following architecture specific funtions for omap2/3/4
      .clkdm_allow_idle
      .clkdm_deny_idle
      
      Convert the platform-independent framework to call these functions.
      Also rename the api's by removing the omap2_ preamble.
      Hence call omap2_clkdm_allow_idle as clkdm_allow_idle and
      omap2_clkdm_deny_idle as clkdm_deny_idle.
      
      Make the _clkdm_add_autodeps and _clkdm_del_autodeps as non-static
      so they can be accessed from OMAP2/3 platform specific code.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      5cd1937b
    • R
      OMAP: clockdomain: Arch specific funcs for sleep/wakeup of clkdm · 68b921ad
      Rajendra Nayak 提交于
      Define the following architecture specific funtions for omap2/3/4
      .clkdm_sleep
      .clkdm_wakeup
      
      Convert the platform-independent framework to call these functions.
      Also rename the api's by removing the omap2_ preamble.
      Hence call omap2_clkdm_wakeup as clkdm_wakeup and
      omap2_clkdm_sleep as clkdm_sleep.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: fixed omap3_clkdm_clear_all_sleepdeps() and
       omap2_clkdm_clear_all_wkdeps() to test against the correct
       loop termination condition; thanks to Kevin Hilman for finding and
       helping fix]
      Cc: Kevin Hilman <khilman@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      68b921ad
    • R
      OMAP: clockdomain: Arch specific funcs to handle deps · 4aef7a2a
      Rajendra Nayak 提交于
      Define the following architecture specific funtions for omap2/3
      .clkdm_add_wkdep
      .clkdm_del_wkdep
      .clkdm_read_wkdep
      .clkdm_clear_all_wkdeps
      .clkdm_add_sleepdep
      .clkdm_del_sleepdep
      .clkdm_read_sleepdep
      .clkdm_clear_all_sleepdeps
      
      Convert the platform-independent framework to call these functions.
      With this also move the clkdm lookups for all wkdep_srcs and
      sleepdep_srcs at clkdm_init.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: fixed loop termination conditions in omap*_clkdm_clear_all_*();
       thanks to Kevin Hilman for finding and helping fix those bugs; also
       avoid re-resolving clockdomains during init; abstracted out clkdm_dep walk]
      Cc: Kevin Hilman <khilman@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      4aef7a2a
    • R
      OMAP: clockdomain: Infrastructure to put arch specific code · 32d4034e
      Rajendra Nayak 提交于
      Put infrastructure in place, so arch specific func pointers
      can be hooked up to the platform-independent part of the
      framework.
      This is in preparation of splitting the clockdomain framework into
      platform-independent part (for all omaps) and platform-specific
      parts.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      32d4034e
  4. 08 1月, 2011 1 次提交
    • S
      omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask · 30299137
      Santosh Shilimkar 提交于
      struct clockdomain member clktrctrl_mask is available for only for OMAP2
      and OMAP3 architectures. Technially it is also used only for these archs
      but this breaks the build with custom OMAP4 configuration.
      
       CC      arch/arm/mach-omap2/clockdomain.o
      arch/arm/mach-omap2/clockdomain.c: In function '_enable_hwsup':
      arch/arm/mach-omap2/clockdomain.c:251: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c:254: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c: In function '_disable_hwsup':
      arch/arm/mach-omap2/clockdomain.c:277: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c:280: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_sleep':
      arch/arm/mach-omap2/clockdomain.c:744: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_wakeup':
      arch/arm/mach-omap2/clockdomain.c:789: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_enable':
      arch/arm/mach-omap2/clockdomain.c:922: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c:926: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_disable':
      arch/arm/mach-omap2/clockdomain.c:994: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c:998: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
      make: *** [arch/arm/mach-omap2] Error 2
      
      Fix the build break by dropping the #ifdef as suggested by Paul Walmsley
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      30299137
  5. 22 12月, 2010 5 次提交
  6. 27 1月, 2010 5 次提交
    • P
      OMAP clockdomain/powerdomain: improve documentation · f0271d65
      Paul Walmsley 提交于
      This patch only affects documentation; no functional changes are
      included.
      
      Clean up comments in the current clockdomain, powerdomain code and
      header files.  This mostly involves conversion to kerneldoc format,
      although some clarifications are also included.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      f0271d65
    • P
      OMAP clockdomains: add usecounting for wakeup and sleep dependencies · 369d5614
      Paul Walmsley 提交于
      Add usecounting for wakeup and sleep dependencies.  In the current
      situation, if several functions add dependencies on the same
      clockdomains, when the first dependency removal function is called,
      the dependency will be incorrectly removed from the hardware.
      
      Add clkdm_clear_all_wkdeps() and clkdm_clear_all_sleepdeps(), which
      provide a fast and usecounting-consistent way to clear all hardware
      clockdomain dependencies, since accesses to these registers can be
      quite slow.  pm{2,3}4xx.c has been updated to use these new functions.
      The original version of this patch did not touch these files, which
      previously wrote directly to the wkdep registers, and thus confused
      the usecounting code.  This problem was found by Kevin Hilman
      <khilman@deeprootsystems.com>.
      
      N.B.: This patch introduces one significant functional difference over
      the previous pm34xx.c code: sleepdeps are now cleared during
      clockdomain initialization, whereas previously they were left
      untouched.  This has been tested by Kevin and confirmed to work.
      
      The original version of this patch also did not take into
      consideration that some clockdomains do not have sleep or wakeup
      dependency sources, which caused NULL pointer dereferences.  This
      problem was debugged and fixed by Kevin Hilman
      <khilman@deeprootsystems.com>.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Cc: Jouni Högander <jouni.hogander@nokia.com>
      369d5614
    • P
      OMAP clockdomain/powerdomain: remove runtime register/unregister · e909d62a
      Paul Walmsley 提交于
      OMAP clockdomains and powerdomains are currently defined statically,
      only registered at boot, and never unregistered, so we can remove the
      unregister function and the locking.   A variant of this was originally
      suggested a while ago by Dmitry Baryshkov <dbaryshkov@gmail.com>.
      This version of this patch contains an additional fix from Kevin Hilman
      <khilman@deeprootsystems.com> to address one of the pwrdm_for_each_nolock()
      users in mach-omap2/pm-debug.c.   Thanks Kevin.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      e909d62a
    • P
      OMAP2/3 clkdm/pwrdm: move wkdep/sleepdep handling from pwrdm to clkdm · 55ed9694
      Paul Walmsley 提交于
      Move clockdomain wakeup dependency and sleep dependency data
      structures from the powerdomain layer to the clockdomain layer, where
      they belong.  These dependencies were originally placed in the
      powerdomain layer due to unclear documentation; however, it is clear
      now that these dependencies are between clockdomains.  For OMAP2/3,
      this is not such a big problem, but for OMAP4 this needs to be fixed.
      
      Thanks to Benoît Cousson <b-cousson@ti.com> for his advice on this
      patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      55ed9694
    • A
      ARM: OMAP4: PM: Make OMAP3 Clock-domain framework compatible for OMAP4. · 84c0c39a
      Abhijit Pagare 提交于
      Here the ".clkstctrl_reg" field is added to the clockdomain stucture
      as the module offsets for OMAP4 do not map one to one for powerdomains
      and clockdomains as it used to for OMAP3. Hence we need to use absolute
      addresses to access the control registers. Some of the clock domains have
      modules falling in the address space of PRM partition. Hence  necessitating
      the use of absolute adresses.
      Signed-off-by: NAbhijit Pagare <abhijitpagare@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      84c0c39a
  7. 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
  8. 03 9月, 2009 1 次提交
  9. 09 2月, 2009 1 次提交
  10. 19 8月, 2008 1 次提交
    • P
      ARM: OMAP2: Clockdomain: Add base OMAP2/3 clockdomain code · d459bfe0
      Paul Walmsley 提交于
      This patch creates an interface to the clockdomain registers in the
      PRM/CM modules on OMAP2/3.  This interface is intended to be used by
      PM code, e.g., pm.c; not by device drivers directly.
      
      The patch also adds clockdomain usecount tracking.  This is intended
      to be called whenever the first clock in a clockdomain is enabled, or
      when the last enabled clock in a clockdomain is disabled.  If the
      clockdomain is in software-supervised mode, the code will force-wakeup
      or force-sleep the clockdomain.  If the clockdomain is in
      hardware-supervised mode, the first clock enable will add sleep and
      wakeup dependencies on a user-selectable set of parent domains (usually
      MPU & IVA2), and the disable will remove them.
      
      Each clockdomain will be defined in later patches as static
      structures.  The clockdomain structures are linked into a list at boot
      by clkdm_register(), similar to the OMAP clock code.
      
      The patch adds a Kconfig option, CONFIG_OMAP_DEBUG_CLOCKDOMAIN, which
      when enabled will emit verbose debug messages via pr_debug().
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      
      
      
      d459bfe0