cvmx-helper-errata.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2020 Marvell International Ltd.
  4. *
  5. * Fixes and workaround for Octeon chip errata. This file
  6. * contains functions called by cvmx-helper to workaround known
  7. * chip errata. For the most part, code doesn't need to call
  8. * these functions directly.
  9. */
  10. #ifndef __CVMX_HELPER_ERRATA_H__
  11. #define __CVMX_HELPER_ERRATA_H__
  12. #include "cvmx-wqe.h"
  13. /**
  14. * @INTERNAL
  15. * Function to adjust internal IPD pointer alignments
  16. *
  17. * Return: 0 on success
  18. * !0 on failure
  19. */
  20. int __cvmx_helper_errata_fix_ipd_ptr_alignment(void);
  21. /**
  22. * This function needs to be called on all Octeon chips with
  23. * errata PKI-100.
  24. *
  25. * The Size field is 8 too large in WQE and next pointers
  26. *
  27. * The Size field generated by IPD is 8 larger than it should
  28. * be. The Size field is <55:40> of both:
  29. * - WORD3 in the work queue entry, and
  30. * - the next buffer pointer (which precedes the packet data
  31. * in each buffer).
  32. *
  33. * @param work Work queue entry to fix
  34. * Return: Zero on success. Negative on failure
  35. */
  36. int cvmx_helper_fix_ipd_packet_chain(cvmx_wqe_t *work);
  37. /**
  38. * Due to errata G-720, the 2nd order CDR circuit on CN52XX pass
  39. * 1 doesn't work properly. The following code disables 2nd order
  40. * CDR for the specified QLM.
  41. *
  42. * @param qlm QLM to disable 2nd order CDR for.
  43. */
  44. void __cvmx_helper_errata_qlm_disable_2nd_order_cdr(int qlm);
  45. #endif