From ef3b440e0e4d9ca70060483aa33d5b1201ceceb8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 26 Apr 2017 17:28:47 +0100 Subject: [PATCH] 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: https://github.com/raspberrypi/linux/issues/1949 Signed-off-by: Phil Elwell --- 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 fe3298b54cdfb9..c24b4defb2b046 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -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, \ @@ -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",