blob: cc9f37500b0e318c025dc1fed8cf5f4dcd33dd03 [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_PKO3_RESOURCES_H__
7#define __CVMX_PKO3_RESOURCES_H__
8
9/*
10 * Allocate or reserve contiguous list of PKO queues.
11 *
12 * @param node is the node number for PKO queues.
13 * @param level is the PKO queue level.
14 * @param owner is the owner of PKO queue resources.
15 * @param base_queue is the PKO queue base number(specify -1 to allocate).
16 * @param num_queues is the number of PKO queues that have to be reserved or allocated.
17 * @return returns queue_base if successful or -1 on failure.
18 */
19int cvmx_pko_alloc_queues(int node, int level, int owner, int base_queue,
20 int num_queues);
21
22/**
23 * Free an allocated/reserved PKO queues for a certain level and owner
24 *
25 * @param node on which to allocate/reserve PKO queues
26 * @param level of PKO queue
27 * @param owner of reserved/allocated resources
28 * @return 0 on success, -1 on failure
29 */
30int cvmx_pko_free_queues(int node, int level, int owner);
31
32int __cvmx_pko3_dq_param_setup(unsigned node);
33
34int cvmx_pko3_num_level_queues(enum cvmx_pko3_level_e level);
35
36#endif /* __CVMX_PKO3_RESOURCES_H__ */