1. 27 1月, 2010 7 次提交
    • 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: Refine the APIs to support OMAP4 features. · 8a3ddc75
      Abhijit Pagare 提交于
      Port the APIs to support the OMAP4 clockdomain framework.
      Also take care of the compiling requirements for the same.
      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>
      8a3ddc75
    • A
      ARM: OMAP4: PM: Modify Clock-domain interfaces for OMAP4 compatibility. · b099474a
      Abhijit Pagare 提交于
      Here the APIs are modified to use absolute addresses instead of module offsets.
      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>
      b099474a
    • 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
    • A
      ARM: OMAP4: PM: OMAP4 Power Domain Porting Related Clean-up. · 37903009
      Abhijit Pagare 提交于
      Module offsets were same for OMAP2 and OMAP3 while they differ for OMAP4.
      Hence we need different macros for identifying platform specific offsets.
      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>
      37903009
  2. 09 1月, 2010 1 次提交
  3. 12 12月, 2009 1 次提交
    • P
      OMAP clockdomain/powerdomain: remove CONFIG_OMAP_DEBUG_{CLOCK,POWER}DOMAIN · 33903eb5
      Paul Walmsley 提交于
      Avoid cluttering the Kconfig space with debug options that are rarely
      used.  These can now be enabled and disabled by patching the "#undef DEBUG"
      in the source files with "#define DEBUG", conforming to the practice for
      the rest of the linux-omap code.
      
      Also, while we're here, some lines in plat-omap/Kconfig use sets of
      leading spaces when those lines should start with tabs.  Convert most
      of them to use tabs.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      33903eb5
  4. 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
  5. 15 10月, 2009 1 次提交
    • K
      OMAP: Fix race condition with autodeps · a0219fbd
      Kalle Jokiniemi 提交于
      There is a possible race condition in clockdomain
      code handling hw supported idle transitions.
      
      When multiple autodeps dependencies are being added
      or removed, a transition of still remaining dependent
      powerdomain can result in false readings of the
      state counter. This is especially fatal for off mode
      state counter, as it could result in a driver not
      noticing a context loss.
      
      Fixed by disabling hw supported state transitions
      when autodeps are being changed.
      Signed-off-by: NKalle Jokiniemi <kalle.jokiniemi@digia.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      a0219fbd
  6. 03 9月, 2009 3 次提交
  7. 23 2月, 2009 1 次提交
  8. 09 2月, 2009 3 次提交
  9. 22 8月, 2008 1 次提交
  10. 19 8月, 2008 2 次提交
    • P
      ARM: OMAP2: Clockdomain: Connect clockdomain code to powerdomain code · 8420bb13
      Paul Walmsley 提交于
      Thie patch adds code to the powerdomain layer to track the
      clockdomains associated with each powerdomain.
      
      It also modifies the clockdomain code to register clockdomains
      with their corresponding powerdomain when the clockdomain is registered.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      
      
      
      8420bb13
    • 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