Ian Campbell | 49aeca3 | 2014-05-05 11:52:23 +0100 | [diff] [blame] | 1 | /* |
| 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 */ |
Ian Campbell | 8f32aaa | 2014-10-24 21:20:47 +0100 | [diff] [blame] | 18 | #if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I) |
Chen-Yu Tsai | 3a04542 | 2014-10-03 20:16:25 +0800 | [diff] [blame] | 19 | #include <asm/arch/clock_sun6i.h> |
| 20 | #else |
Ian Campbell | 49aeca3 | 2014-05-05 11:52:23 +0100 | [diff] [blame] | 21 | #include <asm/arch/clock_sun4i.h> |
Chen-Yu Tsai | 3a04542 | 2014-10-03 20:16:25 +0800 | [diff] [blame] | 22 | #endif |
Ian Campbell | 49aeca3 | 2014-05-05 11:52:23 +0100 | [diff] [blame] | 23 | |
| 24 | #ifndef __ASSEMBLY__ |
| 25 | int clock_init(void); |
| 26 | int clock_twi_onoff(int port, int state); |
| 27 | void clock_set_pll1(unsigned int hz); |
Hans de Goede | c27d68d | 2014-10-25 20:16:33 +0200 | [diff] [blame^] | 28 | void clock_set_pll5(unsigned int hz); |
Hans de Goede | 9f07273 | 2014-10-22 14:42:48 +0200 | [diff] [blame] | 29 | unsigned int clock_get_pll5p(void); |
Ian Campbell | 49aeca3 | 2014-05-05 11:52:23 +0100 | [diff] [blame] | 30 | unsigned int clock_get_pll6(void); |
| 31 | void clock_init_safe(void); |
| 32 | void clock_init_uart(void); |
| 33 | #endif |
| 34 | |
| 35 | #endif /* _SUNXI_CLOCK_H */ |