1. 09 4月, 2013 2 次提交
  2. 01 4月, 2013 1 次提交
  3. 11 2月, 2013 1 次提交
    • P
      ARM: OMAP2+: hwmod: add enable_preprogram hook · 6d266f63
      Paul Walmsley 提交于
      After setup/enable, some IP blocks need some additional setting to
      indicate the PRCM that they are inactive until they are configured.
      Some examples on OMAP4 include the AESS and FSUSB IP blocks.
      
      To fix this cleanly, this patch adds another optional function
      pointer, enable_preprogram, to the IP block's hwmod data.  The function
      that is pointed to is called by the hwmod code immediately after the
      IP block is reset.
      
      This version of the patch includes a patch description fix from Felipe.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NSebastien Guiriec <s-guiriec@ti.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Péter Ujfalusi <peter.ujfalusi@ti.com>
      Cc: Felipe Balbi <balbi@ti.com>
      6d266f63
  4. 08 2月, 2013 1 次提交
  5. 07 2月, 2013 1 次提交
    • P
      ARM: OMAP2+: hwmod: add support for blocking WFI when a device is active · db27c0c0
      Paul Walmsley 提交于
      Apparently, on some OMAPs, the MPU can't be allowed to enter WFI while
      certain peripherals are active.  It's not clear why, and it's likely
      that there is simply some other bug in the driver or integration code.
      But since the likelihood that anyone will have the time to track these
      problems down in the future seems quite small, we'll provide a
      flag, HWMOD_BLOCK_WFI, to mark these issues in the hwmod data.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      db27c0c0
  6. 26 1月, 2013 1 次提交
    • P
      ARM: OMAP2+: hwmod: add support for blocking WFI when a device is active · fa200222
      Paul Walmsley 提交于
      Apparently, on some OMAPs, the MPU can't be allowed to enter WFI while
      certain peripherals are active.  It's not clear why, and it's likely
      that there is simply some other bug in the driver or integration code.
      But since the likelihood that anyone will have the time to track these
      problems down in the future seems quite small, we'll provide a
      flag, HWMOD_BLOCK_WFI, to mark these issues in the hwmod data.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      fa200222
  7. 12 1月, 2013 1 次提交
    • T
      ARM: OMAP2+: Use omap initcalls · b76c8b19
      Tony Lindgren 提交于
      This way the initcalls don't run on other SoCs on multiplatform
      kernels. Otherwise we'll get something like this when booting
      on vexpress:
      
      omap_hwmod: _ensure_mpu_hwmod_is_setup: MPU initiator hwmod mpu not yet registered
      ...
      WARNING: at arch/arm/mach-omap2/pm.c:82 _init_omap_device+0x74/0x94()
      _init_omap_device: could not find omap_hwmod for mpu
      ...
      omap-dma-engine omap-dma-engine: OMAP DMA engine driver
      ...
      Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      b76c8b19
  8. 22 11月, 2012 2 次提交
    • P
      ARM: OMAP2+: hwmod: Add possibility to count hwmod resources based on type · dad4191d
      Peter Ujfalusi 提交于
      Add flags parameter for omap_hwmod_count_resources() so users can tell which
      type of resources they are interested when counting them in hwmod database.
      Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Acked-by: NBenoît Cousson <b-cousson@ti.com>
      [paul@pwsan.com: updated to apply]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      dad4191d
    • R
      ARM: OMAP2+: hwmod: Add support for per hwmod/module context lost count · e6d3a8b0
      Rajendra Nayak 提交于
      OMAP4 has module specific context lost registers which makes it now
      possible to have module level context loss count, instead of relying
      on the powerdomain level context count.
      
      Add 2 private hwmod api's to update/clear the hwmod/module specific
      context lost counters/register.
      
      Update the module specific context_lost_counter and clear the hardware
      bits just after enabling the module.
      
      omap_hwmod_get_context_loss_count() now returns the hwmod context loss
      count them on platforms where they exist (OMAP4), else fall back on
      the pwrdm level counters for older platforms.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: added function kerneldoc, fixed structure kerneldoc,
       rearranged structure to avoid memory waste, marked fns as OMAP4-specific,
       prevent fn entry on non-OMAP4 chips, reduced indentation, merged update
       and clear, merged patches]
      [t-kristo@ti.com: added support for arch specific hwmod ops, and changed
       the no context offset indicator to USHRT_MAX]
      Signed-off-by: NTero Kristo <t-kristo@ti.com>
      [paul@pwsan.com: use NO_CONTEXT_LOSS_BIT flag rather than USHRT_MAX;
       convert unsigned context lost counter to int to match the return type;
       get rid of hwmod_ops in favor of the existing soc_ops mechanism;
       move context loss low-level accesses to the PRM code]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      e6d3a8b0
  9. 13 11月, 2012 3 次提交
  10. 09 11月, 2012 3 次提交
  11. 31 10月, 2012 1 次提交
    • P
      ARM: OMAP2+: hwmod: add flag to prevent hwmod code from touching IP block during init · 5fb3d522
      Paul Walmsley 提交于
      Add HWMOD_EXT_OPT_MAIN_CLK flag to indicate that this IP block is
      dependent on an off-chip functional clock that is not guaranteed to be
      present during initialization.  IP blocks marked with this flag are
      left in the INITIALIZED state during kernel init.
      
      This is a workaround for a hardware problem.  It should be possible to
      guarantee that at least one clock source will be present and active
      for any IP block's main functional clock.  This ensures that the hwmod
      code can enable and reset the IP block.  Resetting the IP block during
      kernel init prevents any bogus bootloader, ROM code, or previous OS
      configuration from affecting the kernel.  Hopefully a clock
      multiplexer can be added on future SoCs.
      
      N.B., at some point in the future, it should be possible to query the
      clock framework for this type of information.  Then this flag should
      no longer be needed.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      5fb3d522
  12. 30 10月, 2012 1 次提交
    • T
      ARM: OMAP: hwmod: wait for sysreset complete after enabling hwmod · 613ad0e9
      Tero Kristo 提交于
      When waking up from off-mode, some IP blocks are reset automatically by
      hardware. For this reason, software must wait until the reset has
      completed before attempting to access the IP block.
      
      This patch fixes for example the bug introduced by commit
      6c31b215 ("mmc: omap_hsmmc: remove access
      to SYSCONFIG register"), in which the MMC IP block is reset during
      off-mode entry, but the code expects the module to be already available
      during the execution of context restore.
      
      This version includes a fix from Kevin Hilman <khilman@ti.com> for
      GPIO problems on the 37xx EVM - thanks Kevin.
      Signed-off-by: NTero Kristo <t-kristo@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Venkatraman S <svenkatr@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      [paul@pwsan.com: moved softreset wait code into separate function; call
       from top of _enable_sysc() rather than the bottom; include fix from Kevin
       Hilman for GPIO sluggishness]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      613ad0e9
  13. 21 10月, 2012 2 次提交
  14. 19 10月, 2012 2 次提交
  15. 09 10月, 2012 1 次提交
    • P
      ARM: OMAP4/AM335x: hwmod: fix disable_module regression in hardreset handling · e9332b6e
      Paul Walmsley 提交于
      Commit eb05f691 ("ARM: OMAP: hwmod:
      partially un-reset hwmods might not be properly enabled") added code
      to skip the IP block disable sequence if all of the block's hardreset
      lines weren't asserted.  But this did not handle the case when no
      hardreset lines were associated with a module, which is the general
      case.  In that situation, the IP block disable would be skipped.  This
      is likely to cause PM regressions.
      
      So, modify _omap4_disable_module() and _am33xx_disable_module() to
      only bail out early if there are any hardreset lines asserted.  And
      move the AM33xx test above the actual module disable code to ensure
      that the behavior is consistent.
      Reported-by: NArchit Taneja <a0393947@ti.com>
      Tested-by: Archit Taneja <a0393947@ti.com> # DSS
      Cc: Omar Ramirez Luna <omar.luna@linaro.org>
      Cc: Vaibhav Hiremath <hvaibhav@ti.com>
      Acked-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Tested-by: Vaibhav Hiremath <hvaibhav@ti.com> # AM335x
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      e9332b6e
  16. 24 9月, 2012 5 次提交
    • P
      ARM: OMAP2+: clockdomain/hwmod: add workaround for EMU clockdomain idle problems · b71c7217
      Paul Walmsley 提交于
      The idle status of the IP blocks and clocks inside the EMU clockdomain
      isn't taken into account by the PRCM hardware when deciding whether
      the clockdomain is idle.  Add a workaround flag in the clockdomain
      code, CLKDM_MISSING_IDLE_REPORTING, to deal with this problem, and add
      the code necessary to support it.
      
      If CLKDM_MISSING_IDLE_REPORTING is set on a clockdomain, the
      clockdomain will be forced active whenever an IP block inside that
      clockdomain is in use, even if the clockdomain supports
      hardware-supervised idle.  When the kernel indicates that the last
      active IP block inside the clockdomain is no longer used, the
      clockdomain will be forced idle, or, if that mode is not supported in
      the hardware, it will be placed into hardware-supervised idle.
      
      This patch is an equal collaboration with Jon Hunter
      <jon-hunter@ti.com>.  Ming Lei <ming.lei@canonical.com>, Will Deacon
      <will.deacon@arm.com>, Madhav Vij <mvij@ti.com>, Kevin Hilman
      <khilman@ti.com>, Benoît Cousson <b-cousson@ti.com>, and Santosh
      Shilimkar <santosh.shilimkar@ti.com> all made essential contributions
      to the understanding of EMU clockdomain power management on OMAP.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Jon Hunter <jon-hunter@ti.com>
      Cc: Ming Lei <ming.lei@canonical.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Madhav Vij <mvij@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      Tested-by: NJon Hunter <jon-hunter@ti.com>
      b71c7217
    • O
      ARM: OMAP: hwmod: revise deassert sequence · e8e96dff
      Omar Ramirez Luna 提交于
      For a reset sequence to complete cleanly, a module needs its
      associated clocks to be enabled, otherwise the timeout check
      in prcm code can print a false failure (failed to hardreset)
      that occurs because the clocks aren't powered ON and the status
      bit checked can't transition without them.
      Signed-off-by: NOmar Ramirez Luna <omar.luna@linaro.org>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      e8e96dff
    • O
      ARM: OMAP: hwmod: partially un-reset hwmods might not be properly enabled · eb05f691
      Omar Ramirez Luna 提交于
      Some IP blocks might not be using/controlling more than one
      reset line, this check loosens the restriction to fully use
      hwmod framework for those drivers.
      
      E.g.: ipu has reset lines: mmu_cache, cpu0 and cpu1.
      - As of now cpu1 is not used and hence (with previous check) the
        IP block isn't fully enabled by hwmod code.
      - Usually ipu and dsp processors configure their mmu module first
        and then enable the processors, this involves:
          * Deasserting mmu reset line, and enabling the module.
          * Deasserting cpu0 reset line, and enabling the processor.
        The ones portrayed in this example are controlled through
        rproc_fw_boot in drivers/remoteproc/remoteproc_core.c
      
      While at it, prevent _omap4_module_disable if all the hardreset
      lines on an IP block are not under reset.
      
      This will allow the driver to:
        a. Deassert the reset line.
        b. Enable the hwmod through runtime PM default callbacks.
        c. Do its usecase.
        d. Disable hwmod through runtime PM.
        e. Assert the reset line.
      Signed-off-by: NOmar Ramirez Luna <omar.luna@linaro.org>
      [paul@pwsan.com: updated to apply]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      eb05f691
    • P
      ARM: OMAP2+: hwmod code: convert missing clockdomain warnings to debug messages · 3bb05dbf
      Paul Walmsley 提交于
      The decision was made a few months ago to allow struct omap_hwmod
      records and struct clk records to omit clockdomain information if the
      clockdomain is not software-controllable.  See for example commit
      868c157d ("ARM: OMAP2+: hwmod: remove
      prm_clkdm, cm_clkdm; allow hwmods to have no clockdomain").
      
      So convert an existing pr_warning() to a pr_debug() (regarding missing
      clockdomains in clocks), and add a pr_debug() for missing hwmod
      clockdomains.  It's still useful to enable these messages for
      debugging, since missing clockdomains can cause hard-to-debug problems
      with power management; see for example commit
      6c4a057b ("ARM: OMAP4: clock data:
      Force a DPLL clkdm/pwrdm ON before a relock").
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      3bb05dbf
    • P
      ARM: OMAP4+: hwmod code: remove clkdm requirement in _omap4_wait_target_*() · 2b026d13
      Paul Walmsley 提交于
      We're no longer requiring struct omap_hwmod records to contain a
      clockdomain.  So we shouldn't return -EINVAL any more from
      _omap4_wait_target_disable() or _omap4_wait_target_ready() if there's
      no clockdomain defined, since that just gets passed back to the
      caller.  This can result in pointless warnings under the relaxed data
      format.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      2b026d13
  17. 23 9月, 2012 3 次提交
    • R
      ARM: OMAP2+: clock: Remove all direct dereferencing of struct clk · 5dcc3b97
      Rajendra Nayak 提交于
      While we move to Common Clk Framework (CCF), direct deferencing of struct
      clk wouldn't be possible anymore. Hence get rid of all such instances
      in the current clock code and use macros/helpers similar to the ones that
      are provided by CCF.
      
      While here also concatenate some strings split across multiple lines
      which seem to be needed anyway.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: simplified some compound expressions; reformatted some
       messages]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      5dcc3b97
    • R
      ARM: OMAP2+: hwmod: get rid of all omap_clk_get_by_name usage · 6ea74cb9
      Rajendra Nayak 提交于
      Moving to Common clk framework for OMAP would mean we no longer use
      internal lookup mechanism like omap_clk_get_by_name().
      get rid of all its usage mostly from hwmod and omap_device
      code.
      
      Moving to clk_get() also means the respective platforms
      need the clkdev tables updated with an entry for all clocks
      used by hwmod to have clock name same as the alias.
      
      Based on original changes from Mike Turquette.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      [paul@pwsan.com: removed IS_ERR_OR_NULL() conversion (rmk comment);
       restricted omap_96m_alwon_fck_3630 to OMAP36xx; added missing AM35xx
       clock aliases for emac_fck, emac_ick, vpfe_ick, vpfe_fck; added
       aliases rng_ick and several emulation clocks]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      6ea74cb9
    • R
      ARM: omap: clk: add clk_prepare and clk_unprepare · 4d7cb45e
      Rajendra Nayak 提交于
      As part of Common Clk Framework (CCF) the clk_enable() operation
      was split into a clk_prepare() which could sleep, and a clk_enable()
      which should never sleep. Similarly the clk_disable() was
      split into clk_disable() and clk_unprepare(). This was
      needed to handle complex cases where in a clk gate/ungate
      would require a slow and a fast part to be implemented.
      None of the clocks below seem to be in the 'complex' clocks
      category and are just simple clocks which are enabled/disabled
      through simple register writes.
      Most of the instances also seem to be called in non-atomic
      context which means its safe to move all of those from
      using a clk_enable() to clk_prepare_enable() and clk_disable() to
      clk_disable_unprepare().
      
      For some others, mainly the ones handled through the hwmod framework
      there is a possibility that they get called in either an atomic
      or a non-atomic context.
      
      The way these get handled below work only as long as clk_prepare
      is implemented as a no-op (which is the case today) since this gets
      called very early at boot while most subsystems are unavailable.
      Hence these are marked with a *HACK* comment, which says we need
      to re-visit these once we start doing something meaningful with
      clk_prepare/clk_unprepare like doing voltage scaling or something
      that involves i2c.
      
      This is in preparation of OMAP moving to CCF.
      
      Based on initial changes from Mike Turquette.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      4d7cb45e
  18. 13 9月, 2012 1 次提交
    • T
      ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+ · dbc04161
      Tony Lindgren 提交于
      As the plat and mach includes need to disappear for single zImage work,
      we need to remove plat/hardware.h.
      
      Do this by splitting plat/hardware.h into omap1 and omap2+ specific files.
      
      The old plat/hardware.h already has omap1 only defines, so it gets moved
      to mach/hardware.h for omap1. For omap2+, we use the local soc.h
      that for now just includes the related SoC headers to keep this patch more
      readable.
      
      Note that the local soc.h still includes plat/cpu.h that can be dealt
      with in later patches. Let's also include plat/serial.h from common.h for
      all the board-*.c files. This allows making the include files local later
      on without patching these files again.
      
      Note that only minimal changes are done in this patch for the
      drivers/watchdog/omap_wdt.c driver to keep things compiling. Further
      patches are needed to eventually remove cpu_is_omap usage in the drivers.
      
      Also only minimal changes are done to sound/soc/omap/* to remove the
      unneeded includes and to define OMAP44XX_MCPDM_L3_BASE locally so there's
      no need to include omap44xx.h.
      
      While at it, also sort some of the includes in the standard way.
      
      Cc: linux-watchdog@vger.kernel.org
      Cc: alsa-devel@alsa-project.org
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
      Cc: Liam Girdwood <lrg@ti.com>
      Acked-by: NWim Van Sebroeck <wim@iguana.be>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      dbc04161
  19. 12 9月, 2012 3 次提交
    • P
      ARM: OMAP: unwrap strings · 7852ec05
      Paul Walmsley 提交于
      Find and unwrap wrapped strings in the style:
      
      	pr_debug("clockdomain: hardware cannot set/clear wake up of "
      		 "%s when %s wakes up\n", clkdm1->name, clkdm2->name);
      
      Keeping these strings contiguous seems to be the current Linux kernel
      policy.
      
      The offending lines were found with the following command:
      
          pcregrep -rnM '"\s*$\s*"' arch/arm/*omap*
      
      While here, some messages have been clarified, some pr_warning(
      ... calls have been converted to pr_warn( ..., and some printk(KERN_*
      ... have been converted to pr_*.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      7852ec05
    • P
      ARM: OMAP: clean up some smatch warnings, fix some printk(KERN_ERR ... · a032d33b
      Paul Walmsley 提交于
      Resolve the following warnings from smatch:
      
      arch/arm/mach-omap2/gpmc.c:282 gpmc_cs_set_timings() info: why not propagate 'div' from gpmc_cs_calc_divider() instead of -1?
      arch/arm/mach-omap2/serial.c:328 omap_serial_init_port() error: 'pdev' dereferencing possible ERR_PTR()
      arch/arm/mach-omap2/timer.c:213 omap2_gp_clockevent_init() Error invalid range 4096 to -1
      arch/arm/mach-omap2/gpio.c:63 omap2_gpio_dev_init() warn: possible memory leak of 'pdata'
      arch/arm/mach-omap2/omap_hwmod.c:1478 _assert_hardreset() warn: assigning -22 to unsigned variable 'ret'
      arch/arm/mach-omap2/omap_hwmod.c:1487 _assert_hardreset() warn: 4294963201 is more than 255 (max '(ret)' can be) so this is always the same.
      arch/arm/mach-omap2/omap_hwmod.c:1545 _read_hardreset() warn: assigning -22 to unsigned variable 'ret'
      arch/arm/mach-omap2/omap_hwmod.c:1554 _read_hardreset() warn: 4294963201 is more than 255 (max '(ret)' can be) so this is always the same.
      arch/arm/mach-omap2/dpll3xxx.c:629 omap3_clkoutx2_recalc() error: we previously assumed 'pclk' could be null (see line 627)
      arch/arm/mach-omap2/board-n8x0.c:422 n8x0_mmc_late_init() Error invalid range 14 to 13
      arch/arm/mach-omap1/leds-h2p2-debug.c:71 h2p2_dbg_leds_event() error: potentially derefencing uninitialized 'fpga'.
      arch/arm/plat-omap/mux.c:79 omap_cfg_reg() Error invalid range 4096 to -1
      
      Thanks to Tony Lindgren <tony@atomide.com> for pointing out that BUG()
      can be disabled.  The changes in the first version that removed the
      subsequent return() after BUG() states have been dropped.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      a032d33b
    • V
      ARM: OMAP2+: hwmod: Hook-up am33xx support in omap_hwmod framework · 1688bf19
      Vaibhav Hiremath 提交于
      AM33XX PRCM architecture is different that any OMAP family
      of devices, so it is required to have separate implementation
      to handle AM33XX module enable/disable, reset assert/deassert
      functionality.
      This patch adds wrapper api's in omap_hwmod framework to
      access prm/cm for AM33XX family of devices.
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      [paul@pwsan.com: fixed checkpatch messages]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      1688bf19
  20. 08 9月, 2012 1 次提交
    • V
      ARM: OMAP: omap_device: Do not overwrite resources allocated by OF layer · b82b04e8
      Vaibhav Hiremath 提交于
      With the new devices (like, AM33XX and OMAP5) we now only support
      DT boot mode of operation and now it is the time to start killing
      slowly the dependency on hwmod, so with this patch, we are starting
      with device resources.
      The idea here is implemented considering to both boot modes -
        - DT boot mode
          OF framework will construct the resource structure (currently
          does for MEM & IRQ resource) and we should respect/use these
          resources, killing hwmod dependency.
          If pdev->num_resources > 0, we assume that MEM & IRQ resources
          have been allocated by OF layer already (through DTB).
      
          Once DMA resource is available from OF layer, we should
          kill filling any resources from hwmod.
      
        - Non-DT boot mode
          Here, pdev->num_resources = 0, and we should get all the
          resources from hwmod (following existing steps)
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      [b-cousson@ti.com: Fix some checkpatch CHECK issues]
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      b82b04e8
  21. 04 9月, 2012 1 次提交
  22. 09 7月, 2012 1 次提交
  23. 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