1/*
2 * Copyright 2015 Linaro Ltd.
3 * Copyright (C) 2014 ZTE Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#ifndef __ZTE_CLK_H
11#define __ZTE_CLK_H
12#include <linux/clk-provider.h>
13#include <linux/spinlock.h>
14
15struct zx_pll_config {
16	unsigned long rate;
17	u32 cfg0;
18	u32 cfg1;
19};
20
21struct clk_zx_pll {
22	struct clk_hw hw;
23	void __iomem *reg_base;
24	const struct zx_pll_config *lookup_table; /* order by rate asc */
25	int count;
26	spinlock_t *lock;
27};
28
29struct clk *clk_register_zx_pll(const char *name, const char *parent_name,
30	unsigned long flags, void __iomem *reg_base,
31	const struct zx_pll_config *lookup_table, int count, spinlock_t *lock);
32
33struct clk_zx_audio {
34	struct clk_hw hw;
35	void __iomem *reg_base;
36};
37
38struct clk *clk_register_zx_audio(const char *name,
39				  const char * const parent_name,
40				  unsigned long flags, void __iomem *reg_base);
41#endif
42