blob: 8fd8c7ada4b6e7214431ce7ce5975f3c23f8d4cb [file] [log] [blame]
Louis Mayencourtbadcac82019-10-24 15:18:46 +01001/*
2 * Copyright (c) 2019-2020, ARM Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef ARM_FCONF_GETTER
8#define ARM_FCONF_GETTER
9
Sandrine Bailleux3760d132020-04-02 15:52:44 +020010#include <assert.h>
11
Louis Mayencourtbadcac82019-10-24 15:18:46 +010012#include <lib/fconf/fconf.h>
13
14/* ARM io policies */
Sandrine Bailleux3760d132020-04-02 15:52:44 +020015#define arm__io_policies_getter(id) __extension__ ({ \
16 assert((id) < MAX_NUMBER_IDS); \
17 &policies[id]; \
18})
Louis Mayencourtbadcac82019-10-24 15:18:46 +010019
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_arm_io_policies(uintptr_t config);
28
29#endif /* ARM_FCONF_GETTER */