Commit 8c0de581 authored by Phil Elwell's avatar Phil Elwell Committed by Stephen Boyd

clk: bcm2835: Limit PCM clock to OSC and PLLD_PER

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: default avatarPhil Elwell <phil@raspberrypi.org>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Acked-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent e45098d7
...@@ -1518,6 +1518,31 @@ static const char *const bcm2835_clock_per_parents[] = { ...@@ -1518,6 +1518,31 @@ static const char *const bcm2835_clock_per_parents[] = {
.parents = bcm2835_clock_per_parents, \ .parents = bcm2835_clock_per_parents, \
__VA_ARGS__) __VA_ARGS__)
/*
* 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).
*/
static const char *const bcm2835_pcm_per_parents[] = {
"-",
"xosc",
"-",
"-",
"-",
"-",
"plld_per",
"-",
};
#define REGISTER_PCM_CLK(...) REGISTER_CLK( \
.num_mux_parents = ARRAY_SIZE(bcm2835_pcm_per_parents), \
.parents = bcm2835_pcm_per_parents, \
__VA_ARGS__)
/* main vpu parent mux */ /* main vpu parent mux */
static const char *const bcm2835_clock_vpu_parents[] = { static const char *const bcm2835_clock_vpu_parents[] = {
"gnd", "gnd",
...@@ -1995,7 +2020,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { ...@@ -1995,7 +2020,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
.int_bits = 4, .int_bits = 4,
.frac_bits = 8, .frac_bits = 8,
.tcnt_mux = 22), .tcnt_mux = 22),
[BCM2835_CLOCK_PCM] = REGISTER_PER_CLK( [BCM2835_CLOCK_PCM] = REGISTER_PCM_CLK(
.name = "pcm", .name = "pcm",
.ctl_reg = CM_PCMCTL, .ctl_reg = CM_PCMCTL,
.div_reg = CM_PCMDIV, .div_reg = CM_PCMDIV,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment