xref: /rk3399_ARM-atf/drivers/ti/common/pm/include/ti_host_idx_mapping.h (revision 945de0f736703b42f64fbc1256fe1e1ed7749d3d)
1 /*
2  * Copyright (c) 2025-2026 Texas Instruments Incorporated - https://www.ti.com
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef TI_HOST_IDX_MAPPING_H
8 #define TI_HOST_IDX_MAPPING_H
9 
10 #include <stdint.h>
11 
12 #define TI_HOST_IDX_NONE 255U
13 
14 extern const uint8_t soc_host_indexes[];
15 extern const uint8_t soc_host_indexes_count;
16 
17 static inline uint8_t ti_host_idx_lookup(uint8_t host_id)
18 {
19 	return (host_id < soc_host_indexes_count) ? soc_host_indexes[host_id] : TI_HOST_IDX_NONE;
20 }
21 
22 #endif /* TI_HOST_IDX_MAPPING_H */
23