stm32mp1_private.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32MP1_PRIVATE_H
  7. #define STM32MP1_PRIVATE_H
  8. #include <stdint.h>
  9. void configure_mmu(void);
  10. void stm32mp1_arch_security_setup(void);
  11. void stm32mp1_security_setup(void);
  12. void stm32mp_syscfg_init(void);
  13. void stm32mp_syscfg_enable_io_compensation_start(void);
  14. void stm32mp_syscfg_enable_io_compensation_finish(void);
  15. void stm32mp_syscfg_disable_io_compensation(void);
  16. uint32_t stm32mp_syscfg_get_chip_version(void);
  17. uint32_t stm32mp_syscfg_get_chip_dev_id(void);
  18. #if STM32MP13
  19. void stm32mp_syscfg_boot_mode_enable(void);
  20. void stm32mp_syscfg_boot_mode_disable(void);
  21. #endif
  22. #if STM32MP15
  23. static inline void stm32mp_syscfg_boot_mode_enable(void){}
  24. static inline void stm32mp_syscfg_boot_mode_disable(void){}
  25. #endif
  26. void stm32mp1_deconfigure_uart_pins(void);
  27. void stm32mp1_init_scmi_server(void);
  28. /* Wrappers for OTP / BSEC functions */
  29. static inline uint32_t stm32_otp_read(uint32_t *val, uint32_t otp)
  30. {
  31. return bsec_read_otp(val, otp);
  32. }
  33. static inline uint32_t stm32_otp_shadow_read(uint32_t *val, uint32_t otp)
  34. {
  35. return bsec_shadow_read_otp(val, otp);
  36. }
  37. static inline uint32_t stm32_otp_write(uint32_t val, uint32_t otp)
  38. {
  39. return bsec_write_otp(val, otp);
  40. }
  41. static inline uint32_t stm32_otp_set_sr_lock(uint32_t otp)
  42. {
  43. return bsec_set_sr_lock(otp);
  44. }
  45. static inline uint32_t stm32_otp_read_sw_lock(uint32_t otp, bool *value)
  46. {
  47. return bsec_read_sw_lock(otp, value);
  48. }
  49. #endif /* STM32MP1_PRIVATE_H */