ath25: switch default kernel to 5.15
[openwrt/openwrt.git] / target / linux / ipq806x / patches-5.10 / 097-2-ipq806x-lcc-add-missing-reset.patch
1 From 3a5f1793c0bf4a6b536751886b0a44589fe05f35 Mon Sep 17 00:00:00 2001
2 From: Ansuel Smith <ansuelsmth@gmail.com>
3 Date: Sun, 7 Feb 2021 17:00:07 +0100
4 Subject: [PATCH 2/4] ipq806x: lcc: add missing reset
5
6 Add missing reset for ipq806x lcc clk
7
8 Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
9 ---
10 drivers/clk/qcom/lcc-ipq806x.c | 8 ++++++++
11 include/dt-bindings/clock/qcom,lcc-ipq806x.h | 1 +
12 2 files changed, 9 insertions(+)
13
14 --- a/drivers/clk/qcom/lcc-ipq806x.c
15 +++ b/drivers/clk/qcom/lcc-ipq806x.c
16 @@ -12,6 +12,7 @@
17 #include <linux/of_device.h>
18 #include <linux/clk-provider.h>
19 #include <linux/regmap.h>
20 +#include <linux/reset-controller.h>
21
22 #include <dt-bindings/clock/qcom,lcc-ipq806x.h>
23
24 @@ -22,6 +23,7 @@
25 #include "clk-branch.h"
26 #include "clk-regmap-divider.h"
27 #include "clk-regmap-mux.h"
28 +#include "reset.h"
29
30 static struct clk_pll pll4 = {
31 .l_reg = 0x4,
32 @@ -39,6 +41,10 @@ static struct clk_pll pll4 = {
33 },
34 };
35
36 +static const struct qcom_reset_map lcc_ipq806x_resets[] = {
37 + [LCC_PCM_RESET] = { 0x54, 13 },
38 +};
39 +
40 static const struct pll_config pll4_config = {
41 .l = 0xf,
42 .m = 0x91,
43 @@ -417,6 +423,8 @@ static const struct qcom_cc_desc lcc_ipq
44 .config = &lcc_ipq806x_regmap_config,
45 .clks = lcc_ipq806x_clks,
46 .num_clks = ARRAY_SIZE(lcc_ipq806x_clks),
47 + .resets = lcc_ipq806x_resets,
48 + .num_resets = ARRAY_SIZE(lcc_ipq806x_resets),
49 };
50
51 static const struct of_device_id lcc_ipq806x_match_table[] = {
52 --- a/include/dt-bindings/clock/qcom,lcc-ipq806x.h
53 +++ b/include/dt-bindings/clock/qcom,lcc-ipq806x.h
54 @@ -19,4 +19,5 @@
55 #define SPDIF_CLK 10
56 #define AHBIX_CLK 11
57
58 +#define LCC_PCM_RESET 0
59 #endif