1. 27 Jan, 2018 1 commit
    • Stephen Boyd's avatar
      Merge branches 'clk-qcom-alpha-pll', 'clk-check-ops-ptr', 'clk-protect-rate'... · 74b48999
      Stephen Boyd authored
      Merge branches 'clk-qcom-alpha-pll', 'clk-check-ops-ptr', 'clk-protect-rate' and 'clk-omap' into clk-next
      
      * clk-qcom-alpha-pll:
        clk: qcom: add read-only alpha pll post divider operations
        clk: qcom: support for 2 bit PLL post divider
        clk: qcom: support Brammo type Alpha PLL
        clk: qcom: support Huayra type Alpha PLL
        clk: qcom: support for dynamic updating the PLL
        clk: qcom: support for alpha mode configuration
        clk: qcom: flag for 64 bit CONFIG_CTL
        clk: qcom: fix 16 bit alpha support calculation
        clk: qcom: support for alpha pll properties
      
      * clk-check-ops-ptr:
        clk: check ops pointer on clock register
      
      * clk-protect-rate:
        clk: fix set_rate_range when current rate is out of range
        clk: add clk_rate_exclusive api
        clk: cosmetic changes to clk_summary debugfs entry
        clk: add clock protection mechanism to clk core
        clk: use round rate to bail out early in set_rate
        clk: rework calls to round and determine rate callbacks
        clk: add clk_core_set_phase_nolock function
        clk: take the prepare lock out of clk_core_set_parent
        clk: fix incorrect usage of ENOSYS
      
      * clk-omap:
        clk: ti: Drop legacy clk-3xxx-legacy code
      74b48999
  2. 21 Dec, 2017 1 commit
  3. 20 Dec, 2017 9 commits
  4. 19 Dec, 2017 1 commit
    • Jerome Brunet's avatar
      clk: check ops pointer on clock register · 29fd2a34
      Jerome Brunet authored
      Nothing really prevents a provider from (trying to) register a clock
      without providing the clock ops structure.
      
      We do check the individual fields before using them, but not the
      structure pointer itself. This may have the usual nasty consequences when
      the pointer is dereferenced, most likely when checking one the field
      during the initialization.
      
      This is fixed by returning an error on clock register if the ops pointer
      is NULL.
      Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
      Signed-off-by: default avatarMichael Turquette <mturquette@baylibre.com>
      Link: lkml.kernel.org/r/20171219083329.24746-1-jbrunet@baylibre.com
      29fd2a34
  5. 14 Dec, 2017 6 commits
  6. 13 Dec, 2017 4 commits
    • Abhishek Sahu's avatar
      clk: qcom: support for alpha mode configuration · c45ae598
      Abhishek Sahu authored
      The current configuration does not fully configure PLL alpha mode
      and values so this patch
      
      1. Configures PLL_ALPHA_VAL_U for PLL which supports 40 bit alpha.
      2. Adds alpha enable and alpha mode configuration support.
      Signed-off-by: default avatarAbhishek Sahu <absahu@codeaurora.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      c45ae598
    • Abhishek Sahu's avatar
      clk: qcom: flag for 64 bit CONFIG_CTL · 26945e0a
      Abhishek Sahu authored
      Some of the Alpha PLLs (like Spark and Brammo) don't have a
      CONFIG_CTL_U register. Add logic to detect when PLLs don't have
      this second config register and skip programming it during PLL
      initialization.
      Signed-off-by: default avatarAbhishek Sahu <absahu@codeaurora.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      26945e0a
    • Abhishek Sahu's avatar
      clk: qcom: fix 16 bit alpha support calculation · 1e859d3e
      Abhishek Sahu authored
      The alpha value calculation has been written for 40-bit alpha
      values which doesn't work work properly for 16-bit ones. The
      alpha value is calculated on the basis of ALPHA_BITWIDTH to make
      the computation easy for 40 bit alpha. After calculating the 32
      bit alpha, it is converted to 40 bit alpha by making lower bits
      zero. But if actual alpha register width is less than
      ALPHA_BITWIDTH, then the actual width can be used for
      calculation. This also means, during the 40 bit alpha pll set
      rate path, the lower alpha register is not configured
      
      Change the code to calculate the rate and register values from
      'alpha_width' instead of hard-coding it so that it can work for
      the different widths that are supported.
      Signed-off-by: default avatarAbhishek Sahu <absahu@codeaurora.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      1e859d3e
    • Abhishek Sahu's avatar
      clk: qcom: support for alpha pll properties · 28d3f06e
      Abhishek Sahu authored
      Alpha PLL is a generic name used for QCOM PLLs which uses L and
      Alpha values for configuring the integer and fractional part.
      QCOM SoCs use different types of Alpha PLLs for which basic
      software configuration part is common with following differences.
      
        1. All these PLLs have the same basic registers like
           PLL_MODE, L_VAL, ALPHA_VAL but some of the register offsets are
           different between PLLs types.
      
        2. The dynamic programming sequence is different in some
           of the Alpha PLLs
      
        3. Some of the PLLs don’t have 64 bit config control, 64 bit
           user control, VCO configuration, etc.
      Signed-off-by: default avatarAbhishek Sahu <absahu@codeaurora.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      28d3f06e
  7. 07 Dec, 2017 18 commits