clock.h 940 B

12345678910111213141516171819202122232425262728293031323334353637
  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. #ifndef _SUNXI_CLOCK_H
  8. #define _SUNXI_CLOCK_H
  9. #include <linux/types.h>
  10. #define CLK_GATE_OPEN 0x1
  11. #define CLK_GATE_CLOSE 0x0
  12. /* clock control module regs definition */
  13. #if defined(CONFIG_MACH_SUN8I_A83T)
  14. #include <asm/arch/clock_sun8i_a83t.h>
  15. #elif defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I) || \
  16. defined(CONFIG_MACH_SUN50I)
  17. #include <asm/arch/clock_sun6i.h>
  18. #elif defined(CONFIG_MACH_SUN9I)
  19. #include <asm/arch/clock_sun9i.h>
  20. #else
  21. #include <asm/arch/clock_sun4i.h>
  22. #endif
  23. #ifndef __ASSEMBLY__
  24. int clock_init(void);
  25. int clock_twi_onoff(int port, int state);
  26. void clock_set_de_mod_clock(u32 *clk_cfg, unsigned int hz);
  27. void clock_init_safe(void);
  28. void clock_init_sec(void);
  29. void clock_init_uart(void);
  30. #endif
  31. #endif /* _SUNXI_CLOCK_H */