hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/clk/microchip/clk-core.c
....@@ -1,20 +1,13 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Purna Chandra Mandal,<purna.mandal@microchip.com>
34 * Copyright (C) 2015 Microchip Technology Inc. All rights reserved.
4
- *
5
- * This program is free software; you can distribute it and/or modify it
6
- * under the terms of the GNU General Public License (Version 2) as
7
- * published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope it will be useful, but WITHOUT
10
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- * for more details.
135 */
146 #include <linux/clk-provider.h>
157 #include <linux/delay.h>
168 #include <linux/device.h>
179 #include <linux/interrupt.h>
10
+#include <linux/io.h>
1811 #include <linux/iopoll.h>
1912 #include <asm/mach-pic32/pic32.h>
2013 #include <asm/traps.h>
....@@ -273,10 +266,12 @@
273266 writel(REFO_ON | REFO_OE, PIC32_CLR(refo->ctrl_reg));
274267 }
275268
276
-static void roclk_init(struct clk_hw *hw)
269
+static int roclk_init(struct clk_hw *hw)
277270 {
278271 /* initialize clock in disabled state */
279272 roclk_disable(hw);
273
+
274
+ return 0;
280275 }
281276
282277 static u8 roclk_get_parent(struct clk_hw *hw)
....@@ -887,7 +882,7 @@
887882 return err;
888883 }
889884
890
-static void sclk_init(struct clk_hw *hw)
885
+static int sclk_init(struct clk_hw *hw)
891886 {
892887 struct pic32_sys_clk *sclk = clkhw_to_sys_clk(hw);
893888 unsigned long flags;
....@@ -906,6 +901,8 @@
906901 writel(v, sclk->slew_reg);
907902 spin_unlock_irqrestore(&sclk->core->reg_lock, flags);
908903 }
904
+
905
+ return 0;
909906 }
910907
911908 /* sclk with post-divider */