2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2014-05-05 10:52:23 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2007-2011
|
|
|
|
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
|
|
|
|
* Tom Cubie <tangliang@allwinnertech.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SUNXI_CLOCK_H
|
|
|
|
#define _SUNXI_CLOCK_H
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
2022-07-02 23:14:24 +00:00
|
|
|
#include <asm/arch/cpu.h>
|
2014-05-05 10:52:23 +00:00
|
|
|
|
|
|
|
#define CLK_GATE_OPEN 0x1
|
|
|
|
#define CLK_GATE_CLOSE 0x0
|
|
|
|
|
|
|
|
/* clock control module regs definition */
|
2015-11-28 17:07:24 +00:00
|
|
|
#if defined(CONFIG_MACH_SUN8I_A83T)
|
|
|
|
#include <asm/arch/clock_sun8i_a83t.h>
|
2022-10-05 16:54:19 +00:00
|
|
|
#elif defined(CONFIG_SUN50I_GEN_H6) || defined(CONFIG_SUNXI_GEN_NCAT2)
|
2018-07-21 08:20:26 +00:00
|
|
|
#include <asm/arch/clock_sun50i_h6.h>
|
2016-03-29 15:29:10 +00:00
|
|
|
#elif defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I) || \
|
2022-01-29 15:23:03 +00:00
|
|
|
defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUNIV)
|
2014-10-03 12:16:25 +00:00
|
|
|
#include <asm/arch/clock_sun6i.h>
|
2015-01-14 16:30:22 +00:00
|
|
|
#elif defined(CONFIG_MACH_SUN9I)
|
|
|
|
#include <asm/arch/clock_sun9i.h>
|
2014-10-03 12:16:25 +00:00
|
|
|
#else
|
2014-05-05 10:52:23 +00:00
|
|
|
#include <asm/arch/clock_sun4i.h>
|
2014-10-03 12:16:25 +00:00
|
|
|
#endif
|
2014-05-05 10:52:23 +00:00
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
int clock_init(void);
|
|
|
|
int clock_twi_onoff(int port, int state);
|
2014-11-08 13:07:27 +00:00
|
|
|
void clock_set_de_mod_clock(u32 *clk_cfg, unsigned int hz);
|
2014-05-05 10:52:23 +00:00
|
|
|
void clock_init_safe(void);
|
2016-01-06 07:13:07 +00:00
|
|
|
void clock_init_sec(void);
|
2014-05-05 10:52:23 +00:00
|
|
|
void clock_init_uart(void);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _SUNXI_CLOCK_H */
|