forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/clk/zynq/clkc.c
....@@ -1,21 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Zynq clock controller
34 *
45 * Copyright (C) 2012 - 2013 Xilinx
56 *
67 * Sören Brinkmann <soren.brinkmann@xilinx.com>
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License v2 as published by
10
- * the Free Software Foundation.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
198 */
209
2110 #include <linux/clk/zynq.h>
....@@ -158,7 +147,7 @@
158147 clks[fclk] = clk_register_gate(NULL, clk_name,
159148 div1_name, CLK_SET_RATE_PARENT, fclk_gate_reg,
160149 0, CLK_GATE_SET_TO_DISABLE, fclk_gate_lock);
161
- enable_reg = clk_readl(fclk_gate_reg) & 1;
150
+ enable_reg = readl(fclk_gate_reg) & 1;
162151 if (enable && !enable_reg) {
163152 if (clk_prepare_enable(clks[fclk]))
164153 pr_warn("%s: FCLK%u enable failed\n", __func__,
....@@ -287,7 +276,7 @@
287276 SLCR_IOPLL_CTRL, 4, 1, 0, &iopll_lock);
288277
289278 /* CPU clocks */
290
- tmp = clk_readl(SLCR_621_TRUE) & 1;
279
+ tmp = readl(SLCR_621_TRUE) & 1;
291280 clk = clk_register_mux(NULL, "cpu_mux", cpu_parents, 4,
292281 CLK_SET_RATE_NO_REPARENT, SLCR_ARM_CLK_CTRL, 4, 2, 0,
293282 &armclk_lock);
....@@ -510,7 +499,7 @@
510499 &dbgclk_lock);
511500
512501 /* leave debug clocks in the state the bootloader set them up to */
513
- tmp = clk_readl(SLCR_DBG_CLK_CTRL);
502
+ tmp = readl(SLCR_DBG_CLK_CTRL);
514503 if (tmp & DBG_CLK_CTRL_CLKACT_TRC)
515504 if (clk_prepare_enable(clks[dbg_trc]))
516505 pr_warn("%s: trace clk enable failed\n", __func__);
....@@ -602,7 +591,7 @@
602591 }
603592
604593 if (of_address_to_resource(np, 0, &res)) {
605
- pr_err("%s: failed to get resource\n", np->name);
594
+ pr_err("%pOFn: failed to get resource\n", np);
606595 goto np_err;
607596 }
608597
....@@ -611,7 +600,7 @@
611600 if (slcr->data) {
612601 zynq_clkc_base = (__force void __iomem *)slcr->data + res.start;
613602 } else {
614
- pr_err("%s: Unable to get I/O memory\n", np->name);
603
+ pr_err("%pOFn: Unable to get I/O memory\n", np);
615604 of_node_put(slcr);
616605 goto np_err;
617606 }