Skip to content

Commit

Permalink
clk: bcm2835: Mark the VPU clock as critical
Browse files Browse the repository at this point in the history
The VPU clock is also the clock for our AXI bus, so we really can't
disable it.  This might have happened during boot if, for example,
uart1 (aux_uart clock) probed and was then disabled before the other
consumers of the VPU clock had probed.

v2: Rewrite to use a .flags in bcm2835_clock_data, since other clocks
    will need this too.

Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
anholt authored and popcornmix committed Dec 9, 2016
1 parent c4d9aa8 commit 13a0189
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/clk/bcm/clk-bcm2835.c
Expand Up @@ -443,6 +443,8 @@ struct bcm2835_clock_data {
/* Number of fractional bits in the divider */
u32 frac_bits;

u32 flags;

bool is_vpu_clock;
bool is_mash_clock;
};
Expand Down Expand Up @@ -1253,7 +1255,7 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman,
init.parent_names = parents;
init.num_parents = data->num_mux_parents;
init.name = data->name;
init.flags = CLK_IGNORE_UNUSED;
init.flags = data->flags | CLK_IGNORE_UNUSED;

if (data->is_vpu_clock) {
init.ops = &bcm2835_vpu_clock_clk_ops;
Expand Down Expand Up @@ -1672,6 +1674,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
.div_reg = CM_VPUDIV,
.int_bits = 12,
.frac_bits = 8,
.flags = CLK_IS_CRITICAL,
.is_vpu_clock = true),

/* clocks with per parent mux */
Expand Down

0 comments on commit 13a0189

Please sign in to comment.