1. 05 11月, 2011 1 次提交
  2. 16 9月, 2011 1 次提交
  3. 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
  4. 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
  5. 12 3月, 2011 1 次提交
  6. 10 3月, 2011 4 次提交
  7. 08 3月, 2011 1 次提交
  8. 01 3月, 2011 2 次提交
    • 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
    • P
      OMAP2+: hwmod: rename some init functions · 550c8092
      Paul Walmsley 提交于
      Rename omap_hwmod_init() to omap_hwmod_register().  Rename
      omap_hwmod_late_init() to omap_hwmod_setup_all().  Also change all of
      the callers to reflect the new names.  While here, update some
      copyrights.
      
      Suggested by Tony Lindgren <tony@atomide.com>.
      
      N.B. The comment in mach-omap2/serial.c may no longer be correct, given
           recent changes in init order.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      550c8092
  9. 25 2月, 2011 1 次提交
  10. 15 2月, 2011 1 次提交
  11. 23 12月, 2010 2 次提交
  12. 22 12月, 2010 8 次提交
    • 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
    • B
      OMAP2+: hwmod: Add wakeup support for new OMAP4 IPs · 86009eb3
      Benoit Cousson 提交于
      The new OMAP4 IPs introduced a new idle mode named smart-idle with wakeup.
      
      This new idlemode replaces the enawakeup for the new IPs but seems to
      coexist as well for some legacy IPs (UART, GPIO, MCSPI...)
      
      Add the new SIDLE_SMART_WKUP flag to mark the IPs that support this
      capability.
      The omap_hwmod_44xx_data.c will have to be updated to add this new flag.
      
      Enable this new mode when applicable in _enable_wakeup, _enable_sysc and
      _idle_sysc.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Tested-by: NSebastien Guiriec <s-guiriec@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      86009eb3
    • B
      OMAP2+: hwmod: Make omap_hwmod_register private and remove omap_hwmod_unregister · 0102b627
      Benoit Cousson 提交于
      Do not allow omap_hwmod_register to be used outside the core
      hwmod code. An omap_hwmod should be registered only at init time.
      Remove the omap_hwmod_unregister that is not used today since the
      hwmod list will be built once at init time and never be modified
      at runtime.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      0102b627
    • P
      OMAP2+: hwmod: fix a warning, add some docs, remove unused fields · b56b7bc8
      Paul Walmsley 提交于
      Trivial cleanup and documentation changes on the hwmod code and data:
      
      - add some hwmod documentation to indicate flags that should be moved
        outside the static hwmod data in a future patch
      
      - remove some unused fields in the struct omap_hwmod_ocp_if and
        struct omap_hwmod structures
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      b56b7bc8
    • P
      OMAP2+: hwmod: upgrade per-hwmod mutex to a spinlock · dc6d1cda
      Paul Walmsley 提交于
      Change the per-hwmod mutex to a spinlock.  (The per-hwmod lock
      serializes most post-initialization hwmod operations such as enable,
      idle, and shutdown.)  Spinlocks are needed, because in some cases,
      hwmods must be enabled from timer interrupt disabled-context, such as
      an ISR.  The current use-case that is driving this is the OMAP GPIO
      block ISR: it can trigger interrupts even with its clocks disabled,
      but these clocks are needed for register accesses in the ISR to succeed.
      
      This patch also effectively reverts commit
      84824022 - this patch makes
      _omap_hwmod_enable() and _omap_hwmod_init() static, renames them back
      to _enable() and _idle(), and changes their callers to call the
      spinlocking versions.  Previously, since omap_hwmod_{enable,init}()
      attempted to take mutexes, these functions could not be called while
      the timer interrupt was disabled; but now that the functions use
      spinlocks and save and restore the IRQ state, it is appropriate to
      call them directly.
      
      Kevin Hilman <khilman@deeprootsystems.com> originally proposed this
      patch - thanks Kevin.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      dc6d1cda
    • P
      OMAP2+: hwmod: add support for per-class custom device reset functions · bd36179e
      Paul Walmsley 提交于
      The standard omap_hwmod.c _reset() code relies on an IP block's
      OCP_SYSCONFIG.SOFTRESET register bit to reset the IP block.  This
      works for most IP blocks on the chip, but unfortunately not all.  For
      example, initiator-only IP blocks often don't have any MPU-accessible
      OCP-header registers, and therefore the MPU can't write to any
      OCP_SYSCONFIG registers in that block.  Other IP blocks, such as the
      IVA and I2C, require a specialized reset sequence.
      
      Since we need to be able to reset these IP blocks as well, allow
      custom IP block reset functions to be passed into the hwmod code via a
      per-hwmod-class reset function pointer, struct omap_hwmod_class.reset.
      If .reset is non-null, then the hwmod _reset() code will call the custom
      function instead of the standard OCP SOFTRESET-based code.
      
      As part of this change, rename most of the existing _reset() function
      code to _ocp_softreset(), to indicate more clearly that it does not work
      for all cases.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Paul Hunt <hunt@ti.com>
      Cc: Stanley Liu <stanley_liu@ti.com>
      bd36179e
    • P
      OMAP2+: hwmod: add postsetup state · 2092e5cc
      Paul Walmsley 提交于
      Allow board files and OMAP core code to control the state that some or
      all of the hwmods end up in at the end of _setup() (called by
      omap_hwmod_late_init() ).  Reimplement the old skip_setup_idle code in
      terms of this new postsetup state code.
      
      There are two use-cases for this patch: the !CONFIG_PM_RUNTIME case,
      in which all IP blocks should stay enabled after _setup() finishes;
      and the MPU watchdog case, in which the watchdog IP block should enter
      idle if watchdog coverage of kernel initialization is desired, and
      should be disabled otherwise.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Charulatha Varadarajan <charu@ti.com>
      2092e5cc
    • P
      OMAP2+: hwmod: allow custom pre-shutdown functions · e4dc8f50
      Paul Walmsley 提交于
      Some OMAP IP blocks, such as the watchdog timers, cannot be completely
      shut down via the standard hwmod shutdown mechanism.  This patch
      enables the hwmod data files to supply a pointer to a custom
      pre-shutdown function via the struct omap_hwmod_class.pre_shutdown
      function pointer.  If the struct omap_hwmod_class.pre_shutdown
      function pointer is non-null, the function will be executed before the
      existing hwmod shutdown code runs.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      e4dc8f50
  13. 02 11月, 2010 1 次提交
  14. 09 10月, 2010 1 次提交
  15. 24 9月, 2010 1 次提交
    • B
      OMAP4: hwmod: Add initial data for OMAP4430 ES1 & ES2 · 55d2cb08
      Benoit Cousson 提交于
      The current version contains only the interconnects and the
      mpu hwmods.
      The remaining hwmods will be introduced by further patches on
      top of this one.
      
      - enable as well omap_hwmod.c build for OMAP4 Soc
      
      Please not that this file uses the new naming convention for
      naming HW IPs. This convention will be backported soon for previous
      OMAP2 & 3 data files.
      
      new name        trm name
      -------------   -------------------
      counter_32k     synctimer_32k
      l3_main         l3
      timerX          gptimerX / dmtimerX
      mmcX            mmchsX / sdmmcX
      dma_system      sdma
      smartreflex_X   sr_X / sr?
      usb_host_fs     usbfshost
      usb_otg_hs      hsusbotg
      usb_tll_hs      usbtllhs_config
      wd_timerX       wdtimerX
      ipu             cortexm3 / ducati
      dsp             c6x / tesla
      iva             ivahd / iva2.2
      kbd             kbdocp / keyboard
      mailbox         system_mailbox
      mpu             cortexa9 / chiron
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      55d2cb08
  16. 22 9月, 2010 3 次提交
    • 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