blob: 0fd1f025a8debae9a7c9717eb9457118b31b6d28 [file] [log] [blame]
Mikael Olsson7da66192021-02-12 17:30:22 +01001/*
2 * Copyright (c) 2021, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef FCONF_ETHOSN_GETTER_H
8#define FCONF_ETHOSN_GETTER_H
9
10#include <assert.h>
11
12#include <lib/fconf/fconf.h>
13
14#define hw_config__ethosn_config_getter(prop) ethosn_config.prop
15#define hw_config__ethosn_core_addr_getter(idx) __extension__ ({ \
16 assert(idx < ethosn_config.num_cores); \
17 ethosn_config.core_addr[idx]; \
18})
19
20#define ETHOSN_STATUS_DISABLED U(0)
21#define ETHOSN_STATUS_ENABLED U(1)
22
23#define ETHOSN_CORE_NUM_MAX U(64)
24
25struct ethosn_config_t {
26 uint8_t status;
27 uint32_t num_cores;
28 uint64_t core_addr[ETHOSN_CORE_NUM_MAX];
29};
30
31int fconf_populate_arm_ethosn(uintptr_t config);
32
33extern struct ethosn_config_t ethosn_config;
34
35#endif /* FCONF_ETHOSN_GETTER_H */