Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Darwin Rambo | 5d6c315 | 2014-02-11 11:06:33 -0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2013 Broadcom Corporation. |
Darwin Rambo | 5d6c315 | 2014-02-11 11:06:33 -0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | /* This API file is loosely based on u-boot/drivers/video/ipu.h and linux */ |
| 7 | |
| 8 | #ifndef __KONA_COMMON_CLK_H |
| 9 | #define __KONA_COMMON_CLK_H |
| 10 | |
| 11 | #include <linux/types.h> |
| 12 | |
| 13 | struct clk; |
| 14 | |
| 15 | /* Only implement required functions for your specific architecture */ |
| 16 | int clk_init(void); |
| 17 | struct clk *clk_get(const char *id); |
| 18 | int clk_enable(struct clk *clk); |
| 19 | void clk_disable(struct clk *clk); |
| 20 | unsigned long clk_get_rate(struct clk *clk); |
| 21 | long clk_round_rate(struct clk *clk, unsigned long rate); |
| 22 | int clk_set_rate(struct clk *clk, unsigned long rate); |
| 23 | int clk_set_parent(struct clk *clk, struct clk *parent); |
| 24 | struct clk *clk_get_parent(struct clk *clk); |
| 25 | int clk_sdio_enable(void *base, u32 rate, u32 *actual_ratep); |
| 26 | int clk_bsc_enable(void *base); |
Steve Rae | d1a8ecd | 2014-12-09 11:40:11 -0800 | [diff] [blame] | 27 | int clk_usb_otg_enable(void *base); |
Darwin Rambo | 5d6c315 | 2014-02-11 11:06:33 -0800 | [diff] [blame] | 28 | |
| 29 | #endif |