0349-clk-bcm2835-Mark-the-VPU-clock-as-critical.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 0488240a92abe6fc9fa6f3a3058849b17af2d3e5 Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Tue, 26 Apr 2016 11:44:59 -0700
  4. Subject: [PATCH 349/381] clk: bcm2835: Mark the VPU clock as critical
  5. The VPU clock is also the clock for our AXI bus, so we really can't
  6. disable it. This might have happened during boot if, for example,
  7. uart1 (aux_uart clock) probed and was then disabled before the other
  8. consumers of the VPU clock had probed.
  9. v2: Rewrite to use a .flags in bcm2835_clock_data, since other clocks
  10. will need this too.
  11. Signed-off-by: Eric Anholt <eric@anholt.net>
  12. ---
  13. drivers/clk/bcm/clk-bcm2835.c | 5 ++++-
  14. 1 file changed, 4 insertions(+), 1 deletion(-)
  15. --- a/drivers/clk/bcm/clk-bcm2835.c
  16. +++ b/drivers/clk/bcm/clk-bcm2835.c
  17. @@ -446,6 +446,8 @@ struct bcm2835_clock_data {
  18. /* Number of fractional bits in the divider */
  19. u32 frac_bits;
  20. + u32 flags;
  21. +
  22. bool is_vpu_clock;
  23. bool is_mash_clock;
  24. };
  25. @@ -1246,7 +1248,7 @@ static struct clk *bcm2835_register_cloc
  26. init.parent_names = parents;
  27. init.num_parents = data->num_mux_parents;
  28. init.name = data->name;
  29. - init.flags = CLK_IGNORE_UNUSED;
  30. + init.flags = data->flags | CLK_IGNORE_UNUSED;
  31. if (data->is_vpu_clock) {
  32. init.ops = &bcm2835_vpu_clock_clk_ops;
  33. @@ -1665,6 +1667,7 @@ static const struct bcm2835_clk_desc clk
  34. .div_reg = CM_VPUDIV,
  35. .int_bits = 12,
  36. .frac_bits = 8,
  37. + .flags = CLK_IS_CRITICAL,
  38. .is_vpu_clock = true),
  39. /* clocks with per parent mux */