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