1. 22 Dec, 2010 9 commits
    • Paul Walmsley's avatar
      OMAP2+: hwmod: fix a warning, add some docs, remove unused fields · b56b7bc8
      Paul Walmsley authored
      Trivial cleanup and documentation changes on the hwmod code and data:
      
      - add some hwmod documentation to indicate flags that should be moved
        outside the static hwmod data in a future patch
      
      - remove some unused fields in the struct omap_hwmod_ocp_if and
        struct omap_hwmod structures
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      b56b7bc8
    • Paul Walmsley's avatar
      OMAP2+: hwmod: upgrade per-hwmod mutex to a spinlock · dc6d1cda
      Paul Walmsley authored
      Change the per-hwmod mutex to a spinlock.  (The per-hwmod lock
      serializes most post-initialization hwmod operations such as enable,
      idle, and shutdown.)  Spinlocks are needed, because in some cases,
      hwmods must be enabled from timer interrupt disabled-context, such as
      an ISR.  The current use-case that is driving this is the OMAP GPIO
      block ISR: it can trigger interrupts even with its clocks disabled,
      but these clocks are needed for register accesses in the ISR to succeed.
      
      This patch also effectively reverts commit
      84824022 - this patch makes
      _omap_hwmod_enable() and _omap_hwmod_init() static, renames them back
      to _enable() and _idle(), and changes their callers to call the
      spinlocking versions.  Previously, since omap_hwmod_{enable,init}()
      attempted to take mutexes, these functions could not be called while
      the timer interrupt was disabled; but now that the functions use
      spinlocks and save and restore the IRQ state, it is appropriate to
      call them directly.
      
      Kevin Hilman <khilman@deeprootsystems.com> originally proposed this
      patch - thanks Kevin.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      dc6d1cda
    • Paul Walmsley's avatar
      OMAP2+: hwmod: add support for per-class custom device reset functions · bd36179e
      Paul Walmsley authored
      The standard omap_hwmod.c _reset() code relies on an IP block's
      OCP_SYSCONFIG.SOFTRESET register bit to reset the IP block.  This
      works for most IP blocks on the chip, but unfortunately not all.  For
      example, initiator-only IP blocks often don't have any MPU-accessible
      OCP-header registers, and therefore the MPU can't write to any
      OCP_SYSCONFIG registers in that block.  Other IP blocks, such as the
      IVA and I2C, require a specialized reset sequence.
      
      Since we need to be able to reset these IP blocks as well, allow
      custom IP block reset functions to be passed into the hwmod code via a
      per-hwmod-class reset function pointer, struct omap_hwmod_class.reset.
      If .reset is non-null, then the hwmod _reset() code will call the custom
      function instead of the standard OCP SOFTRESET-based code.
      
      As part of this change, rename most of the existing _reset() function
      code to _ocp_softreset(), to indicate more clearly that it does not work
      for all cases.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Paul Hunt <hunt@ti.com>
      Cc: Stanley Liu <stanley_liu@ti.com>
      bd36179e
    • Paul Walmsley's avatar
      OMAP2+: hwmod: add postsetup state · 2092e5cc
      Paul Walmsley authored
      Allow board files and OMAP core code to control the state that some or
      all of the hwmods end up in at the end of _setup() (called by
      omap_hwmod_late_init() ).  Reimplement the old skip_setup_idle code in
      terms of this new postsetup state code.
      
      There are two use-cases for this patch: the !CONFIG_PM_RUNTIME case,
      in which all IP blocks should stay enabled after _setup() finishes;
      and the MPU watchdog case, in which the watchdog IP block should enter
      idle if watchdog coverage of kernel initialization is desired, and
      should be disabled otherwise.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Charulatha Varadarajan <charu@ti.com>
      2092e5cc
    • Paul Walmsley's avatar
      OMAP2+: hwmod: allow custom pre-shutdown functions · e4dc8f50
      Paul Walmsley authored
      Some OMAP IP blocks, such as the watchdog timers, cannot be completely
      shut down via the standard hwmod shutdown mechanism.  This patch
      enables the hwmod data files to supply a pointer to a custom
      pre-shutdown function via the struct omap_hwmod_class.pre_shutdown
      function pointer.  If the struct omap_hwmod_class.pre_shutdown
      function pointer is non-null, the function will be executed before the
      existing hwmod shutdown code runs.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      e4dc8f50
    • Paul Walmsley's avatar
      OMAP2+: io: split omap2_init_common_hw() · 4805734b
      Paul Walmsley authored
      Split omap2_init_common_hw() into two functions.  The first,
      omap2_init_common_infrastructure(), initializes the hwmod code and
      data, the OMAP PM code, and the clock code and data.  The second,
      omap2_init_common_devices(), handles any other early device
      initialization that, for whatever reason, has not been or cannot be
      moved to initcalls or early platform devices.
      
      This patch is required for the hwmod postsetup patch, which allows
      board files to change the state that hwmods should be placed into at
      the conclusion of the hwmod _setup() function.  For example, for a
      board whose creators wish to ensure watchdog coverage across the
      entire kernel boot process, code to change the watchdog's postsetup
      state will be added in the board-*.c file between the
      omap2_init_common_infrastructure() and omap2_init_common_devices() function
      calls.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      4805734b
    • Tony Lindgren's avatar
      Merge branch 'pm-opp' of... · b9e7683b
      Tony Lindgren authored
      Merge branch 'pm-opp' of ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus
      b9e7683b
    • Tony Lindgren's avatar
      Merge branch 'pm-next' of... · bb3613aa
      Tony Lindgren authored
      Merge branch 'pm-next' of ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus
      bb3613aa
    • Tony Lindgren's avatar
      6971071c
  2. 21 Dec, 2010 31 commits