blob: 012c2af72e396bbb328b26fc20c5c8ed3b48b597 [file] [log] [blame]
Ian Campbell49aeca32014-05-05 11:52:23 +01001/*
2 * (C) Copyright 2007-2011
3 * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
4 * Tom Cubie <tangliang@allwinnertech.com>
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#ifndef _SUNXI_CLOCK_H
10#define _SUNXI_CLOCK_H
11
12#include <linux/types.h>
13
14#define CLK_GATE_OPEN 0x1
15#define CLK_GATE_CLOSE 0x0
16
17/* clock control module regs definition */
Chen-Yu Tsai848c2632014-10-22 16:47:44 +080018#if defined(CONFIG_SUN6I) || defined(CONFIG_SUN8I)
Chen-Yu Tsai3a045422014-10-03 20:16:25 +080019#include <asm/arch/clock_sun6i.h>
20#else
Ian Campbell49aeca32014-05-05 11:52:23 +010021#include <asm/arch/clock_sun4i.h>
Chen-Yu Tsai3a045422014-10-03 20:16:25 +080022#endif
Ian Campbell49aeca32014-05-05 11:52:23 +010023
24#ifndef __ASSEMBLY__
25int clock_init(void);
26int clock_twi_onoff(int port, int state);
27void clock_set_pll1(unsigned int hz);
28unsigned int clock_get_pll6(void);
29void clock_init_safe(void);
30void clock_init_uart(void);
31#endif
32
33#endif /* _SUNXI_CLOCK_H */