blob: 1fb49b3fb6deef58101c7b2160ff18402972c80e [file] [log] [blame]
Aaron Williams4fd1e552021-04-23 19:56:32 +02001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2020 Marvell International Ltd.
4 */
5
6#ifndef __CVMX_INTERNAL_PORTS_RANGE__
7#define __CVMX_INTERNAL_PORTS_RANGE__
8
9/*
10 * Allocated a block of internal ports for the specified interface/port
11 *
12 * @param interface the interface for which the internal ports are requested
13 * @param port the index of the port within in the interface for which the internal ports
14 * are requested.
15 * @param count the number of internal ports requested
16 *
17 * @return 0 on success
18 * -1 on failure
19 */
20int cvmx_pko_internal_ports_alloc(int interface, int port, u64 count);
21
22/*
23 * Free the internal ports associated with the specified interface/port
24 *
25 * @param interface the interface for which the internal ports are requested
26 * @param port the index of the port within in the interface for which the internal ports
27 * are requested.
28 *
29 * @return 0 on success
30 * -1 on failure
31 */
32int cvmx_pko_internal_ports_free(int interface, int port);
33
34/*
35 * Frees up all the allocated internal ports.
36 */
37void cvmx_pko_internal_ports_range_free_all(void);
38
39void cvmx_pko_internal_ports_range_show(void);
40
41int __cvmx_pko_internal_ports_range_init(void);
42
43#endif