1. 09 7月, 2012 1 次提交
  2. 06 7月, 2012 2 次提交
    • T
      ARM: OMAP2+: Fix mismerge for omap_hwmod_get_main_clk() API · 68c9a95e
      Tony Lindgren 提交于
      Commit ac5b0ea3 (Merge tag 'omap-devel-f-for-3.6'...) had a merge
      conflict that somehow got incorrecly resolved in a lossy way for
      commit bed9d1bb (ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API).
      Fix the issue by applying the missing pieces.
      Reported-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      68c9a95e
    • P
      ARM: OMAP2+: hwmod code/clockdomain data: fix 32K sync timer · 006c7f18
      Paul Walmsley 提交于
      Kevin discovered that commit c8d82ff6
      ("ARM: OMAP2/3: hwmod data: Add 32k-sync timer data to hwmod
      database") broke CORE idle on OMAP3.  This prevents device low power
      states.
      
      The root cause is that the 32K sync timer IP block does not support
      smart-idle mode[1], and so the hwmod code keeps the IP block in
      no-idle mode while it is active.  This in turn prevents the WKUP
      clockdomain from transitioning to idle.  There is a hardcoded sleep
      dependency that prevents the CORE_L3 and CORE_CM clockdomains from
      transitioning to idle when the WKUP clockdomain is active[2], so the
      chip cannot enter any device low power states.
      
      It turns out that there is no need to take the 32k sync timer out of
      idle.  The IP block itself probably does not have any native idle
      handling at all, due to its simplicity.  Furthermore, the PRCM will
      never request target idle for this IP block while the kernel is
      running, due to the sleep dependency that prevents the WKUP
      clockdomain from idling while the CORE_L3 clockdomain is active.  So
      we can safely leave the 32k sync timer in target-force-idle mode, even
      while we continue to access it.
      
      This workaround is implemented by defining a new clockdomain flag,
      CLKDM_ACTIVE_WITH_MPU, that indicates that the clockdomain is
      guaranteed to be active whenever the MPU is inactive.  If an IP
      block's main functional clock exists inside this clockdomain, and the
      IP block does not support smart-idle modes, then the hwmod code will
      place the IP block into target force-idle mode even when enabled.  The
      WKUP clockdomains on OMAP3/4 are marked with this flag.  (On OMAP2xxx,
      no OCP header existed on the 32k sync timer.)   Other clockdomains also
      should be marked with this flag, but those changes are deferred until
      a later merge window, to create a minimal fix.
      
      Another theoretically clean fix for this problem would be to implement
      PM runtime-based control for 32k sync timer accesses.  These PM
      runtime calls would need to located in a custom clocksource, since the
      32k sync timer is currently used as an MMIO clocksource.  But in
      practice, there would be little benefit to doing so; and there would
      be some cost, due to the addition of unnecessary lines of code and the
      additional CPU overhead of the PM runtime and hwmod code - unnecessary
      in this case.
      
      Another possible fix would have been to modify the pm34xx.c code to
      force the IP block idle before entering WFI.  But this would not have
      been an acceptable approach: we are trying to remove this type of
      centralized IP block idle control from the PM code.
      
      This patch is a collaboration between Kevin Hilman <khilman@ti.com>
      and Paul Walmsley <paul@pwsan.com>.
      
      Thanks to Vaibhav Hiremath <hvaibhav@ti.com> for providing comments on
      an earlier version of this patch.  Thanks to Tero Kristo
      <t-kristo@ti.com> for identifying a bug in an earlier version of this
      patch.  Thanks to Benoît Cousson <b-cousson@ti.com> for identifying
      some bugs in several versions of this patch and for implementation
      comments.
      
      References:
      
      1. Table 16-96 "REG_32KSYNCNT_SYSCONFIG" of the OMAP34xx TRM Rev. ZU
         (SWPU223U), available from:
         http://www.ti.com/pdfs/wtbu/OMAP34x_ES3.1.x_PUBLIC_TRM_vzU.zip
      
      2. Table 4-72 "Sleep Dependencies" of the OMAP34xx TRM Rev. ZU
         (SWPU223U)
      
      3. ibid.
      
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Vaibhav Hiremath <hvaibhav@ti.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      006c7f18
  3. 04 7月, 2012 2 次提交
    • K
      ARM: OMAP2+: hwmod code: add support to set dmadisable in hwmod framework · 6668546f
      Kishon Vijay Abraham I 提交于
      The DMADISABLE bit is a semi-automatic bit present in sysconfig register
      of some modules. When the DMA must perform read/write accesses, the
      DMADISABLE bit is cleared by the hardware. But when the DMA must stop for power
      management, software must set the DMADISABLE bit back to 1.
      
      In cases where the ROMCODE/BOOTLOADER uses dma, the hardware clears the
      DMADISABLE bit (but the romcode/bootloader might not set it back to 1).
      In order for the kernel to start in a clean state, it is
      necessary for the kernel to set DMADISABLE bit back to 1 (irrespective
      of whether it's been set to 1 in romcode or bootloader).
      
      During _reset of the (hwmod)device, the DMADISABLE bit is set so that it
      does not prevent idling of the system. (NOTE: having DMADISABLE to 0,
      prevents the system to idle)
      
      DMADISABLE bit is present in usbotgss module of omap5.
      
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
      [paul@pwsan.com: updated to apply; fixed checkpatch warnings]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      6668546f
    • T
      ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API · bed9d1bb
      Tarun Kanti DebBarma 提交于
      Add an API to get main clock name associated with a given @oh.
      This will avoid the need to construct fclk names during early
      initialization in order to get fclk handle using clk_get().
      Signed-off-by: NTarun Kanti DebBarma <tarun.kanti@ti.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      bed9d1bb
  4. 22 6月, 2012 2 次提交
  5. 20 6月, 2012 1 次提交
  6. 19 6月, 2012 6 次提交
  7. 19 4月, 2012 12 次提交
    • P
      ARM: OMAP: hwmod: remove code support for direct hwmod registration · 11cd4b94
      Paul Walmsley 提交于
      Now that the data has been converted to use interface registration, we
      can remove the (now unused) direct hwmod registration code.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      11cd4b94
    • P
      ARM: OMAP2+: hwmod: add support for link registration · 2221b5cd
      Paul Walmsley 提交于
      Add support for direct IP block interconnect ("link") registration to
      the hwmod code via a new function, omap_hwmod_register_links().  This
      will replace direct registration of hwmods, and a subsequent patch
      will remove omap_hwmod_register().
      
      This change will allow a subsequent patch to remove the hwmod data
      link arrays.  This will reduce the size of the hwmod static data and
      also make it easier to generate the data files.  It will also make it
      possible to share some of the struct omap_hwmod records across
      multiple SoCs, since the link array pointers will be removed from the
      struct omap_hwmod.
      
      The downside is that boot time will increase.  Minimizing boot time
      was the reason why the link arrays were originally introduced.
      Removing them will require extra computation during boot to allocate
      memory and associate IP blocks with their interconnects.  However,
      since the current kernel development focus is on reducing the number
      of lines in arch/arm/mach-omap2/, boot time impact is now seemingly
      considered a lower priority.
      
      This patch contains additional complexity to reduce the number of
      memory allocations required for this change.  This reduces the boot
      time impact: total hwmod link registration time was ~ 2655
      microseconds with a simple allocation strategy, but is now ~ 549
      microseconds[1] with the approach taken by this patch.
      
      1. Measured on a BeagleBoard 35xx @ 500MHz MPU/333 MHz CORE, average
         of 7 samples.  Total uncertainty is +/- 61 microseconds.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      2221b5cd
    • P
      ARM: OMAP2+: hwmod: consolidate finding the MPU port index and storing it · 24dbc213
      Paul Walmsley 提交于
      An IP block's MPU interface port only needs to be found once.  The result
      can be cached to speed further lookups.  This patch consolidates these
      two steps into a single function.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      24dbc213
    • P
      ARM: OMAP2+: hwmod: add function to iterate over struct omap_hwmod_ocp_if · 5d95dde7
      Paul Walmsley 提交于
      To reduce the number of lines of data in the OMAP portion of the Linux
      code base, subsequent patches will remove the lists of hwmod
      interconnect links from the static hwmod data.  These lists will be
      built dynamically during boot.  To ease this transition, this patch
      centralizes the way that interconnect links are iterated into a single
      function, _fetch_next_ocp_if().
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      5d95dde7
    • P
      ARM: OMAP2+: hwmod: add _find_mpu_rt_port() · 2d6141ba
      Paul Walmsley 提交于
      Most IP blocks on the OMAP SoC have an interconnect link that is
      intended to be used by the MPU to communicate with the IP block.
      Several parts of the hwmod code need to be able to identify this link.
      Currently, this is open-coded.  However, future patches will change
      the way that interconnect links are represented and will make
      identifying the link more complex.  So to avoid code duplication, this
      patch centralizes the MPU port link identification code into a new
      function, _find_mpu_rt_port().
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      2d6141ba
    • P
      ARM: OMAP2+: hwmod: add omap_hwmod_get_resource_byname() · 5e8370f1
      Paul Walmsley 提交于
      The timer integration code pokes around in hwmod data structures.
      Those data structures are about to change.  Define a function,
      omap_hwmod_get_resource_byname(), for the timer integration code to
      use instead.
      
      The original patch has been changed to use struct resource by Tony's
      request, although the caller of this function should not be a driver._
      Platform drivers should get their data through the regular platform_*
      functions; DT drivers through the appropriate of_* functions.  This a
      function is only for use by OMAP core code in arch/arm/*omap*.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      5e8370f1
    • P
      ARM: OMAP2+: hwmod: provide a function to return the address space of the MPU RT · c9aafd23
      Paul Walmsley 提交于
      A subsequent patch will need to know the struct omap_hwmod_addr_space
      record corresponding to the module's register target, used by the MPU.
      So, convert _find_mpu_rt_base() into _find_mpu_rt_addr_space().  Then
      modify its sole current user, _populate_mpu_rt_base(), to extract the
      MPU RT base address itself from the struct omap_hwmod_addr_space record.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      c9aafd23
    • P
      ARM: OMAP2+: hwmod: revise hardreset behavior · 747834ab
      Paul Walmsley 提交于
      Change the way that hardreset lines are handled by the hwmod code.
      Hardreset lines are generally associated with initiator IP blocks.
      Prior to this change, the hwmod code expected to control hardreset
      lines itself, asserting them on shutdown and deasserting them upon
      enable.  But driver authors inside TI have commented to us that their
      drivers require direct control over these lines.  Unfortunately, these
      drivers haven't been posted publicly yet, so it's hard to determine
      exactly what is needed, a priori.  This change attempts to set forth
      some reasonable semantics that should be an improvement over the
      current code.
      
      The semantics implemented by this patch are as follows:
      
      - If the hwmod is not marked with HWMOD_INIT_NO_RESET, then assert all
        associated hardreset lines during IP block setup.  This is intended
        to place the IP blocks into a known state that will not interfere
        with other devices during kernel boot.
      
      - IP blocks with hardreset lines will not be automatically enabled or
        idled during setup.  Instead, they will be left in the INITIALIZED
        state.
      
      - When the hwmod code is asked to enable, idle, or shutdown an IP
        block with asserted hardreset lines, the hwmod code will do nothing.
        The driver integration code must do the remaining work needed to
        control these IP blocks.  Once this driver integration code is posted
        to the lists, hopefully we can consolidate it and move it inside the
        hwmod code.
      
      Custom reset functions for IP blocks with hardreset lines still should
      be supported and are strongly endorsed.  It is intended that every
      subsystem with hardreset lines should have a custom reset function
      that can place their subsystem into quiescent idle with the hardreset
      lines deasserted.
      
      This reverts most of commit 5365efbe
      ("OMAP: hwmod: Add hardreset management support").  Later code
      reorganizations caused the sequencing of the code from this patch to
      be changed, anyway.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      747834ab
    • P
      ARM: OMAP2+: hwmod: reorganize and document the reset and configuration process · 64813c3f
      Paul Walmsley 提交于
      Reorganize the code involved in resetting and configuring an IP block
      to make it easier to read and maintain.  This involves improving
      documentation, splitting some large functions up into smaller ones to
      better conform with Documentation/CodingStyle, and removing some
      unnecessary code.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      64813c3f
    • P
      ARM: OMAP2+: hwmod: reorganize and document the initialization process · 381d033a
      Paul Walmsley 提交于
      Reorganize the code involved in initializing the internal data for
      each hwmod to make it easier to read and maintain.  This involves
      improving documentation and removing some duplicated and unnecessary
      code.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      381d033a
    • P
      ARM: OMAP2+: hwmod: revise the IP block reset process · 30e105c0
      Paul Walmsley 提交于
      Revise the IP block reset process.  This patch ensures that the
      OCP_SYSCONFIG registers are reloaded after a custom reset.  Since
      OCP_SYSCONFIG bits are cleared during reset, they should be
      reprogrammed unless the IP block is being left in reset.  (The only IP
      blocks that are left in reset are IP blocks with hardreset lines and
      no custom reset function.)  If the IP block is left in reset, then it
      is inaccessible to the MPU, and an access to the OCP_SYSCONFIG
      register will cause an abort.
      
      This version incorporates comments from Omar Ramirez Luna
      <omar.ramirez@ti.com> to skip the OCP_SYSCONFIG access after asserting
      hardreset lines.  This allows the MMU (IOMMU) IP block, which has
      both hardreset lines and an OCP_SYSCONFIG register.
      
      Also, ignore _ocp_softreset() errors if the IP block doesn't include a
      softreset bit.  This is needed since a subsequent patch will start
      taking the return value of the _reset() function seriously.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      30e105c0
    • P
      ARM: OMAP2+: hwmod: control all hardreset lines attached to a hwmod · 9c8b0ec7
      Paul Walmsley 提交于
      Parts of the hwmod code test to see if a module has one and only one
      hardreset line before taking an action.  It seems more appropriate
      to control all hardreset lines associated with a hwmod, not just one.
      
      It so happens that with the current hwmod data, this patch will not
      change any behavior, since hwmods with hardreset lines have only one
      hardreset line associated with them, and 'pseudo-hwmods' are used to
      handle the other hardreset lines.  But future hwmod data patches to
      remove the pseudo-hwmods will change this.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      9c8b0ec7
  8. 13 4月, 2012 2 次提交
  9. 05 4月, 2012 3 次提交
  10. 12 3月, 2012 1 次提交
  11. 13 2月, 2012 1 次提交
  12. 17 12月, 2011 4 次提交
    • B
      ARM: OMAP4: hwmod: Don't wait for the idle status if modulemode is not supported · bfc141e3
      Benoit Cousson 提交于
      If the module does not have any modulemode, the _disable_module function
      will do nothing. There is then no point waiting for a idle status change.
      
      It will remove the following warnings.
      
      [    0.331848] omap_hwmod: dmm: _wait_target_disable failed
      [    0.339935] omap_hwmod: emif_fw: _wait_target_disable failed
      [    0.348358] omap_hwmod: l3_main_1: _wait_target_disable failed
      [    0.356964] omap_hwmod: l3_main_2: _wait_target_disable failed
      [    0.365600] omap_hwmod: l4_abe: _wait_target_disable failed
      [    0.373931] omap_hwmod: l4_cfg: _wait_target_disable failed
      [    0.382263] omap_hwmod: l4_per: _wait_target_disable failed
      [    0.391113] omap_hwmod: l4_wkup: _wait_target_disable failed
      [    0.399536] omap_hwmod: dma_system: _wait_target_disable failed
      [    0.408325] omap_hwmod: dss_core: _wait_target_disable failed
      [    0.416839] omap_hwmod: dss_dispc: _wait_target_disable failed
      [    0.425445] omap_hwmod: dss_dsi1: _wait_target_disable failed
      [    0.433990] omap_hwmod: dss_dsi2: _wait_target_disable failed
      [    0.442504] omap_hwmod: dss_hdmi: _wait_target_disable failed
      [    0.451019] omap_hwmod: dss_rfbi: _wait_target_disable failed
      [    0.459564] omap_hwmod: dss_venc: _wait_target_disable failed
      [    0.489471] omap_hwmod: mailbox: _wait_target_disable failed
      [    0.505920] omap_hwmod: spinlock: _wait_target_disable failed
      
      Note: For such module, the state is managed automatically by HW according
      to clock domain transition. It is then not possible to wait for idle even
      later in the _idle function since the status will change at clock domain
      boundary.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: renamed fns to indicate that they are OMAP4-only; moved
       _wait_target_disable() into _disable_module(), removing duplicate code]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      bfc141e3
    • R
      ARM: OMAP2+: hwmod: Add a new flag to handle hwmods left enabled at init · aacf0941
      Rajendra Nayak 提交于
      An hwmod with a 'HWMOD_INIT_NO_IDLE' flag set, is left in
      enabled state by the hwmod framework post the initial setup.
      Once a real user of the device (a driver) tries to enable it
      at a later point, the hwmod framework throws a WARN() about
      the device being already in enabled state.
      
      Fix this by introducing a new internal flag '_HWMOD_SKIP_ENABLE' to
      identify such devices/hwmods. When the device/hwmod is requested to be
      enabled (the first time) by its driver/user, nothing except the
      mux-enable is needed. The mux data is board specific and is
      unavailable during initial enable() of the device, done by the
      framework as part of setup().
      
      A good example of a such a device is an UART used as debug console.
      The UART module needs to be kept enabled through the boot, until the
      UART driver takes control of it, for debug prints to appear on
      the console.
      Acked-by: NKevin Hilman <khilman@ti.com>
      Acked-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: use a flag rather than a state; updated commit message;
       edited some documentation]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      aacf0941
    • T
      ARM: OMAP: hwmod: add support for selecting mpu_irq for each wakeup pad · abc2d545
      Tero Kristo 提交于
      By default all registered pads will trigger mpu_irqs[0]. Now there is
      an API for selecting used mpu_irq on pad basis, which can be used to
      trigger different irq handlers for different pads in the same hwmod.
      Each pad that requires its interrupt to be re-routed this way must
      have a separate call to omap_hwmod_pad_route_irq(hwmod, pad, irq).
      Signed-off-by: NTero Kristo <t-kristo@ti.com>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      [paul@pwsan.com: moved fn to omap_hwmod.c; separated fn from mux scan_wakeups
       changes; added kerneldoc]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      abc2d545
    • G
      ARM: OMAP2+: hwmod: Add API to enable IO ring wakeup · eceec009
      Govindraj R 提交于
      Add API to enable IO pad wakeup capability based on mux pad and
      wake_up enable flag available from hwmod_mux initialization.
      
      Use the wakeup_enable flag and enable wakeup capability for the given
      pads. Wakeup capability will be enabled/disabled during hwmod idle
      transition based on whether wakeup_flag is set or cleared.  If the
      hwmod is currently idled, and any mux values were changed by
      _set_idle_ioring_wakeup(), the SCM PADCTRL registers will be updated.
      Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
      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: rearranged code to limit indentation; cleaned up
       function documentation; removed unused non-static functions; modified
       to search all hwmod pads, not just dynamic remuxing ones; modified to
       update SCM regs if hwmod is currently idle and any pads have changed]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      eceec009
  13. 24 11月, 2011 1 次提交
  14. 18 11月, 2011 1 次提交
  15. 05 11月, 2011 1 次提交