mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
62 lines
1.8 KiB
Diff
62 lines
1.8 KiB
Diff
From f05295ef5e58a042f3a66490f6e75c6af83a329f Mon Sep 17 00:00:00 2001
|
|
From: Robert Marko <robimarko@gmail.com>
|
|
Date: Sun, 13 Mar 2022 12:46:28 +0100
|
|
Subject: [PATCH] clk: qcom: ipq8074: add PPE crypto clock
|
|
|
|
The built-in PPE engine has a dedicated clock for the EIP-197 crypto
|
|
engine.
|
|
|
|
So, since the required clock currently missing add support for it.
|
|
|
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
---
|
|
drivers/clk/qcom/gcc-ipq8074.c | 19 +++++++++++++++++++
|
|
include/dt-bindings/clock/qcom,gcc-ipq8074.h | 1 +
|
|
2 files changed, 20 insertions(+)
|
|
|
|
--- a/drivers/clk/qcom/gcc-ipq8074.c
|
|
+++ b/drivers/clk/qcom/gcc-ipq8074.c
|
|
@@ -3177,6 +3177,24 @@ static struct clk_branch gcc_nss_ptp_ref
|
|
},
|
|
};
|
|
|
|
+static struct clk_branch gcc_crypto_ppe_clk = {
|
|
+ .halt_reg = 0x68310,
|
|
+ .halt_bit = 31,
|
|
+ .clkr = {
|
|
+ .enable_reg = 0x68310,
|
|
+ .enable_mask = BIT(0),
|
|
+ .hw.init = &(struct clk_init_data){
|
|
+ .name = "gcc_crypto_ppe_clk",
|
|
+ .parent_names = (const char *[]){
|
|
+ "nss_ppe_clk_src"
|
|
+ },
|
|
+ .num_parents = 1,
|
|
+ .flags = CLK_SET_RATE_PARENT,
|
|
+ .ops = &clk_branch2_ops,
|
|
+ },
|
|
+ },
|
|
+};
|
|
+
|
|
static struct clk_branch gcc_nssnoc_ce_apb_clk = {
|
|
.halt_reg = 0x6830c,
|
|
.clkr = {
|
|
@@ -4649,6 +4667,7 @@ static struct clk_regmap *gcc_ipq8074_cl
|
|
[GCC_PCIE0_RCHNG_CLK_SRC] = &pcie0_rchng_clk_src.clkr,
|
|
[GCC_PCIE0_RCHNG_CLK] = &gcc_pcie0_rchng_clk.clkr,
|
|
[GCC_PCIE0_AXI_S_BRIDGE_CLK] = &gcc_pcie0_axi_s_bridge_clk.clkr,
|
|
+ [GCC_CRYPTO_PPE_CLK] = &gcc_crypto_ppe_clk.clkr,
|
|
};
|
|
|
|
static const struct qcom_reset_map gcc_ipq8074_resets[] = {
|
|
--- a/include/dt-bindings/clock/qcom,gcc-ipq8074.h
|
|
+++ b/include/dt-bindings/clock/qcom,gcc-ipq8074.h
|
|
@@ -233,6 +233,7 @@
|
|
#define GCC_PCIE0_AXI_S_BRIDGE_CLK 224
|
|
#define GCC_PCIE0_RCHNG_CLK_SRC 225
|
|
#define GCC_PCIE0_RCHNG_CLK 226
|
|
+#define GCC_CRYPTO_PPE_CLK 227
|
|
|
|
#define GCC_BLSP1_BCR 0
|
|
#define GCC_BLSP1_QUP1_BCR 1
|