1. 19 6月, 2012 1 次提交
    • V
      ARM: OMAP AM33xx: powerdomains: add AM335x support · 3f0ea764
      Vaibhav Hiremath 提交于
      Add offset & mask fields to struct powerdomain
      
      In case of AM33xx family of devices, there is no consistency between
      PWRSTCTRL & PWRSTST register offsers in PRM space, for example -
      
      PRM_XXX           PWRSTCTRL     PWRSTST
      =======================================
      PRM_PER_MOD:      0x0C,         0x08
      PRM_WKUP_MOD:     0x04,         0x08
      PRM_MPU_MOD:      0x00,         0x04
      PRM_DEVICE_MOD:   NA,           NA
      
      And also, there is no consistency between bit-offsets inside
      PWRSTCTRL & PWRSTST register, for example -
      
      PRM_XXX           LOGICRET  MEMON  MEMRET
      =======================================
      GFX_PWRCTRL:      2,        17,    6
      PER_PWRCTRL:      3,        25,    29
      MPU_PWRCTRL:      2,        18,    22
      WKUP_PWRCTRL:     3,        NA,    NA
      
      This means, we need to maintain and pass on all this information
      in powerdomain handle; so adding fields for,
         - PWRSTCTRL/ST register offset
         - Logic retention state mask
         - mem_on/ret/pwrst/retst mask
      
      Currently, this fields is only applicable and used for AM33XX devices.
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: this patch is a combination of "Add offset & mask fields to
       struct powerdomain" and the powerdomain portions of "ARM: OMAP3+: am33xx:
       Add powerdomain & PRM support"; updated for 3.5]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      3f0ea764
  2. 08 5月, 2012 1 次提交
  3. 05 11月, 2011 1 次提交
  4. 16 9月, 2011 3 次提交
  5. 15 9月, 2011 2 次提交
    • P
      OMAP: powerdomain: remove omap_chip bitmasks · 8179488a
      Paul Walmsley 提交于
      At Tony's request, remove the omap_chip bitmasks from the powerdomain
      definitions.  Instead, initialize powerdomains based on one or more
      lists that are applicable to a particular SoC family, variant, and
      silicon revision.
      
      Gražvydas Ignotas <notasas@gmail.com> found and reported a bug in a
      related patch that also applied to this patch - thanks Gražvydas.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Gražvydas Ignotas <notasas@gmail.com>
      8179488a
    • P
      OMAP: powerdomain: split pwrdm_init() into two functions · 129c65ee
      Paul Walmsley 提交于
      In preparation for OMAP_CHIP() removal, split pwrdm_init() into three
      functions.  This allows some of them to be called multiple times: for
      example, pwrdm_register_pwrdms() can be called once to register
      powerdomains that are common to a group of SoCs, and once to register
      powerdomains that are specific to a single SoC.
      
      The appropriate order to call these functions - which is enforced
      by the code - is:
      
      1. pwrdm_register_platform_funcs()
      2. pwrdm_register_pwrdms() (can be called multiple times)
      3. pwrdm_complete_init()
      
      Convert the OMAP2, 3, and 4 powerdomain init code to use these new
      functions.
      
      While here, improve documentation, and increase CodingStyle
      conformance by shortening some local variable names.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      129c65ee
  6. 31 3月, 2011 1 次提交
  7. 08 3月, 2011 1 次提交
    • P
      OMAP2+: powerdomain: add pwrdm_can_ever_lose_context() · 694606c4
      Paul Walmsley 提交于
      Some drivers wish to know whether the device that they control can
      ever lose context, for example, when the device's enclosing
      powerdomain loses power.  They can use this information to determine
      whether it is necessary to save and restore device context, or whether
      it can be skipped.  Implement the powerdomain portion of this by
      adding the function pwrdm_can_ever_lose_context().  This is not for
      use directly from driver code, but instead is intended to be called
      from driver-subarch integration code (i.e., arch/arm/*omap* code).
      
      Currently, the result from this function should be passed into the
      driver code via struct platform_data, but at some point this should
      be part of some common or OMAP-specific device code.
      
      While here, update file copyrights.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      694606c4
  8. 26 2月, 2011 1 次提交
  9. 22 12月, 2010 6 次提交
  10. 09 10月, 2010 1 次提交
    • M
      OMAP2plus: Fix static function warnings · 04aeae77
      Manjunath Kondaiah G 提交于
      This patch fixes sparse warnings due non declarations of static functions.
      
      arch/arm/mach-omap2/timer-gp.c:115:12: warning: symbol 'omap2_gp_clockevent_set_gptimer' was not declared. Should it be static?
      arch/arm/mach-omap2/powerdomain.c:993:5: warning: symbol 'pwrdm_set_lowpwrstchange' was not declared. Should it be static?
      arch/arm/mach-omap2/board-flash.c:141:8: warning: symbol 'board_nand_init' was not declared. Should it be static?
      arch/arm/mach-omap2/board-n8x0.c:416:6: warning: symbol 'n8x0_mmc_slot1_cover_handler' was not declared. Should it be static?
      arch/arm/mach-omap2/board-n8x0.c:544:13: warning: symbol 'n8x0_mmc_init' was not declared. Should it be static?
      arch/arm/mach-omap2/board-rx51-peripherals.c:902:13: warning: symbol 'rx51_peripherals_init' was not declared. Should it be static?
      arch/arm/mach-omap2/board-rx51-video.c:107:13: warning: symbol 'rx51_video_mem_init' was not declared. Should it be static?
      arch/arm/mach-omap2/board-zoom-debugboard.c:155:12: warning: symbol 'zoom_debugboard_init' was not declared. Should it be static?
      arch/arm/mach-omap2/board-zoom-peripherals.c:280:13: warning: symbol 'zoom_peripherals_init' was not declared. Should it be static?
      arch/arm/mach-omap2/board-igep0020.c:110:13: warning: symbol 'igep2_flash_init' was not declared. Should it be static?
      arch/arm/mach-omap2/board-am3517evm.c:109:6: warning: symbol 'am3517_evm_ethernet_init' was not declared. Should it be static?
      drivers/mtd/onenand/omap2.c:577:5: warning: symbol 'omap2_onenand_rephase' was not declared. Should it be static?
      Signed-off-by: NManjunath Kondaiah G <manjugk@ti.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Nishanth Menon <nm@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      04aeae77
  11. 28 9月, 2010 1 次提交
  12. 21 5月, 2010 2 次提交
  13. 25 2月, 2010 2 次提交
  14. 27 1月, 2010 6 次提交
  15. 12 12月, 2009 3 次提交
  16. 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
  17. 06 10月, 2009 1 次提交
    • A
      OMAP3: PM: introduce a new powerdomain walk helper · ee894b18
      Artem Bityutskiy 提交于
      The 'pwrdm_for_each()' function walks powerdomains with a spinlock
      locked, so the the callbacks cannot do anything which may sleep.
      This patch introduces a 'pwrdm_for_each_nolock()' helper which does
      the same, but without the spinlock locked. This fixes the following
      lockdep warning:
      
      [    0.000000] WARNING: at kernel/lockdep.c:2460 lockdep_trace_alloc+0xac/0xec()
      [    0.000000] Modules linked in:
      (unwind_backtrace+0x0/0xdc) from [<c0045464>] (warn_slowpath_common+0x48/0x60)
      (warn_slowpath_common+0x48/0x60) from [<c0067dd4>] (lockdep_trace_alloc+0xac/0xec)
      (lockdep_trace_alloc+0xac/0xec) from [<c009da14>] (kmem_cache_alloc+0x1c/0xd0)
      (kmem_cache_alloc+0x1c/0xd0) from [<c00b21d8>] (d_alloc+0x1c/0x1a4)
      (d_alloc+0x1c/0x1a4) from [<c00a887c>] (__lookup_hash+0xd8/0x118)
      (__lookup_hash+0xd8/0x118) from [<c00a9f20>] (lookup_one_len+0x84/0x94)
      (lookup_one_len+0x84/0x94) from [<c010d12c>] (debugfs_create_file+0x8c/0x20c)
      (debugfs_create_file+0x8c/0x20c) from [<c010d320>] (debugfs_create_dir+0x1c/0x20)
      (debugfs_create_dir+0x1c/0x20) from [<c000e8cc>] (pwrdms_setup+0x60/0x90)
      (pwrdms_setup+0x60/0x90) from [<c002e010>] (pwrdm_for_each+0x30/0x80)
      (pwrdm_for_each+0x30/0x80) from [<c000e79c>] (pm_dbg_init+0x7c/0x14c)
      (pm_dbg_init+0x7c/0x14c) from [<c00232b4>] (do_one_initcall+0x5c/0x1b8)
      (do_one_initcall+0x5c/0x1b8) from [<c00083f8>] (kernel_init+0x90/0x10c)
      (kernel_init+0x90/0x10c) from [<c00242c4>] (kernel_thread_exit+0x0/0x8)
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      ee894b18
  18. 03 9月, 2009 3 次提交
  19. 09 2月, 2009 2 次提交
    • P
      [ARM] OMAP2/3 clockdomains: add CM and PRM clkdms · d37f1a13
      Paul Walmsley 提交于
      Add clockdomains for the CM and PRM.  These will ultimately replace the
      "wkup_clkdm", which appears to not actually exist on the hardware.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d37f1a13
    • P
      [ARM] OMAP: Fix sparse, checkpatch warnings in OMAP2/3 PRCM/PM code · fecb494b
      Paul Walmsley 提交于
      Fix sparse & checkpatch warnings in OMAP2/3 PRCM & PM code.  This mostly
      consists of:
      
      - converting pointer comparisons to integers in form similar to
        (ptr == 0) to the standard idiom (!ptr)
      
      - labeling a few non-static private functions as static
      
      - adding prototypes for *_init() functions in the appropriate header
        files, and getting rid of the corresponding open-coded extern
        prototypes in other C files
      
      - renaming the variable 'sclk' in mach-omap2/clock.c:omap2_get_apll_clkin
        to avoid shadowing an earlier declaration
      
      Clean up checkpatch issues.  This mostly involves:
      
      - converting some asm/ includes to linux/ includes
      
      - cleaning up some whitespace
      
      - getting rid of braces for conditionals with single following statements
      
      Also take care of a few odds and ends, including:
      
      - getting rid of unlikely() and likely() - none of this code is particularly
        fast-path code, so the performance impact seems slim; and some of those
        likely() and unlikely() indicators are probably not as accurate as the
        ARM's branch predictor
      
      - removing some superfluous casts
      
      linux-omap source commit is 347df59f5d20fdf905afbc26b1328b0e28a8a01b.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      fecb494b
  20. 22 8月, 2008 1 次提交
    • P
      [ARM] OMAP3 pwrdm: add hardware save-and-restore (SAR) support · 0b7cbfb5
      Paul Walmsley 提交于
      OMAP3430ES2+ introduces a new feature: optional powerdomain context
      hardware save-and-restore (SAR).  Currently, this feature only applies
      to USBHOST and USBTLL module context when the USBHOST or CORE
      powerdomains enter a low-power sleep state[1].  This feature avoids
      re-enumeration of USB devices when the powerdomains return from idle,
      which is potentially time-consuming.
      
      This patch adds support for enabling and disabling hardware
      save-and-restore to the powerdomain code.  Three new functions are
      added, pwrdm_enable_hdwr_sar(), pwrdm_disable_hdwr_sar(), and
      pwrdm_can_hdwr_sar().  A new struct powerdomain "flags" field is
      added, with a PWRDM_HAS_HDWR_SAR flag to indicate powerdomains with
      SAR support.
      
      Thanks to Jouni Högander <jouni.hogander@nokia.com> for reviewing an
      earlier version of these patches, and Richard Woodruff <r-woodruff2@ti.com>
      for clarifying the purpose of these bits.
      
      1.  For the USBHOST controller module, context loss occurs when the
          USBHOST powerdomain enters off-idle.  For USBTLL, context loss
          occurs either if CORE enters off-idle, or if the CORE logic is
          configured to turn off when CORE enters retention-idle (OSWR).
          34xx ES2 TRM 4.8.6.1.1, 4.8.6.1.2
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      0b7cbfb5