From: Stephen Warren <swarren@wwwdotorg.org>
To: Eric Anholt <eric@anholt.net>
Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rpi-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
Stephen Boyd <sboyd@codeaurora.org>,
Mike Turquette <mturquette@baylibre.com>
Subject: Re: [PATCH v5] clk: bcm2835: Add support for programming the audio domain clocks.
Date: Tue, 6 Oct 2015 20:30:43 -0600 [thread overview]
Message-ID: <561483D3.70000@wwwdotorg.org> (raw)
In-Reply-To: <1444181140-3570-1-git-send-email-eric@anholt.net>
On 10/06/2015 07:25 PM, Eric Anholt wrote:
> This adds support for enabling, disabling, and setting the rate of the
> audio domain clocks. It will be necessary for setting the pixel clock
> for HDMI in the VC4 driver and let us write a cpufreq driver. It will
> also improve compatibility with user changes to the firmware's
> config.txt, since our previous fixed clocks are unaware of it.
>
> The firmware also has support for configuring the clocks through the
> mailbox channel, but the pixel clock setup by the firmware doesn't
> work, and it's Raspberry Pi specific anyway. The only conflicts we
> should have with the firmware would be if we made firmware calls that
> result in clock management (like opening firmware V3D or ISP access,
> which we don't support in upstream), or on hardware over-thermal or
> under-voltage (when the firmware would rewrite PLLB to take the ARM
> out of overclock). If that happens, our cached .recalc_rate() results
> would be incorrect, but that's no worse than our current state where
> we used fixed clocks.
>
> The existing fixed clocks in the code are left in place to provide
> backwards compatibility with old device tree files.
> diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
> +static const struct bcm2835_pll_ana_bits bcm2835_ana_default = {
> + .mask0 = 0,
> + .set0 = 0,
> + .mask1 = ~((7 << 19) | (15 << 15)),
> + .set1 = (2 << 19) | (8 << 15),
> + .mask3 = ~(7 << 7),
> + .set3 = (6 << 1),
> + .fb_prediv_mask = BIT(14),
> +};
Sorry for the slow response, but my previous comment on that block of
code was regarding the values not matching the values to the fields in
the struct. For example, in "7 << 19", what do 7 and 19 represent? That
could be documented by e.g.:
#define FOO_MASK 7
#define FOO_SHIFT 19
where FOO is the name of the field, and would tie the values into the
documentation (assuming there is some)
Of course at this stage it's fine to change this later.
next prev parent reply other threads:[~2015-10-07 2:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 1:25 [PATCH v5] clk: bcm2835: Add support for programming the audio domain clocks Eric Anholt
2015-10-07 2:30 ` Stephen Warren [this message]
2015-10-08 0:55 ` Stephen Boyd
2015-10-08 23:44 ` Eric Anholt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=561483D3.70000@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=eric@anholt.net \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).