1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * (C) Copyright 2007-2011 4 * Allwinner Technology Co., Ltd. <www.allwinnertech.com> 5 * Tom Cubie <tangliang@allwinnertech.com> 6 */ 7 8#ifndef _SUNXI_CLOCK_H 9#define _SUNXI_CLOCK_H 10 11#include <linux/types.h> 12#include <asm/arch/cpu.h> 13 14#define CLK_GATE_OPEN 0x1 15#define CLK_GATE_CLOSE 0x0 16 17/* clock control module regs definition */ 18#if defined(CONFIG_MACH_SUN8I_A83T) 19#include <asm/arch/clock_sun8i_a83t.h> 20#elif defined(CONFIG_SUN50I_GEN_H6) || defined(CONFIG_SUNXI_GEN_NCAT2) 21#include <asm/arch/clock_sun50i_h6.h> 22#elif defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I) || \ 23 defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUNIV) 24#include <asm/arch/clock_sun6i.h> 25#elif defined(CONFIG_MACH_SUN9I) 26#include <asm/arch/clock_sun9i.h> 27#else 28#include <asm/arch/clock_sun4i.h> 29#endif 30 31#ifndef __ASSEMBLY__ 32int clock_init(void); 33int clock_twi_onoff(int port, int state); 34void clock_set_de_mod_clock(u32 *clk_cfg, unsigned int hz); 35void clock_init_safe(void); 36void clock_init_sec(void); 37void clock_init_uart(void); 38#endif 39 40#endif /* _SUNXI_CLOCK_H */ 41