Aaron Williams | 1fd14ee | 2022-04-07 09:11:03 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Copyright (C) 2018-2022 Marvell International Ltd. |
| 4 | */ |
| 5 | |
| 6 | #ifndef __CVMX_RANGE_H__ |
| 7 | #define __CVMX_RANGE_H__ |
| 8 | |
| 9 | int cvmx_range_init(u64 range_addr, int size); |
| 10 | int cvmx_range_alloc(u64 range_addr, uint64_t owner, uint64_t cnt, int align); |
| 11 | int cvmx_range_alloc_ordered(u64 range_addr, uint64_t owner, u64 cnt, int align, |
| 12 | int reverse); |
| 13 | int cvmx_range_alloc_non_contiguos(u64 range_addr, uint64_t owner, u64 cnt, |
| 14 | int elements[]); |
| 15 | int cvmx_range_reserve(u64 range_addr, uint64_t owner, u64 base, uint64_t cnt); |
| 16 | int cvmx_range_free_with_base(u64 range_addr, int base, int cnt); |
| 17 | int cvmx_range_free_with_owner(u64 range_addr, uint64_t owner); |
| 18 | u64 cvmx_range_get_owner(u64 range_addr, uint64_t base); |
| 19 | void cvmx_range_show(uint64_t range_addr); |
| 20 | int cvmx_range_memory_size(int nelements); |
| 21 | int cvmx_range_free_mutiple(u64 range_addr, int bases[], int count); |
| 22 | |
| 23 | #endif // __CVMX_RANGE_H__ |