Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Ian Campbell | 49aeca3 | 2014-05-05 11:52:23 +0100 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2007-2011 |
| 4 | * Allwinner Technology Co., Ltd. <www.allwinnertech.com> |
| 5 | * Tom Cubie <tangliang@allwinnertech.com> |
Ian Campbell | 49aeca3 | 2014-05-05 11:52:23 +0100 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef _SUNXI_CLOCK_H |
| 9 | #define _SUNXI_CLOCK_H |
| 10 | |
| 11 | #include <linux/types.h> |
| 12 | |
| 13 | #define CLK_GATE_OPEN 0x1 |
| 14 | #define CLK_GATE_CLOSE 0x0 |
| 15 | |
| 16 | /* clock control module regs definition */ |
vishnupatekar | 39754b6 | 2015-11-29 01:07:24 +0800 | [diff] [blame] | 17 | #if defined(CONFIG_MACH_SUN8I_A83T) |
| 18 | #include <asm/arch/clock_sun8i_a83t.h> |
Icenowy Zheng | d1fa87d | 2018-07-21 16:20:26 +0800 | [diff] [blame] | 19 | #elif defined(CONFIG_MACH_SUN50I_H6) |
| 20 | #include <asm/arch/clock_sun50i_h6.h> |
Siarhei Siamashka | 26c50fb | 2016-03-29 17:29:10 +0200 | [diff] [blame] | 21 | #elif defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I) || \ |
| 22 | defined(CONFIG_MACH_SUN50I) |
Chen-Yu Tsai | 3a04542 | 2014-10-03 20:16:25 +0800 | [diff] [blame] | 23 | #include <asm/arch/clock_sun6i.h> |
Hans de Goede | 35e1a15 | 2015-01-14 17:30:22 +0100 | [diff] [blame] | 24 | #elif defined(CONFIG_MACH_SUN9I) |
| 25 | #include <asm/arch/clock_sun9i.h> |
Chen-Yu Tsai | 3a04542 | 2014-10-03 20:16:25 +0800 | [diff] [blame] | 26 | #else |
Ian Campbell | 49aeca3 | 2014-05-05 11:52:23 +0100 | [diff] [blame] | 27 | #include <asm/arch/clock_sun4i.h> |
Chen-Yu Tsai | 3a04542 | 2014-10-03 20:16:25 +0800 | [diff] [blame] | 28 | #endif |
Ian Campbell | 49aeca3 | 2014-05-05 11:52:23 +0100 | [diff] [blame] | 29 | |
| 30 | #ifndef __ASSEMBLY__ |
| 31 | int clock_init(void); |
| 32 | int clock_twi_onoff(int port, int state); |
Hans de Goede | 70d7ab5 | 2014-11-08 14:07:27 +0100 | [diff] [blame] | 33 | void clock_set_de_mod_clock(u32 *clk_cfg, unsigned int hz); |
Ian Campbell | 49aeca3 | 2014-05-05 11:52:23 +0100 | [diff] [blame] | 34 | void clock_init_safe(void); |
Chen-Yu Tsai | 6daddfe | 2016-01-06 15:13:07 +0800 | [diff] [blame] | 35 | void clock_init_sec(void); |
Ian Campbell | 49aeca3 | 2014-05-05 11:52:23 +0100 | [diff] [blame] | 36 | void clock_init_uart(void); |
| 37 | #endif |
| 38 | |
| 39 | #endif /* _SUNXI_CLOCK_H */ |