summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Elwell <phil@raspberrypi.org>2017-04-26 17:28:47 +0100
committerPhil Elwell <phil@raspberrypi.org>2017-04-26 17:49:39 +0100
commitef3b440e0e4d9ca70060483aa33d5b1201ceceb8 (patch)
tree48659f1bb9d19ab6c24fafc5e7ec33dc905cbdaf
parent8b68f431a6168c65f67f0c6b645e9c925f90a7c7 (diff)
clk: bcm2835: Limit PCM clock to OSC and PLLD_PERraspberrypi-kernel_1.20170427-1
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 <phil@raspberrypi.org>
-rw-r--r--drivers/clk/bcm/clk-bcm2835.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index fe3298b54cdf..c24b4defb2b0 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",