blob: 77dd33c1d8f534af285cf71628064aa179c45e24 [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 *
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010017 * Return: 0 on success
Aaron Williams4fd1e552021-04-23 19:56:32 +020018 * -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 *
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010029 * Return: 0 on success
Aaron Williams4fd1e552021-04-23 19:56:32 +020030 * -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