• 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
clk-alpha-pll.h 2.43 KB