diff mbox series

[1/2] clk: imx: Fix wrong flags assignment clk-composite-8m

Message ID 20240702102618.466652-1-michael@amarulasolutions.com
State Accepted
Commit 0515680497d15ba2904365b2bbeb095ef4973f96
Delegated to: Fabio Estevam
Headers show
Series [1/2] clk: imx: Fix wrong flags assignment clk-composite-8m | expand

Commit Message

Michael Nazzareno Trimarchi July 2, 2024, 10:26 a.m. UTC
The mux flags (u8), div flags (u8), and gate flags (u8)  are not the clk
flags (unsigned long). They have different meanings

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 drivers/clk/imx/clk-composite-8m.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Fabio Estevam July 6, 2024, 8:49 p.m. UTC | #1
On Tue, Jul 2, 2024 at 7:26 AM Michael Trimarchi
<michael@amarulasolutions.com> wrote:
>
> The mux flags (u8), div flags (u8), and gate flags (u8)  are not the clk
> flags (unsigned long). They have different meanings
>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>

Applied both, thanks.
diff mbox series

Patch

diff --git a/drivers/clk/imx/clk-composite-8m.c b/drivers/clk/imx/clk-composite-8m.c
index 494156751da..560d74aac80 100644
--- a/drivers/clk/imx/clk-composite-8m.c
+++ b/drivers/clk/imx/clk-composite-8m.c
@@ -135,7 +135,6 @@  struct clk *imx8m_clk_composite_flags(const char *name,
 	mux->shift = PCG_PCS_SHIFT;
 	mux->mask = PCG_PCS_MASK;
 	mux->num_parents = num_parents;
-	mux->flags = flags;
 	mux->parent_names = parent_names;
 
 	div = kzalloc(sizeof(*div), GFP_KERNEL);
@@ -145,7 +144,7 @@  struct clk *imx8m_clk_composite_flags(const char *name,
 	div->reg = reg;
 	div->shift = PCG_PREDIV_SHIFT;
 	div->width = PCG_PREDIV_WIDTH;
-	div->flags = CLK_DIVIDER_ROUND_CLOSEST | flags;
+	div->flags = CLK_DIVIDER_ROUND_CLOSEST;
 
 	gate = kzalloc(sizeof(*gate), GFP_KERNEL);
 	if (!gate)
@@ -153,7 +152,6 @@  struct clk *imx8m_clk_composite_flags(const char *name,
 
 	gate->reg = reg;
 	gate->bit_idx = PCG_CGC_SHIFT;
-	gate->flags = flags;
 
 	clk = clk_register_composite(NULL, name,
 				     parent_names, num_parents,