2014-05-05 10:52:23 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2007-2011
|
|
|
|
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
|
|
|
|
* Tom Cubie <tangliang@allwinnertech.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SUNXI_CLOCK_H
|
|
|
|
#define _SUNXI_CLOCK_H
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
#define CLK_GATE_OPEN 0x1
|
|
|
|
#define CLK_GATE_CLOSE 0x0
|
|
|
|
|
|
|
|
/* clock control module regs definition */
|
2014-10-24 20:20:47 +00:00
|
|
|
#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I)
|
2014-10-03 12:16:25 +00:00
|
|
|
#include <asm/arch/clock_sun6i.h>
|
|
|
|
#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);
|
|
|
|
void clock_set_pll1(unsigned int hz);
|
2014-11-08 13:07:27 +00:00
|
|
|
void clock_set_pll3(unsigned int hz);
|
2014-10-25 18:16:33 +00:00
|
|
|
void clock_set_pll5(unsigned int hz);
|
2014-10-22 12:42:48 +00:00
|
|
|
unsigned int clock_get_pll5p(void);
|
2014-05-05 10:52:23 +00:00
|
|
|
unsigned int clock_get_pll6(void);
|
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);
|
|
|
|
void clock_init_uart(void);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _SUNXI_CLOCK_H */
|