| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Purna Chandra Mandal,<purna.mandal@microchip.com> |
|---|
| 3 | 4 | * 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. |
|---|
| 13 | 5 | */ |
|---|
| 14 | 6 | #include <linux/clk-provider.h> |
|---|
| 15 | 7 | #include <linux/delay.h> |
|---|
| 16 | 8 | #include <linux/device.h> |
|---|
| 17 | 9 | #include <linux/interrupt.h> |
|---|
| 10 | +#include <linux/io.h> |
|---|
| 18 | 11 | #include <linux/iopoll.h> |
|---|
| 19 | 12 | #include <asm/mach-pic32/pic32.h> |
|---|
| 20 | 13 | #include <asm/traps.h> |
|---|
| .. | .. |
|---|
| 273 | 266 | writel(REFO_ON | REFO_OE, PIC32_CLR(refo->ctrl_reg)); |
|---|
| 274 | 267 | } |
|---|
| 275 | 268 | |
|---|
| 276 | | -static void roclk_init(struct clk_hw *hw) |
|---|
| 269 | +static int roclk_init(struct clk_hw *hw) |
|---|
| 277 | 270 | { |
|---|
| 278 | 271 | /* initialize clock in disabled state */ |
|---|
| 279 | 272 | roclk_disable(hw); |
|---|
| 273 | + |
|---|
| 274 | + return 0; |
|---|
| 280 | 275 | } |
|---|
| 281 | 276 | |
|---|
| 282 | 277 | static u8 roclk_get_parent(struct clk_hw *hw) |
|---|
| .. | .. |
|---|
| 887 | 882 | return err; |
|---|
| 888 | 883 | } |
|---|
| 889 | 884 | |
|---|
| 890 | | -static void sclk_init(struct clk_hw *hw) |
|---|
| 885 | +static int sclk_init(struct clk_hw *hw) |
|---|
| 891 | 886 | { |
|---|
| 892 | 887 | struct pic32_sys_clk *sclk = clkhw_to_sys_clk(hw); |
|---|
| 893 | 888 | unsigned long flags; |
|---|
| .. | .. |
|---|
| 906 | 901 | writel(v, sclk->slew_reg); |
|---|
| 907 | 902 | spin_unlock_irqrestore(&sclk->core->reg_lock, flags); |
|---|
| 908 | 903 | } |
|---|
| 904 | + |
|---|
| 905 | + return 0; |
|---|
| 909 | 906 | } |
|---|
| 910 | 907 | |
|---|
| 911 | 908 | /* sclk with post-divider */ |
|---|