An error occurred fetching the project authors.
  1. 17 Oct, 2012 1 commit
  2. 23 Sep, 2012 1 commit
  3. 12 Sep, 2012 1 commit
  4. 05 Mar, 2012 1 commit
    • Kevin Hilman's avatar
      ARM: OMAP: omap_device: remove omap_device_parent · 3ec2decb
      Kevin Hilman authored
      Currently all omap_devices are forced to have the dummy device
      'omap_device_parent' as a parent.  This was used to distinguish
      omap_devices from "normal" platform_devices in the OMAP PM core code.
      
      Now that we implement the PM core using PM domains, this is no longer
      needed, and is removed.
      
      This also frees up omap_devices to have a more complex parent/child
      relationships that model actual device relationships.
      
      The only in-tree user of omap_device_parent was the OMAP PM layer to
      handle lost-context count for omap_devices.  That is now converted to
      use the presence of the omap_device_pm_domain instead.
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      3ec2decb
  5. 20 Feb, 2012 1 commit
    • Ohad Ben-Cohen's avatar
      ARM: OMAP: omap_device: Expose omap_device_{alloc, delete, register} · 993e4fbd
      Ohad Ben-Cohen authored
      Expose omap_device_{alloc, delete, register} so we can use them outside
      of omap_device.c.
      
      This approach allows users, which need to manipulate an archdata member
      of a device before it is registered, to do so. This is also useful
      for users who have their devices created very early so they can be used
      at ->reserve() time to reserve CMA memory.
      
      The immediate use case for this is to set the private iommu archdata
      member, which binds a device to its associated iommu controller.
      This way, generic code will be able to attach omap devices to their
      iommus, without calling any omap-specific API.
      
      With this in hand, we can further clean the existing mainline OMAP iommu
      driver and its mainline users, and focus on generic IOMMU approaches
      for future users (rpmsg/remoteproc and the upcoming generic DMA API).
      
      This patch is still considered an interim solution until DT fully materializes
      for omap; at that point, this functionality will be removed as DT will
      take care of creating the devices and configuring them correctly.
      
      Tested on OMAP4 with a generic rpmsg/remoteproc that doesn't use any
      omap-specific IOMMU API anymore.
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      993e4fbd
  6. 05 Nov, 2011 1 commit
  7. 04 Oct, 2011 1 commit
    • Nishanth Menon's avatar
      ARM: OMAP: omap_device: Add omap_device_get_by_hwmod_name · 1f8a7d52
      Nishanth Menon authored
      An API which translates a standard hwmod name to corresponding
      platform_device is useful for drivers when they need to look up the
      device associated with a hwmod name to map back into the device
      structure pointers. These ideally should be used by drivers in
      mach directory. Using a generic hwmod name like "gpu" instead of
      the actual device name which could change in the future, allows
      us to:
      a) Could in effect help replace apis such as omap2_get_mpuss_device,
      omap2_get_iva_device, omap2_get_l3_device, omap4_get_dsp_device,
      etc..
      b) Scale to more devices rather than be restricted to named functions
      c) Simplify driver's platform_data from passing additional fields
      all doing the same thing with different function pointer names
      just for accessing a different device name.
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      [b-cousson@ti.com: Adapt it to the new pdev pointer inside od,
      remove the unneeded helpers, and fold the next patch here]
      Signed-off-by: default avatarBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      1f8a7d52
  8. 15 Sep, 2011 4 commits
  9. 12 Jul, 2011 2 commits
    • Kevin Hilman's avatar
      OMAP: PM: omap_device: add API to disable idle on suspend · 80c6d1e6
      Kevin Hilman authored
      By default, omap_devices will be automatically idled on suspend
      (and re-enabled on resume.)  Using this new API, device init code
      can disable this feature if desired.
      
      NOTE: any driver/device that has been runtime PM converted should
            not be using this API.
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      80c6d1e6
    • Kevin Hilman's avatar
      OMAP: PM: omap_device: add system PM methods for PM domain handling · c03f007a
      Kevin Hilman authored
      In the omap_device PM domain callbacks, use omap_device idle/enable to
      automatically manage device idle states during system suspend/resume.
      
      If an omap_device has not already been runtime suspended, the
      ->suspend_noirq() method of the PM domain will use omap_device_idle()
      to idle the HW after calling the driver's ->runtime_suspend()
      callback.  Similarily, upon resume, if the device was suspended during
      ->suspend_noirq(), the ->resume_noirq() method of the PM domain will
      use omap_device_enable() to enable the HW and then call the driver's
      ->runtime_resume() callback.
      
      If a device has already been runtime suspended, the noirq methods of
      the PM domain leave the device runtime suspended by default.
      
      However, if a driver needs to runtime resume a device during suspend
      (for example, to change its wakeup settings), it may do so using
      pm_runtime_get* in it's ->suspend() callback.
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      c03f007a
  10. 22 Dec, 2010 1 commit
    • Kevin Hilman's avatar
      OMAP: PM: implement context loss count APIs · c80705aa
      Kevin Hilman authored
      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: default avatarKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      c80705aa
  11. 24 Sep, 2010 2 commits
    • Kevin Hilman's avatar
      OMAP: omap_device: make all devices a child of a new parent device · 0d5e8252
      Kevin Hilman authored
      In order to help differentiate omap_devices from normal
      platform_devices, make them all a parent of a new common parent
      device.
      
      Then, in order to determine if a platform_device is also an
      omap_device, checking the parent is all that is needed.
      
      Users of this feature are the runtime PM core for OMAP, where we need
      to know if a device being passed in is an omap_device or not in order
      to know whether to call the omap_device API with it.
      
      In addition, all omap_devices will now show up under /sys/devices/omap
      instead of /sys/devices/platform
      Acked-by: default avatarPaul Walmsley <paul@pwsan.com>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      0d5e8252
    • Kevin Hilman's avatar
      Revert "OMAP: omap_device: add omap_device_is_valid()" · a1ed40cb
      Kevin Hilman authored
      This reverts commit 0007122a.
      
      The dereference method of checking for a valid omap_device when
      wrapping a platform_device is rather unsafe and dangerous.
      
      Instead, a better way of checking for a valid omap-device is
      to use a common parent device for all omap_devices, then a check
      can simply be made using the device parent.  The only user of this
      API was the initial version of the runtime PM core for OMAP.  This
      has now been switched to check device parent, so there are no more
      users of this API.
      Acked-by: default avatarPaul Walmsley <paul@pwsan.com>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      a1ed40cb
  12. 26 Jul, 2010 1 commit
    • Paul Walmsley's avatar
      OMAP: hwmod/device: add omap_{device,hwmod}_get_mpu_rt_va · db2a60bf
      Paul Walmsley authored
      Add omap_device_get_mpu_rt_va().  This is intended to be used by
      device drivers (currently, via a struct platform_data function
      pointer) to retrieve their corresponding device's virtual base address
      that the MPU should use to access the device.  This is needed because
      the omap_hwmod code does its own ioremap(), in order to gain access to
      the module's OCP_SYSCONFIG register.
      
      Add omap_hwmod_get_mpu_rt_va().  omap_device_get_mpu_rt_va() calls this
      function to do the real work.
      
      While here, rename struct omap_hwmod._rt_va to struct
      omap_hwmod._mpu_rt_va, to reinforce that it refers to the MPU's
      register target virtual address base (as opposed to, for example, the
      L3's).
      
      In the future, this belongs as a function in an omap_bus, so it is not
      necessary to call this through a platform_data function pointer.
      
      The use-case for this function was originally presented by Santosh
      Shilimkar <santosh.shilimkar@ti.com>.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      db2a60bf
  13. 24 Feb, 2010 2 commits
    • Thara Gopinath's avatar
      OMAP: HWMOD: Add support for early device register into omap device layer · c23a97d3
      Thara Gopinath authored
      This patch adds support in omap device layer to register devices
      as early platform devices. Certain devices needed during system boot up
      like timers, gpio etc can be registered as early devices. This will
      allow for them to be probed very early on during system boot up.
      This patch adds a parameter is_early_device in omap_device_build.
      Depending on this parameter a call to early_platform_add_devices
      or platform_register_device is made.
      Signed-off-by: default avatarThara Gopinath <thara@ti.com>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      c23a97d3
    • Kevin Hilman's avatar
      OMAP: omap_device: add omap_device_is_valid() · 0007122a
      Kevin Hilman authored
      The omap_device struct contains a 'struct platform_device'.  Normally,
      converting a platform_device pointer to an omap_device pointer
      consists of simply doing a container_of(), as is done currently by the
      to_omap_device() macro.
      
      However, if this is attempted when using platform_device that has not
      been created as part of the omap_device creation, the container_of()
      will point to a memory location before the platform_device pointer
      which will contain random data.
      
      Therefore, we need a way to detect valid omap_device pointers.  This
      patch solves this by using the simple magic number approach.
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      0007122a
  14. 27 Jan, 2010 1 commit
    • Kevin Hilman's avatar
      OMAP: omap_device: optionally auto-adjust device activate/deactivate latencies · 9799aca2
      Kevin Hilman authored
      First, this patch adds new worst-case latency values to the
      omap_device_pm_latency struct.  Here the worst-case measured latencies
      for the activate and deactivate hooks are stored.
      
      In addition, add an option to auto-adjust the latency values used for
      device activate/deactivate.
      
      By setting a new 'OMAP_DEVICE_LATENCY_AUTO_ADJUST' flag in the
      omap_device_pm_latency struct, the omap_device layer automatically
      adjusts the activate/deactivate latencies to the worst-case measured
      values.
      
      Anytime a new worst-case value is found, it is printed to the console.
      Here is an example log during boot using UART2 s an example.  After
      boot, the OPP is manually changed to the 125MHz OPP:
      
      [...]
      Freeing init memory: 128K
      omap_device: serial8250.2: new worst case deactivate latency 0: 30517
      omap_device: serial8250.2: new worst case activate latency 0: 30517
      omap_device: serial8250.2: new worst case activate latency 0: 218139648
      omap_device: serial8250.2: new worst case deactivate latency 0: 61035
      omap_device: serial8250.2: new worst case activate latency 0: 278076171
      omap_device: serial8250.2: new worst case activate latency 0: 298614501
      omap_device: serial8250.2: new worst case activate latency 0: 327331542
      
      / # echo 125000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
      
      omap_device: serial8250.2: new worst case deactivate latency 0: 91552
      
      Motivation: this can be used as a technique to automatically determine
      the worst case latency values.  The current method of printing a
      warning on every violation is too noisy to actually interact the
      console in order to set low OPP to discover latencies.
      
      Another motivation for this patch is that the activate/deactivate
      latenices can vary depending on the idlemode of the device.  While
      working on the UARTs, I noticed that when using no-idle, the activate
      latencies were as high as several hundred msecs as shown above.  When
      the UARTs are in smart-idle, the max latency is well under 100 usecs.
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      9799aca2
  15. 12 Dec, 2009 2 commits
  16. 20 Oct, 2009 1 commit
    • Tony Lindgren's avatar
      omap: headers: Move remaining headers from include/mach to include/plat · ce491cf8
      Tony Lindgren authored
      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: default avatarTony Lindgren <tony@atomide.com>
      ce491cf8
  17. 03 Sep, 2009 1 commit
    • Paul Walmsley's avatar
      OMAP2/3/4 core: create omap_device layer · b04b65ab
      Paul Walmsley authored
      The omap_device code provides a mapping of omap_hwmod structures into
      the platform_device system, and includes some details on external
      (board-level) integration.  This allows drivers to enable, idle, and
      shutdown on-chip device resources, including clocks, regulators, etc.
      The resources enabled and idled are dependent on the device's maximum
      wakeup latency constraint (if present).
      
      At the moment, omap_device functions are intended to be called from
      platform_data function pointers.  Ideally in the future these
      functions will be called from either subarchitecture-specific
      platform_data activate, deactivate functions, or via an custom
      bus/device type for OMAP.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Vikram Pandita <vikram.pandita@ti.com>
      Cc: Sakari Poussa <sakari.poussa@nokia.com>
      Cc: Anand Sawant <sawant@ti.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Eric Thomas <ethomas@ti.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      b04b65ab