Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1435552 > unrolled thread

Re: [PATCH v2] clk: Add fractional scale clock support

Started byStephen Boyd <sboyd@codeaurora.org>
First post2016-07-01 20:50 +0200
Last post2016-07-02 02:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2] clk: Add fractional scale clock support Stephen Boyd <sboyd@codeaurora.org> - 2016-07-01 20:50 +0200
    Re: [PATCH v2] clk: Add fractional scale clock support Hoan Tran <hotran@apm.com> - 2016-07-02 02:10 +0200

#1435552 — Re: [PATCH v2] clk: Add fractional scale clock support

FromStephen Boyd <sboyd@codeaurora.org>
Date2016-07-01 20:50 +0200
SubjectRe: [PATCH v2] clk: Add fractional scale clock support
Message-ID<rQbFM-1Fl-15@gated-at.bofh.it>
Sorry I replied offlist before. Pressed the wrong key.

On 06/30, Hoan Tran wrote:
> On Thu, Jun 30, 2016 at 1:23 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> >
> > How is this different from clk-fractional-divider.c?
> >
> 
> This is a driver which clock output is multiplied with a fixed fractional
> scale (denominator).
> A field inside a register is used to configure the multiplier.
> 
> Example: With fractional scale is 1/8.
> Freq_out = Freq_parent * multiplier * (1/8)
> 
> For fractional-divider, there are 2 fields of a register are used which
>  - A field for numerator
>  - A field for denominator
> Freq_out = Freq_parent * numerator / denominator
> 

Ok so the difference is that the denominator is a fixed value?
Perhaps that can be modeled as a clk-multiplier that is used as
the only parent of a fixed divider? Or we can add a flag to the
clk-fractional-divider code to handle this minor difference.

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

[toc] | [next] | [standalone]


#1435692

FromHoan Tran <hotran@apm.com>
Date2016-07-02 02:10 +0200
Message-ID<rQgFr-4PT-1@gated-at.bofh.it>
In reply to#1435552
Hi Stephen,

On Fri, Jul 1, 2016 at 11:38 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> Sorry I replied offlist before. Pressed the wrong key.
>
> On 06/30, Hoan Tran wrote:
>> On Thu, Jun 30, 2016 at 1:23 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>> >
>> > How is this different from clk-fractional-divider.c?
>> >
>>
>> This is a driver which clock output is multiplied with a fixed fractional
>> scale (denominator).
>> A field inside a register is used to configure the multiplier.
>>
>> Example: With fractional scale is 1/8.
>> Freq_out = Freq_parent * multiplier * (1/8)
>>
>> For fractional-divider, there are 2 fields of a register are used which
>>  - A field for numerator
>>  - A field for denominator
>> Freq_out = Freq_parent * numerator / denominator
>>
>
> Ok so the difference is that the denominator is a fixed value?

The major difference is a fixed denominator.
Another difference is:
In case CLK_FRACTIONAL_SCALE_INVERTED=1, the freq_out is calculated as below

Freq_out = Freq_parent * (fixed_denominator - multiplier) / fixed_denominator.

> Perhaps that can be modeled as a clk-multiplier that is used as
> the only parent of a fixed divider?

Because of CLK_FRACTIONAL_SCALE_INVERTED flag, I don't know how to
model as a clk-multiplier. And how to pass the fixed denominator into
a clk-multiplier.

> Or we can add a flag to the
> clk-fractional-divider code to handle this minor difference.

This driver is used 2 register fields for numerator, denominator and
calculates both of them.
Do you think I can integrate this fractional scale into it ?

Thanks
Hoan

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web