1 /* 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 */ 20 int 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 */ 32 int cvmx_pko_internal_ports_free(int interface, int port); 33 34 /* 35 * Frees up all the allocated internal ports. 36 */ 37 void cvmx_pko_internal_ports_range_free_all(void); 38 39 void cvmx_pko_internal_ports_range_show(void); 40 41 int __cvmx_pko_internal_ports_range_init(void); 42 43 #endif 44