openwrt/target/linux/bcm27xx/patches-6.6/950-1428-rp1-clk-Remove-CLK_IGNORE_UNUSED-flags.patch
John Audia f4c5d0e77e bcm27xx: patches: cherry-pick for RP1 kmods
Cherry-pick patches to support building RP1 modules.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17233
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 613dd79d5e)
2024-12-28 14:11:52 +01:00

60 lines
2.0 KiB
Diff

From 9049e4df2c54b5e620f855f66db3a18c9f2e181f Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Fri, 8 Nov 2024 17:37:08 +0000
Subject: [PATCH 1428/1482] rp1: clk: Remove CLK_IGNORE_UNUSED flags
There should be no issue in disabling the RP1 clocks as long as
the kernel knows about all consumers.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/clk/clk-rp1.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/drivers/clk/clk-rp1.c
+++ b/drivers/clk/clk-rp1.c
@@ -1552,7 +1552,7 @@ static struct clk_hw *rp1_register_pll(s
init.num_parents = 1;
init.name = pll_data->name;
init.ops = &rp1_pll_ops;
- init.flags = pll_data->flags | CLK_IGNORE_UNUSED;
+ init.flags = pll_data->flags;
pll = kzalloc(sizeof(*pll), GFP_KERNEL);
if (!pll)
@@ -1586,7 +1586,7 @@ static struct clk_hw *rp1_register_pll_p
init.num_parents = 1;
init.name = ph_data->name;
init.ops = &rp1_pll_ph_ops;
- init.flags = ph_data->flags | CLK_IGNORE_UNUSED;
+ init.flags = ph_data->flags;
ph = kzalloc(sizeof(*ph), GFP_KERNEL);
if (!ph)
@@ -1619,7 +1619,7 @@ static struct clk_hw *rp1_register_pll_d
init.num_parents = 1;
init.name = divider_data->name;
init.ops = &rp1_pll_divider_ops;
- init.flags = divider_data->flags | CLK_IGNORE_UNUSED;
+ init.flags = divider_data->flags;
divider = devm_kzalloc(clockman->dev, sizeof(*divider), GFP_KERNEL);
if (!divider)
@@ -1662,7 +1662,7 @@ static struct clk_hw *rp1_register_clock
init.num_parents =
clock_data->num_std_parents + clock_data->num_aux_parents;
init.name = clock_data->name;
- init.flags = clock_data->flags | CLK_IGNORE_UNUSED;
+ init.flags = clock_data->flags;
init.ops = &rp1_clk_ops;
clock = devm_kzalloc(clockman->dev, sizeof(*clock), GFP_KERNEL);
@@ -1692,7 +1692,6 @@ static struct clk_hw *rp1_register_varsr
init.parent_names = &ref_clock;
init.num_parents = 1;
init.name = name;
- init.flags = CLK_IGNORE_UNUSED;
init.ops = &rp1_varsrc_ops;
clock = devm_kzalloc(clockman->dev, sizeof(*clock), GFP_KERNEL);