stm32mp1_clk.h 741 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2018-2022, 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. #ifdef STM32MP_SHARED_RESOURCES
  28. void stm32mp1_register_clock_parents_secure(unsigned long id);
  29. #endif
  30. #endif /* STM32MP1_CLK_H */