1. 23 8月, 2012 1 次提交
  2. 16 8月, 2012 2 次提交
  3. 31 7月, 2012 1 次提交
  4. 26 7月, 2012 4 次提交
    • S
      ARM: OMAP4: CPUidle: Open broadcast clock-event device. · b93d70ae
      Santosh Shilimkar 提交于
      OMAP4 idle driver uses CLOCK_EVT_NOTIFY_BROADCAST_[ENTER/EXIT]
      for broadcast clock events. But _ENTER/_EXIT doesn't really open
      broadcast clock events and to explicitly setup the broadcast device,
      CLOCK_EVT_NOTIFY_BROADCAST_ON should be used.
      
      Add the missing CLOCK_EVT_NOTIFY_BROADCAST_ON clockevent notifications.
      This will setup the broadcast timer in either periodic/oneshot modes
      correctly. Recent clockevent infrastructure change 77b0d60c {leave the
      broadcast device in shutdown mode when not needed} exposed this bug
      leading to boot hangs in oneshot mode. Prior to this, periodic broadcast
      mode was also broken. This change fixes both the periodic/oneshot broadcast
      modes.
      
      Discussion thread :
      	https://lkml.org/lkml/2012/4/9/13Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      b93d70ae
    • K
      ARM: OMAP4: CPUidle: add synchronization for coupled idle states · 5b4d5bcc
      Kevin Hilman 提交于
      With coupled idle states, a failure for any CPU to hit a low power
      state must be coordinated such that all CPUs abort.
      
      On OMAP4, when entering a coupled state, CPU0 has to wait for CPU1 to
      enter its low power state before it can enter its low power state.
      
      This is implemented by letting CPU0 wait for the CPU1 powerdomain to
      hit off.  However, there are conditions where CPU1 might abort/fail
      and not hit off while CPU0 is waiting for it.  For example, a CPU1
      wakeup or a failed attempt to hit off due to hardware conditions.
      
      To avoid the deadlock where CPU0 would continually wait for CPU1 to
      hit off-mode, this patch adds a flag to signal when each CPU has come
      out of its low-power state.  CPU0 then checks whether CPU1 has hit off
      *or* has already completed its attempt to hit off.  If the latter,
      CPU0 must abort its attempt to hit a low-power state so the coupled
      state enter method can return.
      
      In addition, cpuidle_coupled_parallel_barrier() is used to ensure the
      clearing of the 'done' flag is synchronized on all CPUs.
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      5b4d5bcc
    • S
      ARM: OMAP4: CPUidle: Use coupled cpuidle states to implement SMP cpuidle. · dd3ad97c
      Santosh Shilimkar 提交于
      OMAP4 CPUDILE driver is converted mainly based on notes from the
      coupled cpuidle patch series.
      
      The changes include :
      - Register both CPUs and C-states to cpuidle driver.
      - Set struct cpuidle_device.coupled_cpus
      - Set struct cpuidle_device.safe_state to non coupled state.
      - Set CPUIDLE_FLAG_COUPLED in struct cpuidle_state.flags for each
        state that affects multiple cpus.
      - Separate ->enter hooks for coupled & simple idle.
      - CPU0 wait loop for CPU1 power transition.
      - CPU1 wakeup mechanism for the idle exit.
      - Enabling ARCH_NEEDS_CPU_IDLE_COUPLED for OMAP4.
      
      Thanks to Kevin Hilman and Colin Cross on the suggestions/fixes
      on the intermediate version of this patch.
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      dd3ad97c
    • S
      ARM: OMAP: timer: allow gp timer clock-event to be used on both cpus · 11d6ec2e
      Santosh Shilimkar 提交于
      For coupled cpuidle to work when both cpus are active, it needs a global timer
      that can handle events for both cpus.  This timer is used as the broadcast
      clock-event when the per-cpu timer hardware stop in low power states.
      Set the cpumask of clockevent_gpt to all cpus, set the rating correctly, and
      set the irq to allow the clockevent core to determine the affinity of the
      timer.
      Signed-off-by: NColin Cross <ccross@android.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      11d6ec2e
  5. 20 7月, 2012 1 次提交
  6. 10 7月, 2012 2 次提交
  7. 09 7月, 2012 13 次提交
  8. 06 7月, 2012 7 次提交
    • Z
      ARM: OMAP3530evm: set pendown_state and debounce time for ads7846 · 16aced80
      Zumeng Chen 提交于
      Currently most ads7846 config definitions for OMAP3 series boards have
      been moved to common-board-devices.c, and it is transparent for init.
      And it's no very proper to do gpio_request based on get_pendown_state
      since omap_ads7846_init knows everything about ads7846_config.
      
      So it's more fit to request gpio according to the right gpio_pendown
      and set debounce time conditionally. If we don't set proper debouce
      time, there are flooded interrupt counters of ads7846 responding to
      one time touch on screen, then the driver couldn't work very well.
      
      This patch has been validated on 3530evm.
      Signed-off-by: NZumeng Chen <zumeng.chen@windriver.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      16aced80
    • Z
      ARM: omap3evm: enable VBUS switch for EHCI tranceiver · cb8ca589
      Zumeng Chen 提交于
      This was chosen by following the trace on the schematic from component U131
      and U134 to the CPEN pin on the USB3320 device.
      
      TWL4030.GPIO2-...->(T2_GPIO2_3V3)U131-..>nUSB2_EN-..>U134-..>EXP_nUSB2_1V8
      which starts EHCI tranceiver USB3320.
      
      This will set TWL4030.GPIO2 as output pin to drive EHCI tranceiver.
      Signed-off-by: NZumeng Chen <zumeng.chen@windriver.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      cb8ca589
    • Z
      ARM: OMAP3EVM: Adding USB internal LDOs board file · 497af1f3
      Zumeng Chen 提交于
      EHCI PHY requires these regulators:
              EVM Rev >=E  --> VAUX2
              EVM Rev < E  --> VUSB1V5, VUSB1V8
      
      Adding USB internal LDOs (vusb1v5 & vusb1v8) and VAUX2 to omap3evm
      board file. Also removing vaux2_{1/2/3} supplies as they are not
      used on omap3 evm.
      
      But we need not to add vaux2 in twl4030_platform_data since it will
      be added conditionally.
      Signed-off-by: NAjay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: NZumeng Chen <zumeng.chen@windriver.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      497af1f3
    • Z
      dc42c8bd
    • T
      ARM: OMAP2+: dmtimer: cleanup fclk usage · ae6df418
      Tarun Kanti DebBarma 提交于
      With omap_hwmod_get_main_clk() now available, this can be passed to
      clk_get() to extract the fclk and thus avoid construction of fclk name.
      Corrected the timer fck name mis-match between clock44xx_data.c and
      omap_hwmod_44xx_data.c. For other platforms this is already taken care.
      
      Cc: Cousson, Benoit <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NTarun Kanti DebBarma <tarun.kanti@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ae6df418
    • 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
  9. 05 7月, 2012 4 次提交
  10. 04 7月, 2012 5 次提交
    • B
      ARM: OMAP2+: hwmod data: Fix wrong McBSP clock alias on OMAP4 · d7a0b513
      Benoit Cousson 提交于
      The commit 503d0ea2
        ARM: OMAP4: hwmod data: Add aliases for McBSP fclk clocks
      
      added a wrong "prcm_clk" alias for PRCM clock whereas the McBSP
      driver and previous OMAPs are using "prcm_fck".
      
      It thus lead to the following warning.
      
      [   47.409729] omap-mcbsp: clks: could not clk_get() prcm_fck
      
      Fix that by changing the opt_clk role to prcm_fck.
      Reported-by: NMisael Lopez Cruz <misael.lopez@ti.com>
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Tested-by: NSebastien Guiriec <s-guiriec@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      d7a0b513
    • P
      ARM: OMAP4: hwmod data: temporarily comment out data for the usb_host_fs and aess IP blocks · b0a70cc8
      Paul Walmsley 提交于
      The OMAP4 usb_host_fs (OHCI) and AESS IP blocks require some special
      programming for them to enter idle.  Without this programming, they
      will prevent the rest of the chip from entering full chip idle.
      
      To implement the idle programming cleanly, this will take some
      coordination between maintainers.  This is likely to take some time,
      so it is probably best to leave this for 3.6 or 3.7.  So, in the
      meantime, prevent these IP blocks from being registered.
      
      Later, once the appropriate support is available, this patch can be
      reverted.
      
      This second version comments out the IP block data since Benoît didn't
      like removing it.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      b0a70cc8
    • 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
    • R
      ARM: OMAP2+: PRM/CM: Move the stubbed prm and cm functions to prcm.c file and make them __weak · 3f4990f4
      R Sricharan 提交于
      Some prm and cm registers read/write and status functions
      are built only for some custom OMAP2+ builds and are stubbed
      in header files for other builds under ifdef statements.
      But this results in adding new CONFIG_ARCH_OMAPXXX
      checks when SOCs are added in the future. So move them
      to a common place for OMAP2+ and make them 'weak' implementations.
      
      This way no new ifdefs would be required in the future and also
      cleans up the existing code.
      Signed-off-by: NR Sricharan <r.sricharan@ti.com>
      [paul@pwsan.com: unsplit quoted strings; moved PRM functions to
       mach-omap2/prm_common.c; resolved sparse warnings]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      3f4990f4
    • 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