Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1654029
| From | Stefan Wahren <stefan.wahren@i2se.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER |
| Date | 2017-05-31 11:10 +0200 |
| Message-ID | <tN7NE-2Od-33@gated-at.bofh.it> (permalink) |
| References | <tMSbV-1dJ-37@gated-at.bofh.it> <tMUno-2tM-9@gated-at.bofh.it> <tN7aV-2iQ-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Am 31.05.2017 um 10:28 schrieb Phil Elwell:
> Hi Stefan,
>
> On 30/05/2017 19:41, Stefan Wahren wrote:
>> Hi Phil,
>>
>>> Phil Elwell <phil@raspberrypi.org> hat am 30. Mai 2017 um 18:28 geschrieben:
>>>
>>>
>>> Restrict clock sources for the PCM peripheral to the oscillator and
>>> PLLD_PER because other source may have varying rates or be switched off.
>>> Prevent other sources from being selected by replacing their names in
>>> the list of potential parents with dummy entries (entry index is
>>> significant).
>> i like to have this as a comment above the definition of bcm2835_pcm_per_parents.
> Sure - good idea.
>
>>> Signed-off-by: Phil Elwell <phil@raspberrypi.org>
>>> ---
>>> drivers/clk/bcm/clk-bcm2835.c | 11 +++++++++++
>>> 1 file changed, 11 insertions(+)
>>>
>>> diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
>>> index 0258538..facc346 100644
>>> --- a/drivers/clk/bcm/clk-bcm2835.c
>>> +++ b/drivers/clk/bcm/clk-bcm2835.c
>>> @@ -1511,6 +1511,16 @@ struct bcm2835_clk_desc {
>>> "pllh_aux",
>>> };
>>>
>>> +static const char *const bcm2835_pcm_per_parents[] = {
>> As mentioned above, there should be a comment like all the others.
> Yes, will do.
>
>>> + "-",
>>> + "xosc",
>>> + "-",
>>> + "-",
>>> + "-",
>>> + "-",
>>> + "plld_per",
>>> +};
>> Is there a dummy entry for "pllh_aux" missing?
> Yes and no - adding it will cause an extra iteration around the loop, but
> perhaps it's less confusing. I'll add one.
In case you want to save an iteration, you could add short comment
instead of a dummy entry.
>
>>> +
>>> #define REGISTER_PER_CLK(...) REGISTER_CLK( \
>>> .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), \
>>> .parents = bcm2835_clock_per_parents, \
>>> @@ -2000,6 +2010,7 @@ struct bcm2835_clk_desc {
>>> .int_bits = 12,
>>> .frac_bits = 12,
>>> .is_mash_clock = true,
>>> + .parents = bcm2835_pcm_per_parents,
>> This looks a little bit hacky to me. Not sure, but can we do something like this?
>>
>> #define REGISTER_PCM_CLK(...) REGISTER_CLK( \
>> .num_mux_parents = ARRAY_SIZE(bcm2835_pcm_per_parents), \
>> .parents = bcm2835_pcm_per_parents, \
>> __VA_ARGS__)
> Of course - no problem.
>
> Thanks for the feedback - it will be incorporated into V2.
>
> Phil
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER Phil Elwell <phil@raspberrypi.org> - 2017-05-30 18:30 +0200
Re: [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-30 20:50 +0200
Re: [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER Phil Elwell <phil@raspberrypi.org> - 2017-05-31 10:30 +0200
Re: [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-31 11:10 +0200
[PATCH v2 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER Phil Elwell <phil@raspberrypi.org> - 2017-05-31 11:20 +0200
Re: [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER Eric Anholt <eric@anholt.net> - 2017-05-31 23:30 +0200
Re: [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER Phil Elwell <phil@raspberrypi.org> - 2017-06-01 10:50 +0200
csiph-web