clk-cpu.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2014 Samsung Electronics Co., Ltd.
  4. *
  5. * Common Clock Framework support for all PLL's in Samsung platforms
  6. */
  7. #ifndef __SAMSUNG_CLK_CPU_H
  8. #define __SAMSUNG_CLK_CPU_H
  9. /* The CPU clock registers have DIV1 configuration register */
  10. #define CLK_CPU_HAS_DIV1 BIT(0)
  11. /* When ALT parent is active, debug clocks need safe divider values */
  12. #define CLK_CPU_NEEDS_DEBUG_ALT_DIV BIT(1)
  13. /**
  14. * enum exynos_cpuclk_layout - CPU clock registers layout compatibility
  15. * @CPUCLK_LAYOUT_E4210: Exynos4210 compatible layout
  16. * @CPUCLK_LAYOUT_E5433: Exynos5433 compatible layout
  17. * @CPUCLK_LAYOUT_E850_CL0: Exynos850 cluster 0 compatible layout
  18. * @CPUCLK_LAYOUT_E850_CL1: Exynos850 cluster 1 compatible layout
  19. */
  20. enum exynos_cpuclk_layout {
  21. CPUCLK_LAYOUT_E4210,
  22. CPUCLK_LAYOUT_E5433,
  23. CPUCLK_LAYOUT_E850_CL0,
  24. CPUCLK_LAYOUT_E850_CL1,
  25. };
  26. /**
  27. * struct exynos_cpuclk_cfg_data - config data to setup cpu clocks
  28. * @prate: frequency of the primary parent clock (in KHz)
  29. * @div0: value to be programmed in the div_cpu0 register
  30. * @div1: value to be programmed in the div_cpu1 register
  31. *
  32. * This structure holds the divider configuration data for dividers in the CPU
  33. * clock domain. The parent frequency at which these divider values are valid is
  34. * specified in @prate. The @prate is the frequency of the primary parent clock.
  35. * For CPU clock domains that do not have a DIV1 register, the @div1 member
  36. * value is not used.
  37. */
  38. struct exynos_cpuclk_cfg_data {
  39. unsigned long prate;
  40. unsigned long div0;
  41. unsigned long div1;
  42. };
  43. #endif /* __SAMSUNG_CLK_CPU_H */