1. 22 12月, 2010 4 次提交
    • K
      OMAP: PM noop: implement context loss count for non-omap_devices · 6081dc34
      Kevin Hilman 提交于
      For devices which have not (yet) been converted to use omap_device,
      implement the context loss counter using the "brutal method" as
      originally proposed by Paul Walmsley[1].
      
      The dummy context loss counter is incremented every time it is
      checked, but only when off-mode is enabled.  When off-mode is
      disabled, the dummy counter stops incrementing.
      
      Tested on 36xx/Zoom3 using MMC driver, which is currently the
      only in-tree user of this API.
      
      This patch should be reverted after all devices are converted to using
      omap_device.
      
      [1] http://marc.info/?l=linux-omap&m=129176260000626&w=2Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      [paul@pwsan.com: fixed compile warning; fixed to compile on OMAP1]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      6081dc34
    • K
      OMAP: PM: implement context loss count APIs · c80705aa
      Kevin Hilman 提交于
      Implement OMAP PM layer omap_pm_get_dev_context_loss_count() API by
      creating similar APIs at the omap_device and omap_hwmod levels.  The
      omap_hwmod level call is the layer with access to the powerdomain
      core, so it is the place where the powerdomain is queried to get the
      context loss count.
      
      The new APIs return an unsigned value that can wrap as the
      context-loss count grows.  However, the wrapping is not important as
      the role of this function is to determine context loss by checking for
      any difference in subsequent calls to this function.
      
      Note that these APIs at each level can return zero when no context
      loss is detected, or on errors.  This is to avoid returning error
      codes which could potentially be mistaken for large context loss
      counters.
      
      NOTE: only works for devices which have been converted to use
            omap_device/omap_hwmod.
      
      Longer term, we could possibly remove this API from the OMAP PM layer,
      and instead directly use the omap_device level API.
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      c80705aa
    • P
      OMAP2+: powerdomain: move header file from plat-omap to mach-omap2 · 72e06d08
      Paul Walmsley 提交于
      The OMAP powerdomain code and data is all OMAP2+-specific.  This seems
      unlikely to change any time soon.  Move plat-omap/include/plat/powerdomain.h
      to mach-omap2/powerdomain.h.  The primary point of doing this is to remove
      the temptation for unrelated upper-layer code to access powerdomain code
      and data directly.
      
      As part of this process, remove the references to powerdomain data
      from the GPIO "driver" and the OMAP PM no-op layer, both in plat-omap.
      Change the DSPBridge code to point to the new location for the
      powerdomain headers.  The DSPBridge code should not be including the
      powerdomain headers; these should be removed.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      72e06d08
    • K
      OMAP3: remove OPP interfaces from OMAP PM layer · 53da4ce2
      Kevin Hilman 提交于
      With new OPP layer, OPP users will access OPP API directly instead of
      using OMAP PM layer, so remove all notions of OPPs from the OMAP PM
      layer.
      Acked-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      53da4ce2
  2. 27 7月, 2010 2 次提交
    • P
      OMAP: PM constraints: add omap_pm_set_min_clk_rate() · fb8ce14c
      Paul Walmsley 提交于
      Add omap_pm_set_min_clk_rate().  This constraint is meant for use by
      device drivers to translate a certain device-specific performance
      constraint (e.g., "minimum polygons per second") to a clock rate for
      the driver's device, given the driver's intimate knowledge of the
      device hardware (e.g., device type, device hardware revision, firmware
      revision, etc.)  From a general PM core perspective, clock rate is
      probably the closest general analog to "performance" that is
      available, but the exact mapping from a use-case-specific performance
      constraint to clock rate must be done by the driver.  Drivers intended for
      upstream merging shouldn't hardcode specific clock rates in their code
      without basing those rates on some performance criteria requested through
      the driver's subsystem (ideally, from userspace).
      
      Imre Deak <imre.deak@nokia.com> described the need and use-case for
      this constraint, and discussed the implementation - thanks, Imre.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Imre Deak <imre.deak@nokia.com>
      fb8ce14c
    • P
      OMAP: PM constraints: add return values; add requesting device param to... · 564889c1
      Paul Walmsley 提交于
      OMAP: PM constraints: add return values; add requesting device param to omap_pm_set_max_dev_wakeup_lat()
      
      Add return values to the PM constraint functions.  This allows the PM
      core to provide feedback to the caller if a constraint is not
      possible.  Update the one upstream user of omap_pm_set_max_mpu_wakeup_lat()
      to add a compatibility wrapper, needed until the driver is changed.
      
      Update some of the documentation to conform more closely to kerneldoc style.
      
      Add an additional device parameter to omap_pm_set_max_dev_wakeup_lat()
      to identify the device requesting the constraint.  This is so repeated calls
      to omap_pm_set_max_dev_wakeup_lat() with the same requesting device can
      override the device's previously-set constraint.  Also, it allows the PM
      core to make a decision as to whether or not the constraint should be
      satisfied, based on the caller's identity.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      564889c1
  3. 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
  4. 04 9月, 2009 1 次提交
    • P
      OMAP2/3 PM: create the OMAP PM interface and add a default OMAP PM no-op layer · c0407a96
      Paul Walmsley 提交于
      The interface provides device drivers, CPUFreq, and DSPBridge with a
      means of controlling OMAP power management parameters that are not yet
      supported by the Linux PM PMQoS interface.  Copious documentation is
      in the patch in Documentation/arm/OMAP/omap_pm and the interface
      header file, arch/arm/plat-omap/include/mach/omap-pm.h.
      
      Thanks to Rajendra Nayak <rnayak@ti.com> for adding CORE (VDD2) OPP
      support and moving the OPP table initialization earlier in the event
      that the clock code needs them.  Thanks to Tero Kristo
      <tero.kristo@nokia.com> for fixing the parameter check in
      omap_pm_set_min_bus_tput().  Jouni signed off on Tero's patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NTero Kristo <tero.kristo@nokia.com>
      Signed-off-by: NJouni Högander <jouni.hogander@nokia.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Igor Stoppa <igor.stoppa@nokia.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Anand Sawant <sawant@ti.com>
      Cc: Sakari Poussa <sakari.poussa@nokia.com>
      Cc: Veeramanikandan Raju <veera@ti.com>
      Cc: Karthik Dasu <karthik-dp@ti.com>
      c0407a96