1. 17 12月, 2011 1 次提交
    • T
      ARM: OMAP3: pm: use prcm chain handler · 22f51371
      Tero Kristo 提交于
      PM interrupt handling is now done through the PRCM chain handler. The
      interrupt handling logic is also split in two parts, to serve IO and
      WKUP events separately. This allows us to handle IO chain events in a
      clean way.
      
      Core event code is also changed in accordance to this, as PRCM
      interrupt handling is done by independent handlers, and the core
      handler should not clear the IO events anymore.
      Signed-off-by: NTero Kristo <t-kristo@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      [paul@pwsan.com: use pr_err(); combined with portions of earlier patches and
       the "do not enable PRCM MPU interrupts manually" patch]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      22f51371
  2. 08 10月, 2011 3 次提交
    • P
      ARM: OMAP3: PM: restrict erratum i443 handling to OMAP3430 only · 30474544
      Paul Walmsley 提交于
      Based on the documents that I have here, there doesn't appear to be an
      equivalent to erratum i443 for OMAP3630, so restrict this one to OMAP34xx
      chips.
      
      Also, explicitly restrict this erratum to EMU and HS devices.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      30474544
    • P
      ARM: OMAP3: PM: fix I/O wakeup and I/O chain clock control detection · b02b9172
      Paul Walmsley 提交于
      The way that we detect which OMAP3 chips support I/O wakeup and
      software I/O chain clock control is broken.
      
      Currently, I/O wakeup is marked as present for all OMAP3 SoCs other
      than the AM3505/3517.  The TI81xx family of SoCs are at present
      considered to be OMAP3 SoCs, but don't support I/O wakeup.  To resolve
      this, convert the existing blacklist approach to an explicit,
      whitelist support, in which only SoCs which are known to support I/O
      wakeup are listed.  (At present, this only includes OMAP34xx,
      OMAP3503, OMAP3515, OMAP3525, OMAP3530, and OMAP36xx.)
      
      Also, the current code incorrectly detects the presence of a
      software-controllable I/O chain clock on several chips that don't
      support it.  This results in writes to reserved bitfields, unnecessary
      delays, and console messages on kernels running on those chips:
      
          http://www.spinics.net/lists/linux-omap/msg58735.html
      
      Convert this test to a feature test with a chip-by-chip whitelist.
      
      Thanks to Dave Hylands <dhylands@gmail.com> for reporting this problem
      and doing some testing to help isolate the cause.  Thanks to Steve
      Sakoman <sakoman@gmail.com> for catching a bug in the first version of
      this patch.  Thanks to Russell King <linux@arm.linux.org.uk> for
      comments.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Dave Hylands <dhylands@gmail.com>
      Cc: Steve Sakoman <sakoman@gmail.com>
      Tested-by: NSteve Sakoman <sakoman@gmail.com>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      b02b9172
    • C
      ARM: OMAP3: PM: fix pwrdm_post_transition call sequence · ff2f8e5f
      Charulatha V 提交于
      The context lost count is modified in omap_sram_idle() path when
      pwrdm_post_transition() is called. But pwrdm_post_transition() is called
      only after omap_gpio_resume_after_idle() is called. Correct this so that
      context lost count is modified before calling omap_gpio_resume_after_idle().
      
      This would be useful when OMAP GPIO save/restore context is called by
      the OMAP GPIO driver itself.
      Signed-off-by: NCharulatha V <charu@ti.com>
      Reviewed-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      ff2f8e5f
  3. 17 9月, 2011 1 次提交
  4. 02 7月, 2011 1 次提交
    • R
      ARM: pm: allow suspend finisher to return error codes · 29cb3cd2
      Russell King 提交于
      There are SoCs where attempting to enter a low power state is ignored,
      and the CPU continues executing instructions with all state preserved.
      It is over-complex at that point to disable the MMU just to call the
      resume path.
      
      Instead, allow the suspend finisher to return error codes to abort
      suspend in this circumstance, where the cpu_suspend internals will then
      unwind the saved state on the stack.  Also omit the tlb flush as no
      changes to the page tables will have happened.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      29cb3cd2
  5. 30 6月, 2011 2 次提交
    • R
      ARM: pm: omap3: move saving of the auxiliary control registers to C · cbe26349
      Russell King 提交于
      Move the saving of the auxiliary control registers into C; there's
      no need for this to be in assembly code.  This results in less
      assembly code to deal with in OMAP.
      
      Kevin tested full-chip retention and off on 3430/n900, 3530/Overo and
      3630/Zoom3.
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      cbe26349
    • J
      ARM: pm: omap3: run the ASM sleep code from DDR · 46e130d2
      Jean Pihet 提交于
      Most of the ASM sleep code (in arch/arm/mach-omap2/sleep34xx.S)
      is copied to internal SRAM at boot and after wake-up from CORE OFF
      mode.  However only a small part of the code really needs to run from
      internal SRAM.
      
      This fix lets most of the ASM idle code run from the DDR in order to
      minimize the SRAM usage and the overhead in the code copy.
      
      The only pieces of code that are mandatory in SRAM are:
      - the i443 erratum WA,
      - the i581 erratum WA,
      - the security extension code.
      
      SRAM usage:
      - original code:
        . 560 bytes for omap3_sram_configure_core_dpll (used by DVFS),
        . 852 bytes for omap_sram_idle (used by suspend/resume in RETention),
        . 124 bytes for es3_sdrc_fix (used by suspend/resume in OFF mode on ES3.x),
        . 108 bytes for save_secure_ram_context (used on HS parts only).
      
      With this fix the usage for suspend/resume in RETention goes down 288
      bytes, so the gain in SRAM usage for suspend/resume is 564 bytes.
      
      Also fixed the SRAM initialization sequence to avoid an unnecessary
      copy to SRAM at boot time and for readability.
      
      Tested on Beagleboard (ES2.x) in idle with full RET and OFF modes.
      
      Kevin Hilman tested retention and off on 3430/n900, 3530/Overo and
      3630/Zoom3
      Signed-off-by: NJean Pihet <j-pihet@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      46e130d2
  6. 24 6月, 2011 2 次提交
  7. 21 6月, 2011 1 次提交
  8. 20 6月, 2011 1 次提交
  9. 20 5月, 2011 2 次提交
  10. 11 3月, 2011 1 次提交
    • J
      perf: add OMAP support for the new power events · 5e7c58dc
      Jean Pihet 提交于
      The patch adds the new power management trace points for
      the OMAP architecture.
      
      The trace points are for:
      - default idle handler. Since the cpuidle framework is
        instrumented in the generic way there is no need to
        add trace points in the OMAP specific cpuidle handler;
      - SoC clocks changes (enable, disable, set_rate),
      - power domain states: the desired target state and -if different-
        the actually hit state.
      
      Because of the generic nature of the changes, OMAP3 and OMAP4 are supported.
      
      Tested on OMAP3 with suspend/resume, cpuidle, basic DVFS.
      Signed-off-by: NJean Pihet <j-pihet@ti.com>
      Acked-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      5e7c58dc
  11. 10 3月, 2011 3 次提交
  12. 08 3月, 2011 1 次提交
  13. 26 2月, 2011 3 次提交
    • 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: 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
  14. 27 1月, 2011 1 次提交
    • K
      OMAP3: PM: fix save secure RAM to restore MPU power state · 617fcc98
      Kevin Hilman 提交于
      Currently, on HS/EMU devices, MPU power state forced to on during PM
      init by the save secure RAM code.  Rather than forcing the state of
      MPU powerdomain to on, simply read the current value and restore it
      after the ROM code has run.
      
      This only affects the !CPUidle case since when CPUidle is enabled, the
      MPU power state is dynamically changed by CPUidle.  In the !CPUidle
      case, MPU power state is initialized once at init and never touched.
      Acked-by: NTero Kristo <tero.kristo@nokia.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      617fcc98
  15. 26 1月, 2011 1 次提交
    • T
      console: rename acquire/release_console_sem() to console_lock/unlock() · ac751efa
      Torben Hohn 提交于
      The -rt patches change the console_semaphore to console_mutex.  As a
      result, a quite large chunk of the patches changes all
      acquire/release_console_sem() to acquire/release_console_mutex()
      
      This commit makes things use more neutral function names which dont make
      implications about the underlying lock.
      
      The only real change is the return value of console_trylock which is
      inverted from try_acquire_console_sem()
      
      This patch also paves the way to switching console_sem from a semaphore to
      a mutex.
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert]
      Signed-off-by: NTorben Hohn <torbenh@gmx.de>
      Cc: Thomas Gleixner <tglx@tglx.de>
      Cc: Greg KH <gregkh@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ac751efa
  16. 22 12月, 2010 13 次提交
  17. 10 12月, 2010 1 次提交
    • K
      OMAP2+: PM/serial: fix console semaphore acquire during suspend · e83df17f
      Kevin Hilman 提交于
      commit 0d8e2d0d (OMAP2+: PM/serial:
      hold console semaphore while OMAP UARTs are disabled) added use of the
      console semaphore to protect UARTs from being accessed after disabled
      during idle, but this causes problems in suspend.
      
      During suspend, the console semaphore is acquired by the console
      suspend method (console_suspend()) so the try_acquire_console_sem()
      will always fail and suspend will be aborted.
      
      To fix, introduce a check so the console semaphore is only attempted
      during idle, and not during suspend.  Also use the same check so that
      the console semaphore is not prematurely released during resume.
      
      Thanks to Paul Walmsley for suggesting adding the same check during
      resume.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Tested-by: NJean Pihet <j-pihet@ti.com>
      Tested-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      e83df17f
  18. 25 11月, 2010 1 次提交
    • P
      OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled · 0d8e2d0d
      Paul Walmsley 提交于
      The console semaphore must be held while the OMAP UART devices are
      disabled, lest a console write cause an ARM abort (and a kernel crash)
      when the underlying console device is inaccessible.  These crashes
      only occur when the console is on one of the OMAP internal serial
      ports.
      
      While this problem has been latent in the PM idle loop for some time,
      the crash was not triggerable with an unmodified kernel until commit
      6f251e9d ("OMAP: UART: omap_device
      conversions, remove implicit 8520 assumptions").  After this patch, a
      console write often occurs after the console UART has been disabled in
      the idle loop, crashing the system.  Several users have encountered
      this bug:
      
          http://www.mail-archive.com/linux-omap@vger.kernel.org/msg38396.html
      
          http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36602.html
      
      The same commit also introduced new code that disabled the UARTs
      during init, in omap_serial_init_port().  The kernel will also crash
      in this code when earlyconsole and extra debugging is enabled:
      
          http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36411.html
      
      The minimal fix for the -rc series is to hold the console semaphore
      while the OMAP UARTs are disabled.  This is a somewhat overbroad fix,
      since the console may not be located on an OMAP UART, as is the case
      with the GPMC UART on Zoom3.  While it is technically possible to
      determine which devices the console or earlyconsole is actually
      running on, it is not a trivial problem to solve, and the code to do
      so is not really appropriate for the -rc series.
      
      The right long-term fix is to ensure that no code outside of the OMAP
      serial driver can disable an OMAP UART.  As I understand it, code to
      implement this is under development by TI.
      
      This patch is a collaboration between Paul Walmsley <paul@pwsan.com>
      and Tony Lindgren <tony@atomide.com>.  Thanks to Ming Lei
      <tom.leiming@gmail.com> and Pramod <pramod.gurav@ti.com> for their
      feedback on earlier versions of this patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Pramod <pramod.gurav@ti.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Jean Pihet <jean.pihet@newoldbits.com>
      Cc: Govindraj.R <govindraj.raja@ti.com>
      0d8e2d0d
  19. 16 11月, 2010 1 次提交