gxbb-aoclk.h 964 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2017 BayLibre, SAS
  3. * Author: Neil Armstrong <narmstrong@baylibre.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef __GXBB_AOCLKC_H
  8. #define __GXBB_AOCLKC_H
  9. /* AO Configuration Clock registers offsets */
  10. #define AO_RTI_PWR_CNTL_REG1 0x0c
  11. #define AO_RTI_PWR_CNTL_REG0 0x10
  12. #define AO_RTI_GEN_CNTL_REG0 0x40
  13. #define AO_OSCIN_CNTL 0x58
  14. #define AO_CRT_CLK_CNTL1 0x68
  15. #define AO_RTC_ALT_CLK_CNTL0 0x94
  16. #define AO_RTC_ALT_CLK_CNTL1 0x98
  17. struct aoclk_gate_regmap {
  18. struct clk_hw hw;
  19. unsigned bit_idx;
  20. struct regmap *regmap;
  21. spinlock_t *lock;
  22. };
  23. #define to_aoclk_gate_regmap(_hw) \
  24. container_of(_hw, struct aoclk_gate_regmap, hw)
  25. extern const struct clk_ops meson_aoclk_gate_regmap_ops;
  26. struct aoclk_cec_32k {
  27. struct clk_hw hw;
  28. struct regmap *regmap;
  29. spinlock_t *lock;
  30. };
  31. #define to_aoclk_cec_32k(_hw) container_of(_hw, struct aoclk_cec_32k, hw)
  32. extern const struct clk_ops meson_aoclk_cec_32k_ops;
  33. #endif /* __GXBB_AOCLKC_H */