All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER
@ 2017-05-30 16:28 Phil Elwell
  2017-05-30 18:41 ` Stefan Wahren
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Phil Elwell @ 2017-05-30 16:28 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Eric Anholt, Stefan Wahren,
	Florian Fainelli, linux-clk, linux-rpi-kernel, linux-kernel

Restrict clock sources for the PCM peripheral to the oscillator and
PLLD_PER because other source may have varying rates or be switched off.
Prevent other sources from being selected by replacing their names in
the list of potential parents with dummy entries (entry index is
significant).

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
 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 0258538..facc346 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -1511,6 +1511,16 @@ struct bcm2835_clk_desc {
 	"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,				\
@@ -2000,6 +2010,7 @@ struct bcm2835_clk_desc {
 		.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",
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-06-01 13:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30 16:28 [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER Phil Elwell
2017-05-30 18:41 ` Stefan Wahren
2017-05-31  8:28   ` Phil Elwell
2017-05-31  8:59     ` Stefan Wahren
2017-05-31  9:18 ` [PATCH v2 " Phil Elwell
2017-06-01 13:41   ` kbuild test robot
2017-05-31 21:24 ` [PATCH " Eric Anholt
2017-06-01  8:46   ` Phil Elwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.