Skip to content

Commit e1d1cbd

Browse files
Phil Elwellpopcornmix
Phil Elwell
authored andcommitted
clk: bcm2835: Limit PCM clock to OSC and PLLD_PER
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 <[email protected]>
1 parent 37a64c2 commit e1d1cbd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/clk/bcm/clk-bcm2835.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,16 @@ static const char *const bcm2835_clock_per_parents[] = {
15621562
"pllh_aux",
15631563
};
15641564

1565+
static const char *const bcm2835_pcm_per_parents[] = {
1566+
"-",
1567+
"xosc",
1568+
"-",
1569+
"-",
1570+
"-",
1571+
"-",
1572+
"plld_per",
1573+
};
1574+
15651575
#define REGISTER_PER_CLK(...) REGISTER_CLK( \
15661576
.num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), \
15671577
.parents = bcm2835_clock_per_parents, \
@@ -2051,6 +2061,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
20512061
.int_bits = 12,
20522062
.frac_bits = 12,
20532063
.is_mash_clock = true,
2064+
.parents = bcm2835_pcm_per_parents,
20542065
.tcnt_mux = 23),
20552066
[BCM2835_CLOCK_PWM] = REGISTER_PER_CLK(
20562067
.name = "pwm",

0 commit comments

Comments
 (0)