julhal01 | 2c18fbf | 2021-02-01 08:29:28 +0000 | [diff] [blame] | 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 */ |
julhal01 | 37e1aea | 2021-02-09 15:22:20 +0000 | [diff] [blame] | 26 | uintptr_t base_addr; /**< Base address or region */ |
Michael Zhao | ccd689a | 2025-04-03 22:40:39 +0100 | [diff] [blame^] | 27 | uintptr_t phys_addr; /**< Physical address of the region */ |
julhal01 | 2c18fbf | 2021-02-01 08:29:28 +0000 | [diff] [blame] | 28 | size_t io_region_size; /**< Size of I/O region in bytes */ |
| 29 | }; |
| 30 | |
| 31 | #ifdef __cplusplus |
| 32 | } |
| 33 | #endif |
| 34 | |
| 35 | #endif /* TS_PLATFORM_INTERFACE_DEVICE_REGION_H */ |