mirror of
https://abf.rosa.ru/djam/kernel-5.15.git
synced 2025-02-23 18:42:55 +00:00
39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
![]() |
From 3a2d37d8f2aacdd8711f0f90a4c04d75eccd7a1f Mon Sep 17 00:00:00 2001
|
||
|
From: Alexey Sheplyakov <asheplyakov@altlinux.org>
|
||
|
Date: Fri, 19 Feb 2021 12:38:34 +0400
|
||
|
Subject: [PATCH 621/625] baikal_clk: compatibility with SDK-M 5.1 firmware
|
||
|
|
||
|
Without this patch the kernel seems to locks up within 10 -- 20 seconds
|
||
|
after the boot on a board with firmware from SDK-M 5.1
|
||
|
|
||
|
baikal_clk_set_rate: fixed parent rate calculation (from SDK-M 4.4)
|
||
|
---
|
||
|
drivers/clk/baikal/clk-baikal.c | 8 ++++++--
|
||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/drivers/clk/baikal/clk-baikal.c b/drivers/clk/baikal/clk-baikal.c
|
||
|
index ddf1d328eeaf..d9709322b2ee 100644
|
||
|
--- a/drivers/clk/baikal/clk-baikal.c
|
||
|
+++ b/drivers/clk/baikal/clk-baikal.c
|
||
|
@@ -181,11 +181,15 @@ static int baikal_clk_set_rate(struct clk_hw *hw, unsigned long rate,
|
||
|
struct arm_smccc_res res;
|
||
|
struct baikal_clk_cmu *pclk = to_baikal_cmu(hw);
|
||
|
uint32_t cmd;
|
||
|
+ unsigned long parent;
|
||
|
|
||
|
- if (pclk->is_clk_ch)
|
||
|
+ if (pclk->is_clk_ch) {
|
||
|
cmd = CMU_CLK_CH_SET_RATE;
|
||
|
- else
|
||
|
+ parent = pclk->parent;
|
||
|
+ } else {
|
||
|
cmd = CMU_PLL_SET_RATE;
|
||
|
+ parent = parent_rate;
|
||
|
+ }
|
||
|
|
||
|
pr_debug("[%s, %x:%d:%s] %s, %ld\n",
|
||
|
pclk->name,
|
||
|
--
|
||
|
2.31.1
|
||
|
|