cvmx-pko-internal-ports-range.h 1.2 KB

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