Skip to content

Commit

Permalink
clk: bcm2835: Limit PCM clock to OSC and PLLD_PER
Browse files Browse the repository at this point in the history
It is unwise to use sources other than the oscillator and PLLD_PER for
the PCM peripheral (and perhaps others - TBD) because their rate can
change and they may even be switched off, so explicitly restrict the
choice using dummy entries in the list of potential parents (item index
is significant).

See: #1949

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  • Loading branch information
Phil Elwell authored and popcornmix committed Jul 21, 2017
1 parent e3557cd commit 2006379
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/clk/bcm/clk-bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,16 @@ static const char *const bcm2835_clock_per_parents[] = {
"pllh_aux",
};

static const char *const bcm2835_pcm_per_parents[] = {
"-",
"xosc",
"-",
"-",
"-",
"-",
"plld_per",
};

#define REGISTER_PER_CLK(...) REGISTER_CLK( \
.num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), \
.parents = bcm2835_clock_per_parents, \
Expand Down Expand Up @@ -2051,6 +2061,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
.int_bits = 12,
.frac_bits = 12,
.is_mash_clock = true,
.parents = bcm2835_pcm_per_parents,
.tcnt_mux = 23),
[BCM2835_CLOCK_PWM] = REGISTER_PER_CLK(
.name = "pwm",
Expand Down

0 comments on commit 2006379

Please sign in to comment.