[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1574332142-7130-1-git-send-email-peng.fan@nxp.com>
Date: Thu, 21 Nov 2019 10:30:39 +0000
From: Peng Fan <peng.fan@....com>
To: "sboyd@...nel.org" <sboyd@...nel.org>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
"festevam@...il.com" <festevam@...il.com>,
Abel Vesa <abel.vesa@....com>
CC: "kernel@...gutronix.de" <kernel@...gutronix.de>,
dl-linux-imx <linux-imx@....com>,
Aisheng Dong <aisheng.dong@....com>,
"linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Leonard Crestez <leonard.crestez@....com>,
Alice Guo <alice.guo@....com>, Peng Fan <peng.fan@....com>
Subject: [PATCH] clk: imx: clk-composite-7ulp: add lock
From: Peng Fan <peng.fan@....com>
Add lock to mux/gate/divider to protect the access to the register
Signed-off-by: Peng Fan <peng.fan@....com>
---
drivers/clk/imx/clk-composite-7ulp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/imx/clk-composite-7ulp.c b/drivers/clk/imx/clk-composite-7ulp.c
index 060f8600ea0d..d8c6e48207c5 100644
--- a/drivers/clk/imx/clk-composite-7ulp.c
+++ b/drivers/clk/imx/clk-composite-7ulp.c
@@ -41,6 +41,7 @@ struct clk_hw *imx7ulp_clk_composite(const char *name,
mux->reg = reg;
mux->shift = PCG_PCS_SHIFT;
mux->mask = PCG_PCS_MASK;
+ mux->lock = &imx_ccm_lock;
}
if (rate_present) {
@@ -58,6 +59,7 @@ struct clk_hw *imx7ulp_clk_composite(const char *name,
fd->nwidth = PCG_PCD_WIDTH;
fd->nmask = PCG_PCD_MASK;
fd->flags = CLK_FRAC_DIVIDER_ZERO_BASED;
+ fd->lock = &imx_ccm_lock;
}
if (gate_present) {
@@ -70,6 +72,7 @@ struct clk_hw *imx7ulp_clk_composite(const char *name,
gate_hw = &gate->hw;
gate->reg = reg;
gate->bit_idx = PCG_CGC_SHIFT;
+ gate->lock = &imx_ccm_lock;
}
hw = clk_hw_register_composite(NULL, name, parent_names, num_parents,
--
2.16.4
Powered by blists - more mailing lists