1. 06 8月, 2011 2 次提交
    • N
      OMAP3+: SR: ensure pm-runtime callbacks can be invoked with IRQs disabled · e13d8f38
      Nishanth Menon 提交于
      SmartReflex should be disabled while entering low power mode due to
      a) SmartReflex values are not defined for retention voltage, further
      b) with SmartReflex enabled, if CPU enters lower c-states, FSM will try
      to bump the voltage to current OPP's voltage for which it has entered c-state;
      hence SmartReflex needs to be disabled for MPU, CORE and IVA voltage
      domains in idle path before enabling auto retention voltage achievement
      on the device.
      
      However, since the current pm_runtime setup for SmartReflex devices are
      setup to allow callbacks to be invoked with interrupts enabled, calling
      SmartReflex enable/disable from other contexts such as idle paths
      where preemption is disabled causes warnings such as the following
      indicating of a potential race.
      [   82.023895] [<c04d079c>] (__irq_svc+0x3c/0x120) from [<c04d0484>] (_raw_spin_unlock_irq+0x28/0x2c)
      [   82.023895] [<c04d0484>] (_raw_spin_unlock_irq+0x28/0x2c) from [<c0323234>] (rpm_callback+0x4c/0x68)
      [   82.023956] [<c0323234>] (rpm_callback+0x4c/0x68) from [<c0323f7c>] (rpm_resume+0x338/0x53c)
      [   82.023956] [<c0323f7c>] (rpm_resume+0x338/0x53c) from [<c03243f4>] (__pm_runtime_resume+0x48/0x60)
      [   82.023986] [<c03243f4>] (__pm_runtime_resume+0x48/0x60) from [<c008aee0>] (sr_enable+0xa8/0x19c)
      [   82.023986] [<c008aee0>] (sr_enable+0xa8/0x19c) from [<c008b2fc>] (omap_sr_enable+0x50/0x90)
      [   82.024017] [<c008b2fc>] (omap_sr_enable+0x50/0x90) from [<c00888c0>] (omap4_enter_sleep+0x138/0x168)
      
      Instead, we use pm_runtime_irq_safe to tell the PM core that callbacks can be
      invoked in interrupt disabled contexts.
      Acked-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NNishanth Menon <nm@ti.com>
      [khilman@ti.com: minor changelog edits]
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      e13d8f38
    • K
      OMAP2+: Kconfig: don't select PM in OMAP2PLUS_TYPICAL · 44e51b29
      Kevin Hilman 提交于
      CONFIG_PM is no longer a user-selectable Kconfig option.  Rather it is
      automatically enabled if either CONFIG_SUSPEND or CONFIG_RUNTIME_PM is
      enabled, so having a 'select PM' here is redunant when 'select
      CONFIG_PM_RUNTIME' is present.
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      44e51b29
  2. 28 7月, 2011 1 次提交
  3. 25 7月, 2011 4 次提交
  4. 20 7月, 2011 1 次提交
  5. 13 7月, 2011 1 次提交
  6. 10 7月, 2011 31 次提交
    • R
      OMAP2+: hwmod: Follow the recommended PRCM module enable sequence · 665d0013
      Rajendra Nayak 提交于
      On OMAP4, the PRCM recommended sequence for enabling
      a module after power-on-reset is:
      -1- Force clkdm to SW_WKUP
      -2- Enabling the clocks
      -3- Configure desired module mode to "enable" or "auto"
      -4- Wait for the desired module idle status to be FUNC
      -5- Program clkdm in HW_AUTO(if supported)
      
      This sequence applies to all older OMAPs' as well,
      however since they use autodeps, it makes sure that
      no clkdm is in IDLE, and hence not requiring a force
      SW_WKUP when a module is being enabled.
      
      OMAP4 does not need to support autodeps, because
      of the dyanamic dependency feature, wherein
      the HW takes care of waking up a clockdomain from
      idle and hence the module, whenever an interconnect
      access happens to the given module.
      
      Implementing the sequence for OMAP4 requires
      the clockdomain handling that is currently done in
      clock framework to be done as part of hwmod framework
      since the step -4- above to "Wait for the desired
      module idle status to be FUNC" is done as part of
      hwmod framework.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [b-cousson@ti.com: Adapt it to the new clkdm hwmod attribute and API]
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      [paul@pwsan.com: dropped mach-omap2/clock.c changes; modified to only
       call the clockdomain code if oh->clkdm is set; disable clock->clockdomain
       interaction on OMAP4]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      665d0013
    • P
      OMAP2+: clock: allow per-SoC clock init code to prevent clockdomain calls from clock code · 12706c54
      Paul Walmsley 提交于
      The OMAP2/3 clock code was written to notify the clockdomain code when
      the first clock in a clockdomain is enabled and when the last enabled
      clock in a clockdomain is disabled.  OMAP4 requires a different
      approach: the hwmod code needs to signal the clockdomain code when to
      force-enable and auto-idle a clockdomain during the IP block enable
      process.  The current conjecture is that once that hwmod sequence is
      implemented, it will no longer be necessary for the clock code to call
      into the clockdomain code for "optional clocks" on OMAP4.
      
      Add a static flag to the OMAP2+ clock code, clkdm_control, that by
      default preserves the OMAP2/3 behavior.  Also add a function,
      omap2_clk_disable_clkdm_control(), intended to be called from OMAP4
      and beyond clock initcalls, that disables the old behavior.
      
      Part of this patch was originally based on a patch by Rajendra Nayak
      <rnayak@ti.com>.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      
      
      12706c54
    • R
      OMAP2+: clockdomain: Add per clkdm lock to prevent concurrent state programming · 555e74ea
      Rajendra Nayak 提交于
      Since the clkdm state programming is now done from within the hwmod
      framework (which uses a per-hwmod lock) instead of the being done
      from the clock framework (which used a global lock), there is now a
      need to have per-clkdm locking to prevent races between different
      hwmods/modules belonging to the same clock domain concurrently
      programming the clkdm state.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      555e74ea
    • R
      OMAP2+: PM: idle clkdms only if already in idle · b86cfb52
      Rajendra Nayak 提交于
      The omap_set_pwrdm_state function forces clockdomains
      to idle, without checking the existing idle state
      programmed, instead based solely on the HW capability
      of the clockdomain to support idle.
      This is wrong and the clockdomains should be idled
      post a state_switch *only* if idle transitions on the
      clockdomain were already enabled.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Acked-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      b86cfb52
    • P
      OMAP2+: clockdomain: add clkdm_in_hwsup() · 32a363c0
      Paul Walmsley 提交于
      Add a new function, clkdm_in_hwsup(), that returns true if a clockdomain
      is configured for hardware-supervised idle.  It does not actually read the
      hardware; rather, it checks an internal flag in the struct clockdomain, which
      is changed when the clockdomain is switched in and out of hardware-supervised
      idle.  This should be safe, since all changes to the idle mode should
      pass through the clockdomain code.
      
      Based on a set of patches by Rajendra Nayak <rnayak@ti.com> which do
      the same thing by checking the hardware bits.  This approach should be
      faster and more compact.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Todd Poynor <toddpoynor@google.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      32a363c0
    • B
      OMAP2+: clockdomain: Add 2 APIs to control clockdomain from hwmod framework · 113a7413
      Benoit Cousson 提交于
      Duplicate the existing API for clockdomain enable from clock to enable
      a clock domain from hwmod framework.
      This will be needed when the hwmod framework will move from the current
      clock centric approach to the module based approach.
      
      These APIs are returning 0 for the moment for OMAP2 and OMAP3 until
      their hwmods are updated with the clksm attribute.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      113a7413
    • V
      OMAP: clockdomain: Remove redundant call to pwrdm_wait_transition() · a5122ff8
      Vaibhav Bedia 提交于
      The call to pwrdm_wait_transition() in clkdm_clk_enable()
      is redundant since the function pwrdm_clkdm_state_switch()
      which is called next also does the same thing.
      Signed-off-by: NVaibhav Bedia <vaibhav.bedia@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      a5122ff8
    • B
      OMAP4: hwmod: Introduce the module control in hwmod control · 45c38252
      Benoit Cousson 提交于
      Take advantage of the explicit modulemode control to fix
      the way parents clocks are managed.
      A module must be disabled before any parents are disabled.
      That programming model was not possible with the previous
      implementation that was considering a modulemode as a leaf
      clock node managed by the clock fmwk.
      This was leading to bad crash upon disable when the parent
      clock was gated before the module completed its transition
      to idle.
      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>
      45c38252
    • B
      OMAP4: cm: Add two new APIs for modulemode control · 288d6a16
      Benoit Cousson 提交于
      In OMAP4, a new programming model based on module control instead
      of clock control was introduced.
      Expose two APIs to allow the upper layer (omap_hwmod) to control
      the module mode independently of the parent clocks management.
      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 'omap4_cm_' fns to 'omap4_cminst_'; cleaned up
       kerneldoc]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      288d6a16
    • 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: prm: Remove deprecated functions · ad53ebb7
      Benoit Cousson 提交于
      The new prminst_xxx accessors based on partition and offset
      is now used, so removed all the previous prcm_xxx accessors.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: remove fn prototypes also]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      ad53ebb7
    • B
      OMAP4: prm: Replace warm reset API with the offset based version · e54433f1
      Benoit Cousson 提交于
      The warm reset function was still using the obsolete API.
      Replace it by the new one and move the file to the proper c file.
      
      Change the function names to stick to the file convention as
      suggested by Paul Walmsley <paul@pwsan.com>:
      prm_xxx -> prminst_xxx
      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>
      e54433f1
    • 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
      OMAP: hwmod: Wait the idle status to be disabled · 11b10341
      Benoit Cousson 提交于
      It is mandatory to wait for a module to be in disabled state before
      potentially disabling source clock or re-asserting a reset.
      
      omap_hwmod_idle and omap_hwmod_shutdown does not wait for
      the module to be fully idle.
      
      Add a cm_xxx accessor to wait the clkctrl idle status to be disabled.
      Fix hwmod_[idle|shutdown] to use this API.
      
      Based on Rajendra's initial patch.
      
      Please note that most interconnects hwmod will return one timeout because
      it is impossible for them to be in idle since the processor is accessing
      the registers though the interconnect.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Todd Poynor <toddpoynor@google.com>
      [paul@pwsan.com: move cpu_is_*() tests to the top of _wait_target_disable();
       incorporate some feedback from Todd]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      11b10341
    • 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
    • R
      OMAP4: clock data: Add missing divider selection for auxclks · ad03f1cb
      Rajendra Nayak 提交于
      On OMAP4 the auxclk nodes (part of SCRM) support both
      divider as well as parent selection.
      Supporting this requires splitting the existing nodes
      (which support only parent selection) into two nodes,
      one for parent and another for divider selection.
      The nodes for parent selection are named auxclk*_src_ck
      and the ones for divider selection as auxclk*_ck.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [b-cousson@ti.com: Rebase on top of clock cleanup
      and autogen alignement]
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      ad03f1cb
    • B
      OMAP: omap_device: Create clkdev entry for hwmod main_clk · bf1e0776
      Benoit Cousson 提交于
      Extend the existing function to create clkdev for every optional
      clocks to add a well one "fck" alias for the main_clk of the
      omap_hwmod.
      It will allow to remove these static clkdev entries from the
      clockXXX_data.c file.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Todd Poynor <toddpoynor@google.com>
      [paul@pwsan.com: remove all of the "fck" role clkdev aliases from the
       clock data files; fixed error message]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      bf1e0776
    • 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
    • A
      I2C: OMAP2+: add correct functionality flags to all omap2plus i2c dev_attr · 4d4441a6
      Andy Green 提交于
      This adds the new functionality flags for omap i2c unit to all OMAP2
      hwmod definitions
      
      Cc: patches@linaro.org
      Cc: Ben Dooks <ben-linux@fluff.org>
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAndy Green <andy.green@linaro.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      4d4441a6
    • A
      I2C: OMAP2+: Tag all OMAP2+ hwmod defintions with I2C IP revision · db791a75
      Andy Green 提交于
      Since we cannot trust (or even reliably find) the OMAP I2C
      peripheral unit's own revision register, we must inform the
      OMAP i2c driver of which IP version it is running on.  We
      do this by tagging the omap_hwmod_class for i2c on all the
      OMAP2+ platform / cpu specific hwmod init and passing it up
      to the driver (next patches).
      
      Cc: patches@linaro.org
      Cc: Ben Dooks <ben-linux@fluff.org>
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAndy Green <andy.green@linaro.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      db791a75
    • A
      I2C: OMAP2+: Set hwmod flags to only allow 16-bit accesses to i2c · 3e600522
      Andy Green 提交于
      Peter Maydell noticed when running under QEMU he was getting
      errors reporting 32-bit access to I2C peripheral unit registers
      that are documented to be 8 or 16-bit only[1][2]
      
      The I2C driver is blameless as it wraps its accesses in a
      function using __raw_writew and __raw_readw, it turned out it
      is the hwmod stuff.
      
      However the hwmod code already has a flag to force a
      perhipheral unit to only be accessed using 16-bit operations.
      
      This patch applies the 16-bit only flag to the 2430,
      OMAP3xxx and OMAP44xx hwmod structs.  2420 was already
      correctly marked up as 16-bit.
      
      The 2430 change will need testing by TI as arranged
      in the comments to the previous patch version.
      
      When the 16-bit flag is or-ed with other flags, it is placed
      first as requested in comments.
      
      [1] OMAP4430 Technical reference manual section 23.1.6.2
      [2] OMAP3530 Techincal reference manual section 18.6
      
      Cc: patches@linaro.org
      Cc: Ben Dooks <ben-linux@fluff.org>
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAndy Green <andy.green@linaro.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      3e600522
    • T
      OMAP4: hwmod data: Change DSS main_clk scheme · da7cdfac
      Tomi Valkeinen 提交于
      Currently using pm_runtime with DSS requires the DSS driver to enable
      the DSS functional clock before calling pm_runtime_get(). That makes it
      impossible to use pm_runtime in DSS as it is meant to be used, with
      pm_runtime callbacks.
      
      This patch changes the hwmod database for OMAP4 so that enabling the
      hwmod via pm_runtime will also enable the DSS functional clock, allowing
      us to use pm_runtime properly in DSS driver.
      
      The DSS HWMOD side is not really correct, not before nor after this
      patch, and getting DSS to retention will probably not work currently.
      However, it is not supported in the mainline kernel anyway, so this
      won't break anything.
      
      So this patch allows us to write the pm_runtime adaptation for the DSS
      driver the way it should be done, and the HWMOD/PM side can be fixed
      later.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      da7cdfac
    • S
      OMAP4: powerdomain data: Remove unsupported MPU powerdomain state · a57341f7
      Santosh Shilimkar 提交于
      On OMAP4430 devices, because of boot ROM code bug, MPU OFF state can't
      be attempted independently. When coming out of MPU OFF state, ROM code
      disables the clocks of IVAHD, TESLA which is not desirable. Hence the
      MPU OFF state is not usable on OMAP4430 devices.
      
      OMAP4460 onwards, MPU OFF state will be descoped completely because
      the DDR firewall falls in MPU power domain. When the MPU hit OFF state,
      DDR won't be accessible for other initiators. The deepest state supported
      is open switch retention (OSWR) just like CORE and PER PD on OMAP4430.
      
      So in summary MPU power domain OFF state is not supported on OMAP4
      and onwards designs. Thanks to new PRCM design, device off mode can
      still be achieved with power domains hitting OSWR state.
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [b-cousson@ti.com: Fix changelog typos]
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      a57341f7
    • S
      OMAP4: clock data: Keep GPMC clocks always enabled and hardware managed · 93cac2ad
      Santosh Shilimkar 提交于
      On OMAP4, CPU accesses on unmapped addresses are redirected to GPMC by
      L3 interconnect. Because of CPU speculative nature, such accesses are
      possible which can lead to indirect access to GPMC and if it's clock is
      not running, it can result in hang/abort on the platform.
      
      Above makes access to GPMC unpredictable during the execution, so it's
      module mode needs to be kept under hardware control instead of software
      control.
      Since the auto gating is supported for GPMC, there isn't any power impact
      because of this change.
      
      The issue was un-covered with security middleware running along with HLOS.
      In this case GPMC had a valid MMU descriptor on secure side where as HLOS
      didn't map the GMPC because it isn't being used.
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      [b-cousson@ti.com: Update subject and fix typos in the changelog]
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      93cac2ad
    • B
      OMAP4: powerdomain data: Fix core mem states and missing cefuse flag · 9a2a3603
      Benoit Cousson 提交于
      Since ES2.0, the core ocmram does not support a different state
      than the main power domain anymore during both ON and RET power
      domain state.
      Since PM is not supported at all in ES1.0, update the common
      structure.
      
      LOWPOWERSTATECHANGE is supported by the cefuse power domain but
      the flag was missing.
      Add the PWRDM_HAS_LOWPOWERSTATECHANGE in flags field.
      
      Update the TI copyright date to 2011.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      [paul@pwsan.com: moved the indentation changes to a different patch set]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      9a2a3603
    • R
      OMAP2+: PM: Initialise sleep_switch to a non-valid value · 6349b96b
      Rajendra Nayak 提交于
      sleep_switch which is initialised to 0 in omap_set_pwrdm_state
      happens to be a valid sleep_switch type (FORCEWAKEUP_SWITCH)
      which are defined as:
      
       #define FORCEWAKEUP_SWITCH      0
       #define LOWPOWERSTATE_SWITCH    1
      
      This causes the function to wrongly program some clock domains
      even when the Powerdomain is in ON state.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Acked-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      6349b96b
    • T
      OMAP4: hwmod data: Modify DSS opt clocks · 3a23aafc
      Tomi Valkeinen 提交于
      Add missing DSS optional clocks to HWMOD data for OMAP4xxx.
      
      Add HWMOD_CONTROL_OPT_CLKS_IN_RESET flag for dispc to fix dispc reset.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      [b-cousson@ti.com: Remove a comment and update the subject]
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      [paul@pwsan.com: removed DSS "fck" role and some clkdev aliases at Tomi's
       request]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      3a23aafc
    • J
      OMAP4: clock data: Remove UNIPRO clock nodes · 571078aa
      Jon Hunter 提交于
      UNIPRO was removed from OMAP4 devices from ES2.0 onwards.
      Since this IP was anyway non-functional and not supported,
      it is best to remove it completely.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      [b-cousson@ti.com: Update the changelog]
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      [paul@pwsan.com: split PRCM header file changes into a separate patch]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      571078aa