1. 12 9月, 2012 1 次提交
    • V
      ARM: OMAP3+: hwmod: Add AM33XX HWMOD data · a2cfc509
      Vaibhav Hiremath 提交于
      This patch adds HWMOD data for all the peripherals of
      AM335X device and also hooks up to the existing OMAP framework.
      
      hwmod data has been already been cleaned up for the recent
      changes in clocktree, where all leaf nodes have been removed,
      since with modulemode based control, both clock and hwmod
      interface does same thing. This reduces the code size to large
      extent and also avoids duplication of same control.
      So instead of specifying module's leaf node as a main_clk,
      now we are relying on parent clock of module's functional clock.
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: NAfzal Mohammed <afzal@ti.com>
      Signed-off-by: NVaibhav Bedia <vaibhav.bedia@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: removed period in hwmod device names; changed mmc2 main_clk
       to mmc_clk at Vaibhav's request; added trailing commas to structure
       records at Tony's request to deal with some rmk parsing issues; added
       OMAP_INTC_START to facilitate sparse-IRQ conversion]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      a2cfc509
  2. 06 7月, 2012 1 次提交
  3. 04 7月, 2012 4 次提交
  4. 19 6月, 2012 1 次提交
    • K
      ARM: OMAP2+: hwmod: use init-time function ptrs for enable/disable module · 9ebfd285
      Kevin Hilman 提交于
      The enable/disable module functions are specific to SoCs with
      OMAP4-class PRCM.  Rather than use cpu_is* checks at runtime inside
      the enable/disable module functions, use cpu_is at init time to
      initialize function pointers only for SoCs that need them.
      
      NOTE: the cpu_is* check for _enable_module was different than
            the one for _disable_module, and this patch uses
            cpu_is_omap44xx() for both.
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      [paul@pwsan.com: moved soc_ops function pointers to be per-kernel rather than
       per-hwmod since they do not vary by hwmod; added kerneldoc]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      9ebfd285
  5. 20 4月, 2012 1 次提交
  6. 19 4月, 2012 5 次提交
    • 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: extend OCP_* register offsets from 16 to 32 bits · 515237d6
      Paul Walmsley 提交于
      Extend the OCP_* register offsets in the struct
      omap_hwmod_class_sysconfig to 32 bits.  This is required to add the
      OMAP4+ GPU hwmod, which uses OCP_* register offsets larger than 16
      bits.
      
      Another possible solution may be to simply add a single 16 bit offset
      field in this structure, and to add code to factor that offset into
      all OCP_* register accesses.  This would save some memory, since
      almost no modules need 32 bit offsets.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      515237d6
    • P
      ARM: OMAP4: hwmod data: add OCP_USER_DSP; mark omap44xx_dsp__iva appropriately · 3d10f0d6
      Paul Walmsley 提交于
      One of the OMAP4 links was missing OCP_USER flags, since it was only
      used by the DSP initiator, and we did not have an OCP_USER_DSP flag.
      Future patches will switch the hwmod code and data to register
      interfaces, rather than hwmods, and it will be mandatory for all
      interfaces to have at least one user bit set.  This patch resolves the
      issue by adding OCP_USER_DSP and marking the DSP-IVA interface
      appropriately.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      
      
      3d10f0d6
    • 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
  7. 13 4月, 2012 1 次提交
    • F
      ARM: OMAP2+: hwmod: add softreset delay field and OMAP4 data · d99de7f5
      Fernando Guzman Lugo 提交于
      Due to HW limitation, some IPs should not be accessed just after a
      softreset. Since the current hwmod sequence is accessing the sysconfig
      register just after the reset, it might lead to OCP bus error in
      that case.
      
      Add a new field in the sysconfig structure to specify a delay in usecs
      needed after doing a softreset.
      
      In the case of the ISS and FDIF modules, the L3 OCP port will be
      disconnected upon a SW reset. That issue was confirmed with HW simulation
      and an errata should be available soon. The HW recommendation to avoid
      that is to wait for 100 OCP clk cycles, before accessing the IP.
      
      Considering the worse case (OPP50), the L3 bus will run at 100 MHz,
      so a 1 usec delay is needed. Add an x2 margin to be safe.
      Acked-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NFernando Guzman Lugo <fernando.lugo@ti.com>
      [paul@pwsan.com: dropped FDIF change for now since the hwmod data is not
       yet upstream; the FDIF change will need to be added later once the FDIF
       data is merged]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      d99de7f5
  8. 05 4月, 2012 1 次提交
  9. 06 3月, 2012 1 次提交
  10. 17 12月, 2011 3 次提交
  11. 05 11月, 2011 1 次提交
  12. 16 9月, 2011 1 次提交
  13. 15 9月, 2011 1 次提交
    • P
      OMAP2+: hwmod: remove OMAP_CHIP* · d6504acd
      Paul Walmsley 提交于
      At Tony's request, remove the OMAP_CHIP* flags from the hwmod data, and
      replace it instead with chip family, variant, and ES level-specific lists
      of hwmods to register.
      
      Thanks to Gražvydas Ignotas <notasas@gmail.com> for finding a bug in the
      AM3517/3505 support, and for other review comments.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Gražvydas Ignotas <notasas@gmail.com>
      d6504acd
  14. 10 7月, 2011 11 次提交
    • B
      OMAP4: hwmod data: Add modulemode entry in omap_hwmod structure · 03fdefe5
      Benoit Cousson 提交于
      Add a new field to provide the mode supported by the module.
      The mode will control the way mandatory clocks are managed by the PRCM.
      
        0 : Module is temporarily disabled by SW. OCP access to module are stalled.
            Can be used to change timing parameter of GPMC module.
        1 : Module is managed automatically by HW according to clock domain
            transition. A clock domain sleep transition put module into idle.
            A wakeup domain transition put it back into function.
            If CLKTRCTRL=3, any OCP access to module is always granted.
            Module clocks may be gated according to the clock domain state.
        2 : Module is explicitly enabled. Interface clock (if not used for
            functions) may be gated according to the clock domain state.
            Functional clocks are guarantied to stay present. As long as
            in this configuration, power domain sleep transition cannot happen.
      
      Some modules will have a modulemode initialized at 1 (HWCTRL) by default.
      This is the case for interconnect and simple module like GPIO, WDT, MAILBOX.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      03fdefe5
    • B
      OMAP4: hwmod data: Add PRM context register offset · 27bb00b5
      Benoit Cousson 提交于
      Add a 'context_offs' entry in the prcm.omap4 structure to all
      IPs when applicable.
      The offset will be used to retrieve the per module context lost
      information now available on OMAP4.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      27bb00b5
    • B
      OMAP4: hwmod: Replace RSTCTRL absolute address with offset macros · eaac329d
      Benoit Cousson 提交于
      The RSTCTRL register was accessed using an absolute address.
      The usage of hardcoded macros to calculate virtual address from physical
      one should be avoided as much as possible.
      The usage of an offset will allow future improvement like migration from
      the current architecture code toward a module driver.
      
      Update prm_xxx accessors, move definition to the proper header file and
      update copyrights.
      Change the s16 register offset parameter to u16.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: use '_prminst_' in function names that are part of the
       prminst44xx.c file]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      eaac329d
    • B
      OMAP4: hwmod: Replace CLKCTRL absolute address with offset macros · d0f0631d
      Benoit Cousson 提交于
      The CLKCTRL register was accessed using an absolute address.
      The usage of hardcoded macros to calculate virtual address from physical
      one should be avoided as much as possible.
      The usage of a offset will allow future improvement like migration from
      the current architecture code toward a module driver.
      
      Update cm_xxx accessor, move definition to the proper header file and
      update copyrights.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Todd Poynor <toddpoynor@google.com>
      [paul@pwsan.com: renamed 'omap4_cm_' fns to 'omap4_cminst_'; removed empty
       fn prototype section from cm44xx.h; incorporated comments from Todd;
       documented some functions]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      d0f0631d
    • B
      OMAP2+: hwmod: Init clkdm field at boot time · 6ae76997
      Benoit Cousson 提交于
      At boot time, lookup the clkdm_name to get the clkdm
      structure pointer for further usage.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      6ae76997
    • B
      OMAP4: hwmod data: Add clock domain attribute · a5322c6f
      Benoit Cousson 提交于
      In OMAP PRCM terminology, the clock domain is defined as a group of IPs
      that share some clocks and most of the time an interface clock.
      Every IP does belong to a clockdomain.
      For the moment the clock domain attribute is affected to a clock node.
      The issue with that approach, is that a clock might or not belong to a
      clock domain. Moreover during module transition, it is up to a module
      to handle properly the clock domain state and not to a clock node.
      
      Create a clkdm_name attribute to provide this information per hwmod.
      
      Populate this attribute for every OMAP4 hwmod entries.
      
      Future cleanup series with remove that information from the OMAP4 clock
      when it is relevant.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: fix the mpuss_clkdm name]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      a5322c6f
    • A
      OMAP: hwmod: fix the i2c-reset timeout during bootup · 6d3c55fd
      Avinash.H.M 提交于
      The sequence of _ocp_softreset doesn't work for i2c. The i2c module has a
      special sequence to reset the module. The sequence is
       - Disable the I2C.
       - Write to SOFTRESET bit.
       - Enable the I2C.
       - Poll on the RESETDONE bit.
      The sequence is implemented as a function and the i2c_class is updated with
      the correct 'reset' pointer.  omap_hwmod_softreset function is implemented
      which triggers the softreset by writing into sysconfig register. On following
      this sequence, i2c module resets properly and timeouts are not seen.
      
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Signed-off-by: NAvinash.H.M <avinashhm@ti.com>
      [paul@pwsan.com: combined this patch with a patch to remove
       HWMOD_INIT_NO_RESET from the 44xx hwmod flags; change register
       offset conditional code to use the IP block revision; minor code
       cleanup]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      6d3c55fd
    • P
      omap_hwmod: use a terminator record with omap_hwmod_dma_info arrays · bc614958
      Paul Walmsley 提交于
      Previously, struct omap_hwmod_dma_info arrays were unterminated; and
      users of these arrays used the ARRAY_SIZE() macro to determine the
      length of the array.  However, ARRAY_SIZE() only works when the array
      is in the same scope as the macro user.
      
      So far this hasn't been a problem.  However, to reduce duplicated
      data, a subsequent patch will move common data to a separate, shared
      file.  When this is done, ARRAY_SIZE() will no longer be usable.
      
      This patch removes ARRAY_SIZE() usage for struct omap_hwmod_dma_info
      arrays and uses a sentinel value (irq == -1) as the array terminator
      instead.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      bc614958
    • P
      omap_hwmod: use a terminator record with omap_hwmod_mpu_irqs arrays · 212738a4
      Paul Walmsley 提交于
      Previously, struct omap_hwmod_mpu_irqs arrays were unterminated; and
      users of these arrays used the ARRAY_SIZE() macro to determine the
      length of the array.  However, ARRAY_SIZE() only works when the array
      is in the same scope as the macro user.
      
      So far this hasn't been a problem.  However, to reduce duplicated
      data, a subsequent patch will move common data to a separate, shared
      file.  When this is done, ARRAY_SIZE() will no longer be usable.
      
      This patch removes ARRAY_SIZE() usage for struct omap_hwmod_mpu_irqs
      arrays and uses a sentinel value (irq == -1) as the array terminator
      instead.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      212738a4
    • P
      omap_hwmod: use a null structure record to terminate omap_hwmod_addr_space arrays · 78183f3f
      Paul Walmsley 提交于
      Previously, struct omap_hwmod_addr_space arrays were unterminated; and
      users of these arrays used the ARRAY_SIZE() macro to determine the
      length of the array.  However, ARRAY_SIZE() only works when the array
      is in the same scope as the macro user.
      
      So far this hasn't been a problem.  However, to reduce duplicated
      data, a subsequent patch will move common data to a separate, shared
      file.  When this is done, ARRAY_SIZE() will no longer be usable.
      
      This patch removes ARRAY_SIZE() usage for struct omap_hwmod_addr_space
      arrays and uses a null structure member as the array terminator
      instead.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      
      
      
      
      78183f3f
    • B
      OMAP2+: hwmod: Fix smart-standby + wakeup support · 724019b0
      Benoit Cousson 提交于
      The commit 86009eb3 was adding
      the wakeup support for new OMAP4 IPs. This support is incomplete for
      busmaster IPs that need as well to use smart-standby with wakeup.
      
      This new standbymode is suported on HSI and USB_HOST_FS for the moment.
      
      Add the new MSTANDBY_SMART_WKUP flag to mark the IPs that support this
      capability.
      
      Enable this new mode when applicable in _enable_wakeup, _disable_wakeup,
      _enable_sysc and _idle_sysc.
      
      The omap_hwmod_44xx_data.c will have to be updated to add this new flag.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NDjamil Elaidi <d-elaidi@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      724019b0
  15. 12 3月, 2011 1 次提交
  16. 10 3月, 2011 4 次提交
  17. 08 3月, 2011 1 次提交
  18. 01 3月, 2011 1 次提交
    • P
      OMAP2+: hwmod: add ability to setup individual hwmods · a2debdbd
      Paul Walmsley 提交于
      Add omap_hwmod_setup_one(), which is intended for use early in boot to
      selectively setup the hwmods needed for system clocksources and
      clockevents, and any other hwmod that is needed in early boot.
      omap_hwmod_setup_all() can then be called later in the boot process.
      The point is to minimize the amount of code that needs to be run
      early.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      a2debdbd