1. 06 May, 2016 1 commit
    • Stephen Boyd's avatar
      clk: nxp: lpc18xx: Initialize clk_init_data::flags to 0 · a4447235
      Stephen Boyd authored
      Failure to initialize this flag to 0 by default can result in
      stack junk filling the clk_init_data structure and weird things
      happen. Joachim noticed that the critical clk feature started
      triggering for these clks causing boot failures, when it really
      shouldn't have happened:
      
      BUG: scheduling while atomic: swapper/0/0x00000002
      CPU: 0 PID: 0 Comm: swapper Not tainted
      4.6.0-rc6-next-20160505-00001-g5c8320450d1c #826
      Hardware name: NXP LPC18xx/43xx (Device Tree)
      [<2800be81>] (unwind_backtrace) from [<2800b22f>] (show_stack+0xb/0xc)
      [<2800b22f>] (show_stack) from [<2801ea21>] (__schedule_bug+0x2d/0x44)
      [<2801ea21>] (__schedule_bug) from [<281dc937>] (__schedule+0x3b/0x268)
      [<281dc937>] (__schedule) from [<281dcbbb>] (schedule+0x57/0x64)
      [<281dcbbb>] (schedule) from [<281de8ef>] (schedule_timeout+0xfb/0x120)
      [<281de8ef>] (schedule_timeout) from [<28030fcd>] (msleep+0xf/0x12)
      [<28030fcd>] (msleep) from [<28165a6d>] (clk_creg_32k_prepare+0x1f/0x24)
      [<28165a6d>] (clk_creg_32k_prepare) from [<281620d5>]
      (clk_core_prepare+0x1d/0x36)
      [<281620d5>] (clk_core_prepare) from [<2816340b>] (clk_register+0x22f/0x318)
      [<2816340b>] (clk_register) from [<282b06c9>] (lpc18xx_creg_clk_init+0x55/0x84)
      [<282b06c9>] (lpc18xx_creg_clk_init) from [<282b0149>] (of_clk_init+0xc1/0x12c)
      [<282b0149>] (of_clk_init) from [<282a665d>] (time_init+0x15/0x20)
      [<282a665d>] (time_init) from [<282a457d>] (start_kernel+0x169/0x274)
      [<282a457d>] (start_kernel) from [<28008025>] (0x28008025)
      bad: scheduling from the idle thread!
      CPU: 0 PID: 0 Comm: swapper Tainted: G W
      4.6.0-rc6-next-20160505-00001-g5c8320450d1c #826
      
      Fix this by initializing the flags member to 0.
      Acked-by: default avatarJoachim Eastwood <manabian@gmail.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      a4447235
  2. 04 Mar, 2016 1 commit
  3. 03 Mar, 2016 1 commit
    • Sylvain Lemieux's avatar
      clk: lpc32xx: fix compilation warning · 8626556f
      Sylvain Lemieux authored
      Remove the following false positives compilation warning:
      - drivers/clk/nxp/clk-lpc32xx.c: In function 'lpc32xx_clk_register':
        warning: 'hw' may be used uninitialized in this function [-Wmaybe-uninitialized]
      - drivers/clk/nxp/clk-lpc32xx.c: In function 'clk_hclk_pll_round_rate':
        warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
        warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
        warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      Tested using gcc version 4.7.3.
      Signed-off-by: default avatarSylvain Lemieux <slemieux@tycoint.com>
      [sboyd@codeaurora.org: Drop assignment of hw to NULL as return
      silences it and is less likely to lead to hiding problems later]
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      8626556f
  4. 02 Mar, 2016 1 commit
  5. 10 Feb, 2016 1 commit
  6. 09 Feb, 2016 1 commit
  7. 29 Jan, 2016 2 commits
    • Geliang Tang's avatar
      clk: move the common clock's to_clk_*(_hw) macros to clk-provider.h · 5fd9c05c
      Geliang Tang authored
      to_clk_*(_hw) macros have been repeatedly defined in many places.
      This patch moves all the to_clk_*(_hw) definitions in the common
      clock framework to public header clk-provider.h, and drop the local
      definitions.
      Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      5fd9c05c
    • Heiko Stuebner's avatar
      clk-divider: make sure read-only dividers do not write to their register · 50359819
      Heiko Stuebner authored
      Commit e6d5e7d9 ("clk-divider: Fix READ_ONLY when divider > 1") removed
      the special ops struct for read-only clocks and instead opted to handle
      them inside the regular ops.
      
      On the rk3368 this results in breakage as aclkm now gets set a value.
      While it is the same divider value, the A53 core still doesn't like it,
      which can result in the cpu ending up in a hang.
      The reason being that "ACLKENMasserts one clock cycle before the rising
      edge of ACLKM" and the clock should only be touched when STANDBYWFIL2
      is asserted.
      
      To fix this, reintroduce the read-only ops but do include the round_rate
      callback. That way no writes that may be unsafe are done to the divider
      register in any case.
      
      The Rockchip use of the clk_divider_ops is adapted to this split again,
      as is the nxp, lpc18xx-ccu driver that was included since the original
      commit. On lpc18xx-ccu the divider seems to always be read-only
      so only uses the new ops now.
      
      Fixes: e6d5e7d9 ("clk-divider: Fix READ_ONLY when divider > 1")
      Reported-by: default avatarZhang Qing <zhangqing@rock-chips.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      50359819
  8. 24 Dec, 2015 1 commit
  9. 26 Oct, 2015 2 commits
  10. 20 Jul, 2015 1 commit
  11. 18 Jun, 2015 2 commits