cvmx-helper-errata.h revision 215990
140525Sjdp/***********************license start*************** 240525Sjdp * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights 340525Sjdp * reserved. 440525Sjdp * 540525Sjdp * 640525Sjdp * Redistribution and use in source and binary forms, with or without 740525Sjdp * modification, are permitted provided that the following conditions are 840525Sjdp * met: 940525Sjdp * 1040525Sjdp * * Redistributions of source code must retain the above copyright 1140525Sjdp * notice, this list of conditions and the following disclaimer. 1240525Sjdp * 1340525Sjdp * * Redistributions in binary form must reproduce the above 1440525Sjdp * copyright notice, this list of conditions and the following 1540525Sjdp * disclaimer in the documentation and/or other materials provided 1640525Sjdp * with the distribution. 1740525Sjdp 1840525Sjdp * * Neither the name of Cavium Networks nor the names of 1940525Sjdp * its contributors may be used to endorse or promote products 2040525Sjdp * derived from this software without specific prior written 2140525Sjdp * permission. 2240525Sjdp 2340525Sjdp * This Software, including technical data, may be subject to U.S. export control 2440525Sjdp * laws, including the U.S. Export Administration Act and its associated 2540525Sjdp * regulations, and may be subject to export or import regulations in other 2640803Sjdp * countries. 2740525Sjdp 2840525Sjdp * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" 2940525Sjdp * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR 3040525Sjdp * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO 3140525Sjdp * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR 3240525Sjdp * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM 3340525Sjdp * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE, 3440525Sjdp * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF 3540525Sjdp * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR 3640525Sjdp * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR 3740525Sjdp * PERFORMANCE OF THE SOFTWARE LIES WITH YOU. 3840525Sjdp ***********************license end**************************************/ 3940525Sjdp 4040525Sjdp 4140525Sjdp 4240525Sjdp 4340525Sjdp 4440525Sjdp 4540525Sjdp 4640525Sjdp/** 4740525Sjdp * @file 4840525Sjdp * 4940525Sjdp * Fixes and workaround for Octeon chip errata. This file 5040525Sjdp * contains functions called by cvmx-helper to workaround known 5140525Sjdp * chip errata. For the most part, code doesn't need to call 5240525Sjdp * these functions directly. 5340525Sjdp * 5440525Sjdp * <hr>$Revision: 52004 $<hr> 5540525Sjdp */ 5640525Sjdp#ifndef __CVMX_HELPER_ERRATA_H__ 5740525Sjdp#define __CVMX_HELPER_ERRATA_H__ 5840525Sjdp 5940525Sjdp/** 6040525Sjdp * @INTERNAL 6140525Sjdp * Function to adjust internal IPD pointer alignments 6240525Sjdp * 6340525Sjdp * @return 0 on success 6440525Sjdp * !0 on failure 6540525Sjdp */ 6640525Sjdpextern int __cvmx_helper_errata_fix_ipd_ptr_alignment(void); 6740525Sjdp 6840525Sjdp/** 6940525Sjdp * This function needs to be called on all Octeon chips with 7040525Sjdp * errata PKI-100. 7140525Sjdp * 7240525Sjdp * The Size field is 8 too large in WQE and next pointers 7340525Sjdp * 7440525Sjdp * The Size field generated by IPD is 8 larger than it should 7540525Sjdp * be. The Size field is <55:40> of both: 7640525Sjdp * - WORD3 in the work queue entry, and 7740525Sjdp * - the next buffer pointer (which precedes the packet data 7840525Sjdp * in each buffer). 7940525Sjdp * 8040525Sjdp * @param work Work queue entry to fix 8140525Sjdp * @return Zero on success. Negative on failure 8240525Sjdp */ 8340525Sjdpextern int cvmx_helper_fix_ipd_packet_chain(cvmx_wqe_t *work); 8440525Sjdp 8540525Sjdp/** 8640525Sjdp * Due to errata G-720, the 2nd order CDR circuit on CN52XX pass 8740525Sjdp * 1 doesn't work properly. The following code disables 2nd order 8840525Sjdp * CDR for the specified QLM. 8940525Sjdp * 9040525Sjdp * @param qlm QLM to disable 2nd order CDR for. 9140525Sjdp */ 9240525Sjdpextern void __cvmx_helper_errata_qlm_disable_2nd_order_cdr(int qlm); 9340525Sjdp#endif 9440525Sjdp