blob: 3a8bb11a43baf256249806b6af3809ece3310df9 [file] [log] [blame]
Yann Gautier29f1f942021-07-13 18:07:41 +02001/*
2 * Copyright (c) 2021, STMicroelectronics - All Rights Reserved
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef STM32MP_FCONF_GETTER
8#define STM32MP_FCONF_GETTER
9
10#include <assert.h>
11
12#include <lib/fconf/fconf.h>
13
14/* IO policies */
15#define stm32mp__io_policies_getter(id) __extension__ ({ \
16 assert((id) < MAX_NUMBER_IDS); \
17 &policies[id]; \
18})
19
20struct plat_io_policy {
21 uintptr_t *dev_handle;
22 uintptr_t image_spec;
23 int (*check)(const uintptr_t spec);
24};
25
26extern struct plat_io_policy policies[];
27int fconf_populate_stm32mp_io_policies(uintptr_t config);
28
29#endif /* STM32MP_FCONF_GETTER */