Re: [PATCH 03/13] clk: qcom: support for alpha pll properties

From: Stephen Boyd
Date: Fri Dec 08 2017 - 19:19:11 EST


On 09/28, Abhishek Sahu wrote:
> Alpha PLL is a generic name used for QCOM PLLâs which uses L
> and Alpha values for configuring the integer and fractional part.
> QCOM SoCâs use different types of Alpha PLLâs for which basic
> software configuration part is common with following differences.
>
> 1. All These PLLâs will have same basic registers like
> PLL_MODE, L_VAL, ALPHA_VAL but some of the register offsets are
> different in each PLL type.
> 2. PLL dynamic programming sequence will be different in some
> of the Alpha PLLâs
> 3. Some of the PLL wonât have 64 bit config control, 64 bit
> user control, VCO configuration etc.
>
> Now, this patch adds the Alpha PLL type in clock node and adds
> alpha PLL properties structure inside clk-alpha-pll.c. This PLL
> property will contain everything including register offsets, clock
> operations and other properties since all these properties will be
> fixed for Alpha PLL.
>
> This allows to support other types of Alpha PLL without addition
> of new flag and variable in structures of clk_alpha_pll.h. Also, we
> donât have to add operation for each Alpha PLLâs and export them.
>
> In future, we can get rid of most of the flags like following
>
> struct clk_alpha_pll {
> #define SUPPORTS_OFFLINE_REQ BIT(0)
> #define SUPPORTS_16BIT_ALPHA BIT(1)
> #define SUPPORTS_FSM_MODE BIT(2)
> u8 flags;
> };
>
> struct clk_alpha_pll_postdiv {
> u8 width;
> };
>
> Since all the above properties will be always same for different
> instances of same type of Alpha PLLâs.
>
> Signed-off-by: Abhishek Sahu <absahu@xxxxxxxxxxxxxx>
> ---

Applied to clk-next

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project