kernel: bump 5.4 to 5.4.60
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0020-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch
1 From a50ed3cb374d57704b9a4706608b98d8c0ba3eb9 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 13 Feb 2017 17:20:08 +0000
4 Subject: [PATCH] clk-bcm2835: Mark used PLLs and dividers CRITICAL
5
6 The VPU configures and relies on several PLLs and dividers. Mark all
7 enabled dividers and their PLLs as CRITICAL to prevent the kernel from
8 switching them off.
9
10 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
11 ---
12 drivers/clk/bcm/clk-bcm2835.c | 5 +++++
13 1 file changed, 5 insertions(+)
14
15 --- a/drivers/clk/bcm/clk-bcm2835.c
16 +++ b/drivers/clk/bcm/clk-bcm2835.c
17 @@ -1379,6 +1379,11 @@ bcm2835_register_pll_divider(struct bcm2
18 divider->div.hw.init = &init;
19 divider->div.table = NULL;
20
21 + if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) {
22 + init.flags |= CLK_IS_CRITICAL;
23 + divider->div.flags |= CLK_IS_CRITICAL;
24 + }
25 +
26 divider->cprman = cprman;
27 divider->data = data;
28