cvmx-helper-loop.h 904 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2020 Marvell International Ltd.
  4. *
  5. * Functions for LOOP initialization, configuration,
  6. * and monitoring.
  7. */
  8. #ifndef __CVMX_HELPER_LOOP_H__
  9. #define __CVMX_HELPER_LOOP_H__
  10. /**
  11. * @INTERNAL
  12. * Probe a LOOP interface and determine the number of ports
  13. * connected to it. The LOOP interface should still be down after
  14. * this call.
  15. *
  16. * @param xiface Interface to probe
  17. *
  18. * Return: Number of ports on the interface. Zero to disable.
  19. */
  20. int __cvmx_helper_loop_probe(int xiface);
  21. int __cvmx_helper_loop_enumerate(int xiface);
  22. /**
  23. * @INTERNAL
  24. * Bringup and enable a LOOP interface. After this call packet
  25. * I/O should be fully functional. This is called with IPD
  26. * enabled but PKO disabled.
  27. *
  28. * @param xiface Interface to bring up
  29. *
  30. * Return: Zero on success, negative on failure
  31. */
  32. int __cvmx_helper_loop_enable(int xiface);
  33. #endif