1 /*
2  * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef TS_PLATFORM_INTERFACE_DEVICE_REGION_H
8 #define TS_PLATFORM_INTERFACE_DEVICE_REGION_H
9 
10 #include <stddef.h>
11 #include <stdint.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /**
18  * Defines a structure for describing a contiguous IO memory region
19  * and other configuration information about a peripheral.  This may be based on
20  * buildtime or runtime configuration information e.g. from device tree.
21  */
22 struct device_region
23 {
24     char dev_class[16];     /**< Identifier for class of device e.g. 'trng' */
25     int dev_instance;       /**< Instance of the class of device on a platform */
26     uintptr_t base_addr;    /**< Base address or region */
27     size_t io_region_size;  /**< Size of I/O region in bytes */
28 };
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif /* TS_PLATFORM_INTERFACE_DEVICE_REGION_H */
35