forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/clk/socfpga/clk-pll.c
....@@ -1,19 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2011-2012 Calxeda, Inc.
34 * Copyright (C) 2012-2013 Altera Corporation <www.altera.com>
45 *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
156 * Based from clk-highbank.c
16
- *
177 */
188 #include <linux/slab.h>
199 #include <linux/clk-provider.h>
....@@ -75,7 +65,7 @@
7565 CLK_MGR_PLL_CLK_SRC_MASK;
7666 }
7767
78
-static struct clk_ops clk_pll_ops = {
68
+static const struct clk_ops clk_pll_ops = {
7969 .recalc_rate = clk_pll_recalc_rate,
8070 .get_parent = clk_pll_get_parent,
8171 };
....@@ -88,7 +78,7 @@
8878 struct socfpga_pll *pll_clk;
8979 const char *clk_name = node->name;
9080 const char *parent_name[SOCFPGA_MAX_PARENTS];
91
- struct clk_init_data init = {};
81
+ struct clk_init_data init;
9282 struct device_node *clkmgr_np;
9383 int rc;
9484
....@@ -115,8 +105,6 @@
115105 pll_clk->hw.hw.init = &init;
116106
117107 pll_clk->hw.bit_idx = SOCFPGA_PLL_EXT_ENA;
118
- clk_pll_ops.enable = clk_gate_ops.enable;
119
- clk_pll_ops.disable = clk_gate_ops.disable;
120108
121109 clk = clk_register(NULL, &pll_clk->hw.hw);
122110 if (WARN_ON(IS_ERR(clk))) {