stm32mp1_clk.h 788 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2018-2024, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32MP1_CLK_H
  7. #define STM32MP1_CLK_H
  8. #include <arch_helpers.h>
  9. enum stm32mp_osc_id {
  10. _HSI,
  11. _HSE,
  12. _CSI,
  13. _LSI,
  14. _LSE,
  15. _I2S_CKIN,
  16. NB_OSC,
  17. _UNKNOWN_OSC_ID = 0xFF
  18. };
  19. extern const char *stm32mp_osc_node_label[NB_OSC];
  20. int stm32mp1_clk_probe(void);
  21. int stm32mp1_clk_init(void);
  22. bool stm32mp1_rcc_is_secure(void);
  23. bool stm32mp1_rcc_is_mckprot(void);
  24. /* SMP protection on RCC registers access */
  25. void stm32mp1_clk_rcc_regs_lock(void);
  26. void stm32mp1_clk_rcc_regs_unlock(void);
  27. void stm32mp1_clk_mcuss_protect(bool enable);
  28. #ifdef STM32MP_SHARED_RESOURCES
  29. void stm32mp1_register_clock_parents_secure(unsigned long id);
  30. #endif
  31. #endif /* STM32MP1_CLK_H */