mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-25 13:49:26 +00:00
767ad64921
Backport recent rk3588 clk updates from upstream, including one bug fix. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> Link: https://github.com/openwrt/openwrt/pull/17349 (cherry picked from commit 8ad02ca2f8477b1cfdc5ea6124fae60c07687aa1) Link: https://github.com/openwrt/openwrt/pull/17466 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
66 lines
2.0 KiB
Diff
66 lines
2.0 KiB
Diff
From 2e7b3daa8cb1ebd17e6a7f417ef5e6553203035c Mon Sep 17 00:00:00 2001
|
|
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
|
Date: Mon, 25 Mar 2024 20:33:32 +0100
|
|
Subject: [PATCH] clk: rockchip: rk3588: drop unused code
|
|
|
|
All clocks are registered early using CLK_OF_DECLARE(), which marks
|
|
the DT node as processed. For the processed DT node the probe routine
|
|
is never called. Thus this whole code is never executed. This could
|
|
be "fixed" by using CLK_OF_DECLARE_DRIVER, which avoids marking the
|
|
DT node as processed. But then the probe routine would re-register
|
|
all the clocks by calling rk3588_clk_init() again.
|
|
|
|
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
|
Link: https://lore.kernel.org/r/20240325193609.237182-2-sebastian.reichel@collabora.com
|
|
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
|
---
|
|
drivers/clk/rockchip/clk-rk3588.c | 40 -------------------------------
|
|
1 file changed, 40 deletions(-)
|
|
|
|
--- a/drivers/clk/rockchip/clk-rk3588.c
|
|
+++ b/drivers/clk/rockchip/clk-rk3588.c
|
|
@@ -2502,43 +2502,3 @@ static void __init rk3588_clk_init(struc
|
|
}
|
|
|
|
CLK_OF_DECLARE(rk3588_cru, "rockchip,rk3588-cru", rk3588_clk_init);
|
|
-
|
|
-struct clk_rk3588_inits {
|
|
- void (*inits)(struct device_node *np);
|
|
-};
|
|
-
|
|
-static const struct clk_rk3588_inits clk_3588_cru_init = {
|
|
- .inits = rk3588_clk_init,
|
|
-};
|
|
-
|
|
-static const struct of_device_id clk_rk3588_match_table[] = {
|
|
- {
|
|
- .compatible = "rockchip,rk3588-cru",
|
|
- .data = &clk_3588_cru_init,
|
|
- },
|
|
- { }
|
|
-};
|
|
-
|
|
-static int __init clk_rk3588_probe(struct platform_device *pdev)
|
|
-{
|
|
- const struct clk_rk3588_inits *init_data;
|
|
- struct device *dev = &pdev->dev;
|
|
-
|
|
- init_data = device_get_match_data(dev);
|
|
- if (!init_data)
|
|
- return -EINVAL;
|
|
-
|
|
- if (init_data->inits)
|
|
- init_data->inits(dev->of_node);
|
|
-
|
|
- return 0;
|
|
-}
|
|
-
|
|
-static struct platform_driver clk_rk3588_driver = {
|
|
- .driver = {
|
|
- .name = "clk-rk3588",
|
|
- .of_match_table = clk_rk3588_match_table,
|
|
- .suppress_bind_attrs = true,
|
|
- },
|
|
-};
|
|
-builtin_platform_driver_probe(clk_rk3588_driver, clk_rk3588_probe);
|