brcm63xx: rename target to bcm63xx
[openwrt/staging/wigyori.git] / target / linux / brcm2708 / patches-4.19 / 950-0022-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch
1 From f1f199b682e258674137105f49d033cb81612ab7 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 @@ -1362,6 +1362,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