stm32mp_fconf_getter.h 675 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2021, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32MP_FCONF_GETTER
  7. #define STM32MP_FCONF_GETTER
  8. #include <assert.h>
  9. #include <lib/fconf/fconf.h>
  10. #include <tools_share/uuid.h>
  11. /* IO policies */
  12. #define stm32mp__io_policies_getter(id) __extension__ ({ \
  13. assert((id) < MAX_NUMBER_IDS); \
  14. &policies[id]; \
  15. })
  16. struct plat_io_policy {
  17. uintptr_t *dev_handle;
  18. uintptr_t image_spec;
  19. struct efi_guid img_type_guid;
  20. int (*check)(const uintptr_t spec);
  21. };
  22. extern struct plat_io_policy policies[];
  23. int fconf_populate_stm32mp_io_policies(uintptr_t config);
  24. #endif /* STM32MP_FCONF_GETTER */