1. 13 9月, 2012 1 次提交
  2. 08 8月, 2012 1 次提交
    • K
      Revert "ARM: OMAP3: PM: call pre/post transition per powerdomain" · e0e29fd7
      Kevin Hilman 提交于
      This reverts commit 58f0829b.
      
      Converstion to per-pwrdm per/post transition calls was a bit
      premature.  Only tracking MPU, PER & CORE in the idle path means we
      lose the accounting for all the other powerdomains which may also
      transition in idle.  On OMAP3, due to autodeps, several powerdomains
      transition along with MPU (e.g. DSS, USBHOST), and the accounting for
      these was lost with this patch.  Since the accounting includes the
      context loss counters, drivers for devices in those power domains
      would never notice context lost, so would likely hang after any
      off-mode transitions.
      
      This patch should be revisited when the upcoming clkdm/pwrmdm/voltdm
      use-counting seires is merged since then we can properly do accounting
      without relying on a call in the idle path.
      
      In addition, the original patch had another bug because the PER
      powerdomain accounting was not updated until after the GPIO resume
      hook is called.  Since gpio_resume_after_idle() checks the context
      loss count (which is not yet updated) it would not properly restore
      context, leaving the GPIO banks in an undefined state.
      
      Cc: Jean Pihet <jean.pihet@newoldbits.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Reported-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      e0e29fd7
  3. 26 6月, 2012 3 次提交
  4. 22 6月, 2012 3 次提交
  5. 20 6月, 2012 1 次提交
  6. 12 5月, 2012 1 次提交
    • K
      ARM: OMAP3: PM: fix shared PRCM interrupts: leave disabled at boot · 99b59df0
      Kevin Hilman 提交于
      By default, request_irq() will auto-enable the requested IRQ.
      
      For PRCM interrupts, we may want to avoid that until the PM core code
      is fully ready to handle the interrupts.  This is particularily true
      for IO pad interrupts on OMAP3, which are shared between the hwmod
      core and the PRM core.
      
      In order to avoid PRCM IO-chain interrupts until the PM core is ready
      to handle them, ready, set the IRQ_NOAUTOEN flag for the PRCM IO-chain
      interrupt,  which means it will remain disabled after request_irq().
      
      Then, explicitly enable the PRCM interrupts after the request_irq() in
      the PM core (but not in the hwmod core.)
      
      Special thanks to Tero Kristo for suggesting to isolate the fix to
      only the IO-chain interrupt on OMAP3 instead of all PRCM interrupts.
      
      Cc: Tero Kristo <t-kristo@ti.com>
      Acked-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      99b59df0
  7. 08 5月, 2012 1 次提交
  8. 18 4月, 2012 1 次提交
    • P
      ARM: OMAP2+: clean up some cppcheck warnings · eeb3711b
      Paul Walmsley 提交于
      Resolve some warnings identified by cppcheck in arch/arm/mach-omap2:
      
          [arch/arm/mach-omap2/usb-tusb6010.c:129]: (style) Checking if unsigned variable 'tmp' is less than zero.
          [arch/arm/mach-omap2/prm_common.c:241]: (error) Possible null pointer dereference: irq_setup - otherwise it is redundant to check if irq_setup is null at line 247
          [arch/arm/mach-omap2/pm34xx.c:790]: (style) Variable 'per_clkdm' is assigned a value that is never used
          [arch/arm/mach-omap2/pm34xx.c:790]: (style) Variable 'core_clkdm' is assigned a value that is never used
          [arch/arm/mach-omap2/pm24xx.c:185]: (style) Variable 'only_idle' is assigned a value that is never used
          [arch/arm/mach-omap2/mux.c:254]: (error) Possible null pointer dereference: mux
          [arch/arm/mach-omap2/mux.c:258]: (error) Possible null pointer dereference: mux
          [arch/arm/mach-omap2/gpmc-onenand.c:178]: (style) Variable 'tick_ns' is assigned a value that is never used
          [arch/arm/mach-omap2/gpio.c:56]: (error) Possible null pointer dereference: pdata - otherwise it is redundant to check if pdata is null at line 57
          [arch/arm/mach-omap2/devices.c:45]: (style) Variable 'l' is assigned a value that is never used
          [arch/arm/mach-omap2/board-omap3evm.c:641] -> [arch/arm/mach-omap2/board-omap3evm.c:639]: (style) Found duplicate branches for if and else.
          [arch/arm/mach-omap2/am35xx-emac.c:95]: (style) Variable 'regval' is assigned a value that is never used
          [arch/arm/mach-omap2/devices.c:74]: (style) Variable 'l' is assigned a value that is never used
          [arch/arm/mach-omap2/pm34xx.c:277]: (style) Variable 'per_prev_state' is assigned a value that is never used
          [arch/arm/plat-omap/dmtimer.c:352]: (error) Possible null pointer dereference: timer - otherwise it is redundant to check if timer is null at line 354
          [arch/arm/plat-omap/omap_device.c:478]: (style) Variable 'c' is assigned a value that is never used
          [arch/arm/plat-omap/usb.c:42]: (style) Variable 'status' is assigned a value that is never used
          [arch/arm/mach-omap1/clock.c:197]: (style) Variable 'dpll1_rate' is assigned a value that is never used
          [arch/arm/mach-omap1/lcd_dma.c:60]: (style) struct or union member 'lcd_dma_info::size' is never used
          [arch/arm/mach-omap1/pm.c:572]: (style) Variable 'entry' is assigned a value that is never used
      
      Some of them are pretty good catches, such as gpio.c:56 and
      usb-tusb6010.c:129.
      
      Thanks to Jarkko Nikula for some comments on the sscanf() warnings.
      It seems that the kernel sscanf() ignores the field width anyway for the
      %d format, so those changes have been dropped from this second version.
      
      Thanks to Daniel Marjamäki <daniel.marjamaki@gmail.com> for pointing
      out that a variable was unnecessarily marked static in the
      board-omap3evm.c change.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
      Cc: Charulatha Varadarajan <charu@ti.com>
      Cc: Daniel Marjamäki <daniel.marjamaki@gmail.com>
      Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
      Reviewed-by: Charulatha Varadarajan <charu@ti.com> # for gpio.c
      eeb3711b
  9. 29 3月, 2012 1 次提交
  10. 23 3月, 2012 2 次提交
  11. 06 3月, 2012 3 次提交
  12. 06 2月, 2012 1 次提交
  13. 21 1月, 2012 1 次提交
  14. 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
  15. 15 12月, 2011 2 次提交
    • G
      ARM: OMAP2+: UART: Remove omap_uart_can_sleep and add pm_qos · 2fd14964
      Govindraj.R 提交于
      Omap_uart_can_sleep function blocks system wide low power state until
      uart is active remove this func and add qos requests to prevent
      MPU from transitioning.
      
      Keep qos request to default value which will allow MPU to transition
      and while uart baud rate is available calculate the latency value
      from the baudrate and use the same to hold constraint while uart clocks
      are enabled, and if uart is auto-idled the constraint is updated with
      default constraint value allowing MPU to transition.
      
      Qos requests are blocking notifier calls so put these requests to
      work queue, also the driver uses irq_safe version of runtime API's
      and callbacks can be called in interrupt disabled context.
      So to avoid warn on slow path warning while using qos update
      API's from runtime callbacks use the qos_work_queue.
      
      During bootup the runtime_resume call backs might not be called and runtime
      callback gets called only after uart is idled by setting the autosuspend
      timeout. So qos_request from runtime resume callback might not activated during
      boot if uart baudrate is calculated during bootup for console uart, so schedule
      the qos_work queue once we calc_latency while configuring the uart port.
      
      Flush and complete any pending qos jobs in work queue while suspending.
      Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
      Acked-by: Greg Kroah-Hartman <gregkh@suse.de> (for drivers/tty changes)
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      2fd14964
    • G
      ARM: OMAP2+: UART: cleanup + remove uart pm specific API · 8384c974
      Govindraj.R 提交于
      In preparation to UART runtime conversion remove uart specific calls
      from pm24xx/34xx files and their definition from serial.c
      These func calls will no more be used with upcoming uart runtime design.
      
      1.) omap_uart_prepare_suspend :- can be taken care with driver suspend hooks.
      2.) omap_uart_enable_irqs :- Used to enable/disable uart irq's in suspend
          path from PM code, this is removed as same is handled by
          uart_suspend_port/uart_resume_port in omap-serial driver which will
          do an port_shutdown on suspend freeing irq and port_startup on resume
          enabling back irq.
      3.) Remove prepare_idle/resume_idle calls used to gate uart clocks.
          UART clocks can be gated within driver using runtime funcs
          and be woken up using irq_chaining from omap_prm driver.
      4.) Remove console_locking from idle path as clock gating is done withing
          driver itself with runtime API. Remove is_suspending check used to acquire
          console_lock.
      Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      8384c974
  16. 18 11月, 2011 1 次提交
  17. 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
  18. 17 9月, 2011 1 次提交
  19. 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
  20. 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
  21. 24 6月, 2011 2 次提交
  22. 21 6月, 2011 1 次提交
  23. 20 6月, 2011 1 次提交
  24. 20 5月, 2011 2 次提交
  25. 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
  26. 10 3月, 2011 2 次提交