blob: f0c1307e617338ca7e04051c12bd759f5ec7d67c [file] [log] [blame]
Aaron Williams1fd14ee2022-04-07 09:11:03 +02001/* 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
9int cvmx_range_init(u64 range_addr, int size);
10int cvmx_range_alloc(u64 range_addr, uint64_t owner, uint64_t cnt, int align);
11int cvmx_range_alloc_ordered(u64 range_addr, uint64_t owner, u64 cnt, int align,
12 int reverse);
13int cvmx_range_alloc_non_contiguos(u64 range_addr, uint64_t owner, u64 cnt,
14 int elements[]);
15int cvmx_range_reserve(u64 range_addr, uint64_t owner, u64 base, uint64_t cnt);
16int cvmx_range_free_with_base(u64 range_addr, int base, int cnt);
17int cvmx_range_free_with_owner(u64 range_addr, uint64_t owner);
18u64 cvmx_range_get_owner(u64 range_addr, uint64_t base);
19void cvmx_range_show(uint64_t range_addr);
20int cvmx_range_memory_size(int nelements);
21int cvmx_range_free_mutiple(u64 range_addr, int bases[], int count);
22
23#endif // __CVMX_RANGE_H__