1. 22 12月, 2010 4 次提交
  2. 24 9月, 2010 1 次提交
  3. 21 5月, 2010 1 次提交
    • P
      OMAP2 PRCM: convert OMAP2 PRCM macros to the _SHIFT/_MASK suffixes · f38ca10a
      Paul Walmsley 提交于
      Fix all of the remaining OMAP2 PRCM register shift/bitmask macros that
      did not use the _SHIFT/_MASK suffixes to use them.  This makes the use
      of these macros consistent.  It is intended to reduce error, as code
      can be inspected visually by reviewers to ensure that bitshifts and
      bitmasks are used in the appropriate places.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      f38ca10a
  4. 31 3月, 2010 1 次提交
  5. 25 2月, 2010 3 次提交
    • P
      OMAP2+ clock: revise omap2_clk_{disable,enable}() · 30962d9d
      Paul Walmsley 提交于
      Simplify the code in the omap2_clk_disable() and omap2_clk_enable()
      functions, reducing levels of indentation.  This makes the code easier
      to read.  Add some additional debugging pr_debug()s here also to help
      others understand what is going on.
      
      Revise the omap2_clk_disable() logic so that it now attempts to
      disable the clock's clockdomain before recursing up the clock tree.
      Simultaneously, ensure that omap2_clk_enable() is called on parent
      clocks first, before enabling the clockdomain.  This ensures that a
      parent clock's clockdomain is enabled before the child clock's
      clockdomain.  These sequences should be the inverse of each other.
      
      Revise the omap2_clk_enable() logic so that it now cleans up after
      itself upon encountering an error.  Previously, an error enabling a
      parent clock could have resulted in inconsistent usecounts on the
      enclosing clockdomain.
      
      Remove the trivial _omap2_clk_disable() and _omap2_clk_enable() static
      functions, and replace it with the clkops calls that they were
      executing.
      
      For all this to work, the clockdomain omap2_clkdm_clk_enable() and
      omap2_clkdm_clk_disable() code must not return an error on clockdomains
      without CLKSTCTRL registers; so modify those functions to simply return 0
      in that case.
      
      While here, add some basic kerneldoc documentation on both functions,
      and get rid of some old non-CodingStyle-compliant comments that have
      existed since the dawn of time (at least, the OMAP clock framework's
      time).
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      30962d9d
    • P
      OMAP clockdomain: if no autodeps exist, don't try to add or remove them · ad956160
      Paul Walmsley 提交于
      _clkdm_add_autodeps() and _clkdm_del_autodeps() will attempt to dereference
      a NULL pointer if no autodeps were supplied to clkdm_init().
      
      Based on a patch from Roel Kluin <roel.kluin@gmail.com> - thanks Roel.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Roel Kluin <roel.kluin@gmail.com>
      ad956160
    • A
      ARM: OMAP4 clock domain: Add check for avoiding dependency related update. · 91808a81
      Abhijit Pagare 提交于
      A check is added for avoiding the sleep/wakeup dependency updates
      for OMAP4 as the structures for the dependencies are currently absent.
      Signed-off-by: NAbhijit Pagare <abhijitpagare@ti.com>
      [paul@pwsan.com: added warnings, explanatory comment, copyright update]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      91808a81
  6. 27 1月, 2010 8 次提交
    • 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: 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
  7. 09 1月, 2010 1 次提交
  8. 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
  9. 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
  10. 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
  11. 03 9月, 2009 3 次提交
  12. 23 2月, 2009 1 次提交
  13. 09 2月, 2009 3 次提交
  14. 22 8月, 2008 1 次提交
  15. 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