1. 22 9月, 2010 8 次提交
    • P
      OMAP: hwmod: improve documentation, clean up function names · 74ff3a68
      Paul Walmsley 提交于
      This patch:
      
      - adds more documentation to the hwmod code
      
      - fixes some documentation typos elsewhere in the file
      
      - changes the _sysc_*() function names to appear in (verb, noun) order,
        to match the rest of the function names.
      
      This patch should not result in any functional change.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      74ff3a68
    • B
      OMAP: hwmod: Fix softreset for modules with optional clocks · 96835af9
      Benoit Cousson 提交于
      Some modules (like GPIO, DSS...) require optionals clock to be enabled
      in order to complete the sofreset properly.
      Add a HWMOD_CONTROL_OPT_CLKS_IN_RESET flag to force all optional clocks
      to be enabled before reset. Disabled them once the reset is done.
      
      TODO:
      For the moment it is very hard to understand from the HW spec, which
      optional clock is needed and which one is not. So the current approach
      will enable all the optional clocks.
      Paul proposed a much finer approach that will allow to tag only the needed
      clock in the optional clock table. This might be doable as soon as we have
      a clear understanding of these dependencies.
      Reported-by: NPartha Basak <p-basak2@ti.com>
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      96835af9
    • B
      OMAP: hwmod: Fix softreset status check for some new OMAP4 IPs · 2cb06814
      Benoit Cousson 提交于
      In OMAP3 a specific SYSSTATUS register was used to get the softreset status.
      Starting in OMAP4, some IPs does not have SYSSTATUS register and instead
      use the SYSC softreset bit to provide the status.
      
      Other cases might exist:
      - Some IPs like McBSP does have a softreset control but no reset status.
      - Some IPs that represent subsystem, like the DSS, can contains
      a reset status without softreset control. The status is the aggregation
      of all the sub modules reset status.
      
      - Add a new flag (SYSC_HAS_RESET_STATUS) to identify the new programming model
      and replace the previous SYSS_MISSING, that was used to flag IP with
      softreset control but without the SYSSTATUS register, with a specific
      SYSS_HAS_RESET_STATUS flag.
      
      - MCSPI and MMC contains both programming models, so the legacy one
      will be prevented by removing the syss offset field that become useless.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      2cb06814
    • P
      OMAP: hwmod: add an hardreset API for use by other core code · aee48e3c
      Paul Walmsley 提交于
      Expose an hardreset API from hwmod in order to assert / deassert all the
      individual reset lines that belong to an hwmod.  This API is needed by
      some of the more complicated processor drivers, e.g., DSP/Bridge,
      Syslink, etc.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      aee48e3c
    • B
      OMAP: hwmod: Add hardreset management support · 5365efbe
      Benoît Cousson 提交于
      Most processor IPs does have a hardreset signal controlled by the PRM.
      This is different of the softreset used for local IP reset from the
      SYSCONFIG register.
      The granularity can be much finer than orginal HWMOD, for ex, the IVA
      hwmod contains 3 reset lines, the IPU 3 as well, the DSP 2...
      Since this granularity is needed by the driver, we have to ensure
      than one hwmod exist for each hardreset line.
      
      - Store reset lines as hwmod resources that a driver can query by name like
        an irq or sdma line.
      
      - Add two functions for asserting / deasserting reset lines in hwmods
        processor that require manual reset control.
      - Add one functions to get the current reset state.
      - If an hwmod contains only one line, an automatic assertion / de-assertion
        is done.
        -> de-assert the hardreset line only during enable from disable transition
        -> assert the hardreset line only during shutdown
      
      Note: The hwmods with hardreset line and HWMOD_INIT_NO_RESET flag must be
      kept in INITIALIZED state.
      They can be properly enabled only if the hardreset line is de-asserted
      before.
      
      For information here is the list of IPs with HW reset control
      on an OMAP4430 device:
      
      RM_DSP_RSTCTRL
        1,1,'RST2','RW','1','DSP - MMU, cache and slave interface reset control'
        0,0,'RST1','RW','1','DSP - DSP reset control'
      
      RM_IVA_RSTCTRL
        2,2,'RST3','RW','1','IVA logic and SL2 reset control'
        1,1,'RST2','RW','1','IVA Sequencer2 reset control'
        0,0,'RST1','RW','1','IVA sequencer1 reset control'
      
      RM_IPU_RSTCTRL
        2,2,'RST3','RW','1','IPU MMU and CACHE interface reset control.'
        1,1,'RST2','RW','1','IPU Cortex M3 CPU2  reset control.'
        0,0,'RST1','RW','1','IPU Cortex M3 CPU1  reset control.'
      
      PRM_RSTCTRL
        1,1,'RST_GLOBAL_COLD_SW','RW','0','Global COLD software reset control.'
        0,0,'RST_GLOBAL_WARM_SW','RW','0','Global WARM software reset control.'
      
      RM_CPU0_CPU0_RSTCTRL
      RM_CPU1_CPU1_RSTCTRL
        0,0,'RST','RW','0','Cortex A9 CPU0&1 warm local reset control'
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      [paul@pwsan.com: made the hardreset functions static; moved the register
       twiddling into prm*.c functions in previous patches; changed the
       function names to conform with hwmod practice]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      5365efbe
    • B
      OMAP4: prcm: Add temporarily helper functions for rmw and read inside the PRM · 16b04012
      Benoit Cousson 提交于
      Since OMAP4 is using an absolute address, the current PRM accessors
      are not useable.
      OMAP4 adaptation for these API are currently ongoing, so define temp
      version until the proper ones are defined.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Tested-by: NKevin Hilman <khilman@deeprootsystems.com>
      16b04012
    • K
      OMAP: hwmod: separate list locking and hwmod hardware locking · 12b1fdb4
      Kevin Hilman 提交于
      Currently omap_hwmod_mutex is being used to protect both the list
      access/modification and concurrent access to hwmod functions.  This
      patch separates these two types of locking.
      
      First, omap_hwmod_mutex is used only to protect access and
      modification of omap_hwmod_list.  Also cleaned up some comments
      referring to this mutex that are no longer needed.
      
      Then, for protecting concurrent access to hwmod functions, use a
      per-hwmod mutex.  This protects concurrent access to a single hwmod,
      but would allow concurrent access to different hwmods.
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      [paul@pwsan.com: added structure documentation; changed mutex variable
       name]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      12b1fdb4
    • B
      OMAP: hwmod: Rename dma_ch to dma_req · 9ee9fff9
      Benoit Cousson 提交于
      The dma request line attribute was named dma channel, which leads
      to confusion with the real dma channel definition.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Tested-by: NKevin Hilman <khilman@deeprootsystems.com>
      9ee9fff9
  2. 16 8月, 2010 1 次提交
  3. 11 8月, 2010 1 次提交
  4. 05 8月, 2010 1 次提交
  5. 04 8月, 2010 7 次提交
  6. 03 8月, 2010 3 次提交
  7. 02 8月, 2010 7 次提交
  8. 27 7月, 2010 8 次提交
    • R
    • 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
    • P
      OMAP: hwmod/device: add omap_{device,hwmod}_get_mpu_rt_va · db2a60bf
      Paul Walmsley 提交于
      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: NPaul Walmsley <paul@pwsan.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      db2a60bf
    • K
      OMAP: PM: create omap_devices for MPU, DSP, L3 · 6f88e9bc
      Kevin Hilman 提交于
      Create simple omap_devices for the main processors and busses.
      
      This is required to support the forth-coming device-based OPP
      approach, where OPPs are managed and tracked at the device level.
      
      Also, move these common PM init functions into a common_pm_init call
      that is called as a device_initcall().  The PM init is done at this level
      to ensure that the driver core is initialized before initialized.
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      [paul@pwsan.com: sparse warnings cleaned up; newly-created functions moved
       from mach-omap2/io.c to mach-omap2/pm.c; newly-created functions renamed
       to start with "omap2" rather than "omap"]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      6f88e9bc
    • P
      OMAP: hwmod: allow omap_hwmod_late_init() caller to skip module idle in _setup() · 97d60162
      Paul Walmsley 提交于
      On kernels that don't use the omap_device_enable() calls to enable
      devices, leave all on-chip devices enabled in hwmod _setup().
      Otherwise, accesses to those devices are likely to fail, crashing the
      system.  It's expected that kernels built without CONFIG_PM_RUNTIME
      will be the primary use-case for this.  This functionality is
      controlled by adding an extra parameter to omap_hwmod_late_init().
      
      This patch is based on the patch "OMAP: hwmod: don't auto-disable
      hwmod when !CONFIG_PM_RUNTIME" by Kevin Hilman
      <khilman@deeprootsystems.com>.
      
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      97d60162
    • K
      OMAP: hwmod: add non-locking versions of enable and idle functions · 84824022
      Kevin Hilman 提交于
      Some hwmods may need to be idled/enabled in atomic context, so
      non-locking versions of these functions are required.
      
      Most users should not need these and usage of theses should be
      controlled to understand why access is being done in atomic context.
      For this reason, the non-locking functions are only exposed at the
      hwmod level and not at the omap-device level.
      
      The use-case that led to the need for the non-locking versions is
      hwmods that are enabled/idled from within the core idle/suspend path.
      Since interrupts are already disabled here, the mutex-based locking in
      hwmod can sleep and will cause potential deadlocks.
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      84824022
    • P
      OMAP: clock: add kerneldoc for structures; move flags closer to structs · b3c1cff6
      Paul Walmsley 提交于
      Add kerneldoc for struct clk, struct clksel_rate, struct clksel.  Move
      flag macros for struct clk.flags and struct clksel_rate.flags closer
      to the structures.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      b3c1cff6
  9. 16 7月, 2010 1 次提交
  10. 05 7月, 2010 3 次提交