stm32mp2_private.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (c) 2024, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32MP2_PRIVATE_H
  7. #define STM32MP2_PRIVATE_H
  8. void configure_mmu(void);
  9. uint32_t stm32mp_syscfg_get_chip_dev_id(void);
  10. /* Get DDRDBG peripheral IO memory base address */
  11. uintptr_t stm32_ddrdbg_get_base(void);
  12. /* Wrappers for OTP / BSEC functions */
  13. static inline uint32_t stm32_otp_probe(void)
  14. {
  15. return bsec_probe();
  16. }
  17. static inline uint32_t stm32_otp_read(uint32_t *val, uint32_t otp)
  18. {
  19. return bsec_read_otp(val, otp);
  20. }
  21. static inline uint32_t stm32_otp_shadow_read(uint32_t *val, uint32_t otp)
  22. {
  23. return bsec_shadow_read_otp(val, otp);
  24. }
  25. static inline uint32_t stm32_otp_write(uint32_t val, uint32_t otp)
  26. {
  27. return bsec_write_otp(val, otp);
  28. }
  29. static inline uint32_t stm32_otp_set_sr_lock(uint32_t otp)
  30. {
  31. return bsec_set_sr_lock(otp);
  32. }
  33. static inline uint32_t stm32_otp_read_sw_lock(uint32_t otp, bool *value)
  34. {
  35. return bsec_read_sw_lock(otp, value);
  36. }
  37. static inline bool stm32_otp_is_closed_device(void)
  38. {
  39. return bsec_mode_is_closed_device();
  40. }
  41. #endif /* STM32MP2_PRIVATE_H */