blob: 3747f74d3607e9772287a8dda7401b7bf50f688e [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 */
vishnupatekar39754b62015-11-29 01:07:24 +080018#if defined(CONFIG_MACH_SUN8I_A83T)
19#include <asm/arch/clock_sun8i_a83t.h>
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020020#elif defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I) || \
21 defined(CONFIG_MACH_SUN50I)
Chen-Yu Tsai3a045422014-10-03 20:16:25 +080022#include <asm/arch/clock_sun6i.h>
Hans de Goede35e1a152015-01-14 17:30:22 +010023#elif defined(CONFIG_MACH_SUN9I)
24#include <asm/arch/clock_sun9i.h>
Chen-Yu Tsai3a045422014-10-03 20:16:25 +080025#else
Ian Campbell49aeca32014-05-05 11:52:23 +010026#include <asm/arch/clock_sun4i.h>
Chen-Yu Tsai3a045422014-10-03 20:16:25 +080027#endif
Ian Campbell49aeca32014-05-05 11:52:23 +010028
29#ifndef __ASSEMBLY__
30int clock_init(void);
31int clock_twi_onoff(int port, int state);
Hans de Goede70d7ab52014-11-08 14:07:27 +010032void clock_set_de_mod_clock(u32 *clk_cfg, unsigned int hz);
Ian Campbell49aeca32014-05-05 11:52:23 +010033void clock_init_safe(void);
Chen-Yu Tsai6daddfe2016-01-06 15:13:07 +080034void clock_init_sec(void);
Ian Campbell49aeca32014-05-05 11:52:23 +010035void clock_init_uart(void);
36#endif
37
38#endif /* _SUNXI_CLOCK_H */