1. 21 11月, 2015 3 次提交
  2. 18 11月, 2015 3 次提交
  3. 08 11月, 2015 1 次提交
  4. 28 10月, 2015 1 次提交
    • S
      clk: qcom: msm8960: Fix dsi1/2 halt bits · e5bf1991
      Stephen Boyd 提交于
      The halt bits for these clocks seem wrong. I get the following
      warning while booting on an msm8960-cdp:
      
      WARNING: CPU: 0 PID: 1 at drivers/clk/qcom/clk-branch.c:97 clk_branch_toggle+0xd0/0x138()
      dsi1_clk status stuck at 'on'
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.3.0-rc3-00113-g5532cfb5 #110
      Hardware name: Qualcomm (Flattened Device Tree)
      [<c0216984>] (unwind_backtrace) from [<c02138f8>] (show_stack+0x10/0x14)
      [<c02138f8>] (show_stack) from [<c04a525c>] (dump_stack+0x70/0xbc)
      [<c04a525c>] (dump_stack) from [<c0223c70>] (warn_slowpath_common+0x78/0xb4)
      [<c0223c70>] (warn_slowpath_common) from [<c0223d40>] (warn_slowpath_fmt+0x30/0x40)
      [<c0223d40>] (warn_slowpath_fmt) from [<c05fc2dc>] (clk_branch_toggle+0xd0/0x138)
      [<c05fc2dc>] (clk_branch_toggle) from [<c05f3f3c>] (clk_disable_unused_subtree+0x98/0x1b0)
      [<c05f3f3c>] (clk_disable_unused_subtree) from [<c05f3ec4>] (clk_disable_unused_subtree+0x20/0x1b0)
      [<c05f3ec4>] (clk_disable_unused_subtree) from [<c05f5474>] (clk_disable_unused+0x58/0xd8)
      [<c05f5474>] (clk_disable_unused) from [<c0209710>] (do_one_initcall+0xac/0x1ec)
      [<c0209710>] (do_one_initcall) from [<c0991db4>] (kernel_init_freeable+0x11c/0x1e8)
      [<c0991db4>] (kernel_init_freeable) from [<c0727ae0>] (kernel_init+0x8/0xec)
      [<c0727ae0>] (kernel_init) from [<c0210238>] (ret_from_fork+0x14/0x3c)
      
      Fix the status bits and the errors go away.
      
      Fixes: 5532cfb5 ("clk: qcom: mmcc-8960: Add DSI related clocks")
      Acked-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      e5bf1991
  5. 27 10月, 2015 4 次提交
  6. 26 10月, 2015 2 次提交
  7. 24 10月, 2015 3 次提交
  8. 23 10月, 2015 1 次提交
  9. 22 10月, 2015 19 次提交
    • J
      clk: ns2: add clock support for Broadcom Northstar 2 SoC · f7225a83
      Jon Mason 提交于
      The Broadcom Northstar 2 SoC is architected under the iProc
      architecture. It has the following PLLs: GENPLL SCR, GENPLL SW,
      LCPLL DDR, LCPLL Ports, all derived from an onboard crystal.
      Signed-off-by: NJon Mason <jonmason@broadcom.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      f7225a83
    • J
      clk: iproc: Separate status and control variables · 40c8bec3
      Jon Mason 提交于
      Some PLLs have separate registers for Status and Control.  The means the
      pll_base needs to be split into 2 new variables, so that those PLLs can
      specify device tree registers for those independently.  Also, add a new
      driver flag to identify this presence of the split, and let the driver
      know that additional registers need to be used.
      Signed-off-by: NJon Mason <jonmason@broadcom.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      40c8bec3
    • J
      clk: iproc: Split off dig_filter · f713c6bf
      Jon Mason 提交于
      The PLL loop filter/gain can be located in a separate register on some
      SoCs.  Split these off into a separate variable, so that an offset can
      be added if necessary.  Also, make the necessary modifications to the
      Cygnus and NSP drivers for this change.
      Signed-off-by: NJon Mason <jonmason@broadcom.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      f713c6bf
    • J
      clk: iproc: Add PLL base write function · 7968d241
      Jon Mason 提交于
      All writes to the PLL base address must be flushed if the
      IPROC_CLK_NEEDS_READ_BACK flag is set.  If we add a function to make the
      necessary write and reads, we can make sure that any future code which
      makes PLL base writes will do the correct thing.
      Signed-off-by: NJon Mason <jonmason@broadcom.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      7968d241
    • J
      clk: nsp: add clock support for Broadcom Northstar Plus SoC · 5f024b06
      Jon Mason 提交于
      The Broadcom Northstar Plus SoC is architected under the iProc
      architecture. It has the following PLLs: ARMPLL, GENPLL, LCPLL0, all
      derived from an onboard crystal.
      Signed-off-by: NJon Mason <jonmason@broadcom.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      5f024b06
    • J
      clk: iproc: Add PWRCTRL support · 01b6722f
      Jon Mason 提交于
      Some iProc SoC clocks use a different way to control clock power, via
      the PWRDWN bit in the PLL control register.  Since the PLL control
      register is used to access the PWRDWN bit, there is no need for the
      pwr_base when this is being used.  A new flag, IPROC_CLK_EMBED_PWRCTRL,
      has been added to identify this usage.  We can use the AON interface to
      write the values to enable/disable PWRDOWN.
      Signed-off-by: NJon Mason <jonmason@broadcom.com>
      [sboyd@codeaurora.org: Remove useless parentheses]
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      01b6722f
    • J
      clk: cygnus: Convert all macros to all caps · 2dfc8a27
      Jon Mason 提交于
      The macros that are being used to initialize the values of the clk
      structures should be all caps.  Find and replace all of them with their
      relevant counterparts.
      Signed-off-by: NJon Mason <jonmason@broadcom.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      2dfc8a27
    • A
      ARM: cygnus: fix link failures when CONFIG_COMMON_CLK_IPROC is disabled · 1e9bc9d6
      Arnd Bergmann 提交于
      When CONFIG_CYGNUS is set but CONFIG_COMMON_CLK_IPROC is disabled, the
      following link failures are caused:
      
      drivers/built-in.o: In function `cygnus_armpll_init':
      :(.init.text+0x1d290): undefined reference to `iproc_armpll_setup'
      drivers/built-in.o: In function `cygnus_genpll_clk_init':
      :(.init.text+0x1d2c4): undefined reference to `iproc_pll_clk_setup'
      drivers/built-in.o: In function `cygnus_lcpll0_clk_init':
      :(.init.text+0x1d304): undefined reference to `iproc_pll_clk_setup'
      drivers/built-in.o: In function `cygnus_mipipll_clk_init':
      :(.init.text+0x1d344): undefined reference to `iproc_pll_clk_setup'
      drivers/built-in.o: In function `cygnus_asiu_init':
      :(.init.text+0x1d370): undefined reference to `iproc_asiu_setup'
      
      It is fixed it by always selecting COMMON_CLK_IPROC from
      ARCH_BCM_IPROC, and making COMMON_CLK_IPROC a silent option (thus
      preventing it from being erroneously disabled by a user).
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJon Mason <jonmason@broadcom.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      1e9bc9d6
    • J
      clk: imx31: add missing of_node_put · 489e5d41
      Julia Lawall 提交于
      for_each_compatible_node performs an of_node_get on each iteration, so a
      break out of the loop requires an of_node_put.
      
      The semantic patch that fixes this problem is as follows
      (http://coccinelle.lip6.fr):
      
      // <smpl>
      @@
      local idexpression n;
      expression e;
      @@
      
       for_each_compatible_node(n,...) {
         ...
      (
         of_node_put(n);
      |
         e = n
      |
      +  of_node_put(n);
      ?  break;
      )
         ...
       }
      ... when != n
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      489e5d41
    • J
      clk: imx27: add missing of_node_put · 77cb8ee6
      Julia Lawall 提交于
      for_each_compatible_node performs an of_node_get on each iteration, so a
      break out of the loop requires an of_node_put.
      
      The semantic patch that fixes this problem is as follows
      (http://coccinelle.lip6.fr):
      
      // <smpl>
      @@
      local idexpression n;
      expression e;
      @@
      
       for_each_compatible_node(n,...) {
         ...
      (
         of_node_put(n);
      |
         e = n
      |
      +  of_node_put(n);
      ?  break;
      )
         ...
       }
      ... when != n
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      77cb8ee6
    • J
      clk: si5351: add missing of_node_put · a1bdfbaf
      Julia Lawall 提交于
      for_each_child_of_node performs an of_node_get on each iteration, so
      a break out of the loop requires an of_node_put.
      
      A simplified version of the semantic patch that fixes this problem is as
      follows (http://coccinelle.lip6.fr):
      
      // <smpl>
      @@
      expression root,e;
      local idexpression child;
      @@
      
       for_each_child_of_node(root, child) {
         ... when != of_node_put(child)
             when != e = child
      (
         return child;
      |
      +  of_node_put(child);
      ?  return ...;
      )
         ...
       }
      // </smpl>
      
      The resulting puts were manually moved to the end of the function for
      conciseness.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      a1bdfbaf
    • J
      clk: add missing of_node_put · 6bc9d9d6
      Julia Lawall 提交于
      for_each_matching_node_and_match performs an of_node_get on each iteration,
      so a break out of the loop requires an of_node_put.
      
      A simplified version of the semantic patch that fixes this problem is as
      follows (http://coccinelle.lip6.fr):
      
      // <smpl>
      @@
      expression e1,e2,e;
      local idexpression np;
      @@
      
       for_each_matching_node_and_match(np, e1, e2) {
         ... when != of_node_put(np)
             when != e = np
      (
         return np;
      |
      +  of_node_put(np);
      ?  return ...;
      )
         ...
       }
      // </smpl>
      
      Besides the problem identified by the semantic patch, this patch adds an
      of_node_get in front of saving np in a field of parent, to account for the
      fact that this value will be put on going on to the next element in the
      iteration, and then adds of_node_puts in the two loops where the parent
      pointer can be freed.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      6bc9d9d6
    • S
      clk: qoriq: Add ls2080a support. · 9e19ca2f
      Scott Wood 提交于
      LS2080A is the first implementation of the chassis 3 clockgen, which
      has a different register layout than previous chips.  It is also little
      endian, unlike previous chips.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Acked-by: NStephen Boyd <sboyd@codeaurora.org>
      9e19ca2f
    • S
      clk: qoriq: Move chip-specific knowledge into driver · 0dfc86b3
      Scott Wood 提交于
      The device tree should describe the chips (or chip-like subblocks) in
      the system, but it generally does not describe individual registers --
      it should identify, rather than describe, a programming interface.
      
      This has not been the case with the QorIQ clockgen nodes.  The
      knowledge of what each bit setting of CLKCnCSR means is encoded in
      three places (binding, pll node, and mux node), and the last also needs
      to know which options are valid on a particular chip.  All three of
      these locations are considered stable ABI, making it difficult to fix
      mistakes (of which I have found several), much less refactor the
      abstraction to be able to address problems, limitations, or new chips.
      
      Under the current binding, a pll clock specifier of 2 means that the
      PLL is divided by 4 -- and the driver implements this, unless there
      happen to be four clock-output-names rather than 3, in which case it
      interprets it as PLL divided by 3.  This does not appear in the binding
      documentation at all.  That hack is now considered stable ABI.
      
      The current device tree nodes contain errors, such as saying that
      T1040 can set a core clock to PLL/4 when only PLL and PLL/2 are options.
      The current binding also ignores some restrictions on clock selection,
      such as p5020's requirement that if a core uses the "wrong" PLL, that
      PLL must be clocked lower than the "correct" PLL and be at most 80% of
      the rated CPU frequency.
      
      Possibly because of the lack of the ability to express such nuance in
      the binding, some valid options are omitted from the device trees, such
      as the ability on p4080 to run cores 0-3 from PLL3 and cores 4-7 from
      PLL1 (again, only if they are at most 80% of rated CPU frequency).
      This omission, combined with excessive caution in the cpufreq driver
      (addressed in a subsequent patch), means that currently on a 1500 MHz
      p4080 with typical PLL configuration, cpufreq can lower the frequency
      to 1200 MHz on half the CPUs and do nothing on the others.  With this
      patchset, all CPUs can be lowered to 1200 MHz on a rev2 p4080, and on a
      rev3 p4080 half can be lowered to 750 MHz and the other half to 600
      MHz.
      
      The current binding only deals with CPU clocks.  To describe FMan in
      the device tree, we need to describe its clock.  Some chips have
      additional muxes that work like the CPU muxes, but are not described in
      the device tree.  Others require inspecting the Reset Control Word to
      determine which PLL is used.  Rather than continue to extend this mess,
      replace it.  Have the driver bind to the chip-specific clockgen
      compatible, and keep the detailed description of quirky chip variations
      in the driver, where it can be easily fixed, refactored, and extended.
      
      Older device trees will continue to work (including a workaround for
      old ls1021a device trees that are missing compatible and reg in the
      clockgen node, which even the old binding required).  The pll/mux
      details in old device trees will be ignored, but "clocks" properties
      pointing at the old nodes will still work, and be directed at the
      corresponding new clock.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Acked-by: NStephen Boyd <sboyd@codeaurora.org>
      0dfc86b3
    • E
      clk: sunxi: mod1 clock support · 9b038bc5
      Emilio López 提交于
      The module 1 type of clocks consist of a gate and a mux and are used on
      the audio blocks to mux and gate the PLL2 outputs for AC97, IIS or
      SPDIF. This commit adds support for them on the sunxi clock driver.
      Signed-off-by: NEmilio López <emilio@elopez.com.ar>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Reviewed-by: NChen-Yu Tsai <wens@csie.org>
      9b038bc5
    • E
      clk: sunxi: codec clock support · e2771545
      Emilio López 提交于
      The codec clock on sun4i, sun5i and sun7i is a simple gate with PLL2 as
      parent. Add a driver for such a clock.
      Signed-off-by: NEmilio López <emilio@elopez.com.ar>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Reviewed-by: NChen-Yu Tsai <wens@csie.org>
      e2771545
    • M
      clk: sunxi: pll2: Add A13 support · eb662f85
      Maxime Ripard 提交于
      The A13, unlike the A10 and A20, doesn't use a pass-through exception for
      the 0 value in the pre and post dividers, but increments all the values
      written in the register by one.
      
      Add an exception for both these cases to handle them nicely.
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Reviewed-by: NChen-Yu Tsai <wens@csie.org>
      eb662f85
    • M
      clk: sunxi: Add a driver for the PLL2 · 460d0d44
      Maxime Ripard 提交于
      The PLL2 on the A10 and later SoCs is the clock used for all the audio
      related operations.
      
      This clock has a somewhat complex output tree, with three outputs (2X, 4X
      and 8X) with a fixed divider from the base clock, and an output (1X) with a
      post divider.
      
      However, we can simplify things since the 1X divider can be fixed, and we
      end up by having a base clock not exposed to any device (or at least
      directly, since the 4X output doesn't have any divider), and 4 fixed
      divider clocks that will be exposed.
      
      This clock seems to have been introduced, at least in this form, in the
      revision B of the A10, but we don't have any information on the clock used
      on the revision A.
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Reviewed-by: NChen-Yu Tsai <wens@csie.org>
      460d0d44
    • M
      clk: Add a basic multiplier clock · f2e0a532
      Maxime Ripard 提交于
      Some clocks are using a multiplier component, however, unlike their mux,
      gate or divider counterpart, these factors don't have a basic clock
      implementation.
      
      This leads to code duplication across platforms that want to use that kind
      of clocks, and the impossibility to use the composite clocks with such a
      clock without defining your own rate operations.
      
      Create such a driver in order to remove these issues, and hopefully factor
      the implementations, reducing code size across platforms and consolidating
      the various implementations.
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Reviewed-by: NChen-Yu Tsai <wens@csie.org>
      f2e0a532
  10. 21 10月, 2015 3 次提交