1. 24 10月, 2013 1 次提交
  2. 23 8月, 2013 1 次提交
    • R
      ARM: OMAP4: clock: Lock PLLs in the right sequence · eeb6603f
      Rajendra Nayak 提交于
      On OMAP4 we have clk_set_rate()s being done for a few
      DPLL clock nodes, as part of the clock init code, since
      the bootloaders no longer locks these DPLLs.
      
      So we have a clk_set_rate() done for a ABE DPLL node (which
      inturn locks it) followed by a clk_set_rate() for the USB DPLL.
      
      With USB DPLL being in bypass, we have this parent->child
      relationship thats formed while the clocks get registered.
      
      dpll_abe_ck
          |
          V
      dpll_abe_x2_ck
          |
          V
      dpll_abe_m3x2_ck
          |
          V
      usb_hs_clk_div_ck
          |
          V
      dpll_usb_ck
      
      This is because usb_hs_clk_div_ck is bypass clock for dpll_usb_ck.
      
      So with this parent->child relationship in place, a clk_set_rate()
      on ABE DPLL results eventually in a clk_set_rate() call on USB DPLL,
      because CCF does a clk_change_rate() (as part of clk_set_rate()) on
      all downstream clocks resulting from a rate change on the top clock.
      
      So its important that we lock USB DPLL before we lock ABE DPLL.
      Without which we see these error logs at boot.
      [These error logs will not be seen if using a bootloader that locks
      USB DPLL]
      
      [    0.000000] clock: dpll_usb_ck failed transition to 'locked'
      [    0.000000] Division by zero in kernel.
      [    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af002-dirty #7
      [    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
      [    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
      [    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
      [    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
      [    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
      [    0.000000] Division by zero in kernel.
      [    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af002-dirty #7
      [    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
      [    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
      [    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
      [    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
      [    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
      [    0.000000] Division by zero in kernel.
      [    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af002-dirty #7
      [    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
      [    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
      [    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
      [    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
      [    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
      [    0.000000] Division by zero in kernel.
      [    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af002-dirty #7
      [    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
      [    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
      [    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
      [    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
      [    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
      [    0.000000] Division by zero in kernel.
      [    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af002-dirty #7
      [    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
      [    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
      [    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
      [    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
      [    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
      [    0.000000] Division by zero in kernel.
      [    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af002-dirty #7
      [    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
      [    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
      [    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
      [    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
      [    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
      [    0.000000] clock: trace_clk_div_ck: could not find divisor for target rate 0 for parent pmd_trace_clk_mux_ck
      [    0.000000] Division by zero in kernel.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      eeb6603f
  3. 18 3月, 2013 1 次提交
  4. 13 3月, 2013 2 次提交
    • P
      ARM: OMAP4: PM: fix PM regression introduced by recent clock cleanup · 92702df3
      Paul Walmsley 提交于
      Commit 17b7e7d3 ("ARM: OMAP4:
      clock/hwmod data: start to remove some IP block control "clocks"")
      introduced a regression preventing the L3INIT clockdomain of OMAP4
      systems from entering idle.  This in turn prevented these systems from
      entering full chip clock-stop.
      
      The regression was caused by the incorrect removal of a so-called
      "optional functional clock" from the OMAP4 clock data.  This wasn't
      caught for two reasons.  First, I missed the retention entry failure
      in the branch test logs:
      
      http://www.pwsan.com/omap/testlogs/cleanup_a_3.9/20130126014242/pm/4460pandaes/4460pandaes_log.txt
      
      Second, the integration data for the OCP2SCP PHY IP block, added by
      commit 0c668875 ("ARM: OMAP4: hwmod
      data: add remaining USB-related IP blocks"), should have associated this
      clock with the IP block, but did not.
      
      Fix by adding back the so-called "optional" functional clock to the
      clock data, and by linking that clock to the OCP2SCP PHY IP block
      integration hwmod data.
      
      The problem patch was discovered by J, Keerthy <j-keerthy@ti.com>.
      
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      92702df3
    • J
      ARM: OMAP4: clock data: lock USB DPLL on boot · 71b37071
      Jon Hunter 提交于
      Some versions of the u-boot bootloader do not lock the USB DPLL and
      when the USB DPLL is not locked, then it is observed that the L3INIT
      power domain does not transition to retention state during kernel
      suspend on OMAP4 devices. Fix this by locking the USB DPLL at 960 MHz
      on kernel boot.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      71b37071
  5. 09 2月, 2013 1 次提交
  6. 26 1月, 2013 2 次提交
    • P
      ARM: OMAP4: clock/hwmod data: remove MODULEMODE entries in mux + gate combos · ee877acd
      Paul Walmsley 提交于
      Convert all DEFINE_OMAP_MUX_GATE() combinations that list MODULEMODE
      registers in their gate arguments to DEFINE_OMAP_MUX(), dropping the
      MODULEMODE data.  This is possible because the MODULEMODE bits control
      IP blocks, not clocks; and the hwmod code takes care of IP block
      control.  Rename these clocks to reflect the original multiplexer name
      as specified in the comments.  And convert the hwmod data to use the
      multiplexer clock name.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      ee877acd
    • P
      ARM: OMAP4: clock/hwmod data: start to remove some IP block control "clocks" · 17b7e7d3
      Paul Walmsley 提交于
      Remove some leaf "clocks" that are actually IP block idle control
      points, since these should now be handled by the hwmod code.
      
      There are still a few types of MODULEMODE clocks that need to be
      cleaned up:
      
      - those still in use by driver or integration code
      
      - those in DEFINE_CLK_OMAP_MUX_GATE() blocks; the gate portion of
        these should be removed
      
      A similar process may also be possible on OMAP2/3.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      17b7e7d3
  7. 19 1月, 2013 1 次提交
  8. 15 12月, 2012 6 次提交
    • P
      ARM: OMAP4: clock data: DPLLs are missing bypass clocks in their parent lists · b8675e2c
      Paul Walmsley 提交于
      Booting OMAP4460 Pandaboard ES with a recent u-boot results in this
      warning:
      
      WARNING: at arch/arm/mach-omap2/dpll3xxx.c:427 omap3_noncore_dpll_enable+0xf4/0x110()
      
      The OMAP4 DPLL parent clock names only listed the reference clocks,
      not the bypass clocks.  Fix by adding the bypass clocks to the DPLL
      parent lists.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      b8675e2c
    • P
      ARM: OMAP4: clock data: div_iva_hs_clk is a power-of-two divider · 628a37d4
      Paul Walmsley 提交于
      The OMAP4 clock divider "div_iva_hs_clk" is listed in the clock data
      as an OMAP HSDIVIDER, but it's actually a power-of-two divider.  This
      causes a warning during boot on an OMAP4460 Pandaboard-ES with a
      recent u-boot:
      
      WARNING: at arch/arm/mach-omap2/clkt_clksel.c:143 omap2_clksel_recalc+0xf4/0x12c()
      clock: div_iva_hs_clk: could not find fieldval 0 for parent dpll_core_m5x2_ck
      
      Fix by converting the data for this clock to a power-of-two divider.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      628a37d4
    • J
      ARM: OMAP4460: Workaround ABE DPLL failing to turn-on · 8c197ccf
      Jon Hunter 提交于
      With the latest mainline u-boot bootloader (v2012.10), timers (5-8) in
      the ABE power domain are failing to turn-on. The timers never come out
      of the disabled state when setting the module-mode field to enable.
      
      The problem was exposed when u-boot was updated to NOT configure and
      lock the ABE DPLL on start-up. If the ABE DPLL is configured and locked
      by u-boot the problem does not occur. However, if the ABE DPLL is in the
      idle low-power bypass state and we attempt to enable a timer in the ABE
      power domain, it remains stuck in the disabled state. It appears to be a
      problem the timer interface clock as this comes from the ABE DPLL.
      
      If we place the ABE DPLL in the MN-bypass state and not the idle
      low-power state, then this problem is not seen.
      
      This problem only appears to occur on OMAP4460 and not OMAP4430.
      
      Workaround this problem by locking the ABE DPLL for OMAP4460 in the
      kernel on boot. By locking the ABE DPLL, when clocks from the ABE DPLL
      are not being requested the DPLL will transition into a low-power stop
      mode.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      8c197ccf
    • J
      ARM: OMAP4: Enhance support for DPLLs with 4X multiplier · 3ff51ed8
      Jon Hunter 提交于
      On OMAP4 devices, the ABE DPLL has an internal 4X multiplier that can
      be enabled or disabled in addition to the standard configurable
      multiplier (M) for OMAP DPLLs. When configuring the ABE DPLL the 4X
      multiplier is accounted for by checking to see whether it is enabled or
      not. However, when calculating a new rate we only check to see if the
      rate can be achieved with the current setting for the 4X multiplier.
      Enhance the round_rate() function for such DPLLs to see if the rate
      can be achieved with the 4X multiplier if it cannot be achieved without
      the 4X multiplier.
      
      This change is necessary, because when using the 32kHz clock as the
      source clock for the ABE DPLL, the default DPLL frequency for the ABE
      DPLL cannot be achieved without enabling the 4X multiplier.
      
      When using the 32kHz clock as the source clock for the ABE DPLL and
      attempting to lock the DPLL to 98.304MHz (default frequency), it was
      found that the DPLL would fail to lock if the low-power mode for the DPLL
      was not enabled. From reviewing boot-loader settings that configure the
      ABE DPLL it was found that the low-power mode is enabled when using the
      32kHz clock source, however, the documentation for OMAP does not state
      that this is a requirement. Therefore, introduce a new function for
      OMAP4 devices to see if low-power mode can be enabled when calculating a
      new rate to ensure the DPLL will lock.
      
      New variables for the last calculated 4X multiplier and low-power
      setting have been added to the dpll data structure as well as variables
      defining the bit mask for enabling these features via the DPLL's
      control_reg. It is possible that we could eliminate these bit masks from
      the dpll data structure as these bit masks are not unique to OMAP4, if
      it is preferred.
      
      The function omap3_noncore_program_dpll() has been updated to avoid
      passing the calculated values for the multiplier (M) and divider (N) as
      these are stored in the clk structure.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      3ff51ed8
    • J
      ARM: OMAP4: Add function table for non-M4X dplls · 9b4fcc86
      Jon Hunter 提交于
      Currently all OMAP4 non-core DPLLs use the same function table for
      configuring DPLLs. For these DPLLs, the function
      omap4_dpll_regm4xen_recalc() is used to recalculate the DPLL rate and
      the function omap4_dpll_regm4xen_round_rate() is used to calculate the
      closest rate to that requested. However, these omap4_dpll_regm4xen_xxx()
      functions are only applicable to the ABE DPLL and not the other non-core
      DPLLs. Therefore, add a new function table for non-core DPLLs that do
      not include the 4X-multiplier (M4X).
      
      Please note that using these omap4_dpll_regm4x_xxx() function works for
      the non-M4X DPLLs today because we only check to see if the 4X
      multiplier is enabled when calculating the rate. However, it is planned
      that the dpll functions will be enhanced to enable the 4X multiplier as
      necessary (in order to achieve the requested rate) and so calling these
      functions for non-M4X dplls will no longer work.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      9b4fcc86
    • J
      ARM: OMAP4: Update timer clock aliases · ba68c7ef
      Jon Hunter 提交于
      Commit "ARM: dts: OMAP4: Update timer addresses" updated the device-tree
      names of the OMAP4 timers 5-7 because the default address for the timers
      was changed from the L3 address to the MPU private address. When booting
      with device-tree, this introduces a regression when attempting to set
      the parent clock of timers 5-7 to the sys_clk_div_ck. Therefore, update
      the clock aliases for timer 5-7 to reflect the updated device-tree name
      for the timers.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      [paul@pwsan.com: updated to apply after the CCF conversion]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      ba68c7ef
  9. 13 11月, 2012 1 次提交
    • R
      ARM: OMAP4: clock: Add 44xx data using common struct clk · cb26867e
      Rajendra Nayak 提交于
      This patch is output from updated omap hw data autogeneration scripts
      mostly contributed by Mike Turquette, with some later fixes from me.
      All data is added into a new cclock44xx_data.c file which will be
      switched with clock44xx_data.c file in a later patch.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: replace omap2_init_clksel_parent() with
       omap2_clksel_find_parent_index(); reflowed macros; updated
       DEFINE_STRUCT_CLK_HW_OMAP macro to include clkdm_name;
       use macros for clksel mux+gate clocks; many other fixes]
      [mturquette@ti.com: converted DPLL outputs to HSDIVIDER macro; trace_clk_div_ck
       has clkdm ops]
      Signed-off-by: NMike Turquette <mturquette@ti.com>
      [paul@pwsan.com: fixed the omap-gpmc.fck alias per commit a2e5b90b; fixed
       several checkpatch issues; moved the dpll3xxx.c clockdomain modifications to
       another patch]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      cb26867e