cvmx-helper-loop.h revision 210284
1210284Sjmallett/***********************license start*************** 2210284Sjmallett * Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights 3210284Sjmallett * reserved. 4210284Sjmallett * 5210284Sjmallett * 6210284Sjmallett * Redistribution and use in source and binary forms, with or without 7210284Sjmallett * modification, are permitted provided that the following conditions are 8210284Sjmallett * met: 9210284Sjmallett * 10210284Sjmallett * * Redistributions of source code must retain the above copyright 11210284Sjmallett * notice, this list of conditions and the following disclaimer. 12210284Sjmallett * 13210284Sjmallett * * Redistributions in binary form must reproduce the above 14210284Sjmallett * copyright notice, this list of conditions and the following 15210284Sjmallett * disclaimer in the documentation and/or other materials provided 16210284Sjmallett * with the distribution. 17210284Sjmallett * 18210284Sjmallett * * Neither the name of Cavium Networks nor the names of 19210284Sjmallett * its contributors may be used to endorse or promote products 20210284Sjmallett * derived from this software without specific prior written 21210284Sjmallett * permission. 22210284Sjmallett * 23210284Sjmallett * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" 24210284Sjmallett * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS 25210284Sjmallett * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH 26210284Sjmallett * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY 27210284Sjmallett * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT 28210284Sjmallett * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES 29210284Sjmallett * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR 30210284Sjmallett * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET 31210284Sjmallett * POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT 32210284Sjmallett * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU. 33210284Sjmallett * 34210284Sjmallett * 35210284Sjmallett * For any questions regarding licensing please contact marketing@caviumnetworks.com 36210284Sjmallett * 37210284Sjmallett ***********************license end**************************************/ 38210284Sjmallett 39210284Sjmallett 40210284Sjmallett 41210284Sjmallett 42210284Sjmallett 43210284Sjmallett 44210284Sjmallett/** 45210284Sjmallett * @file 46210284Sjmallett * 47210284Sjmallett * Functions for LOOP initialization, configuration, 48210284Sjmallett * and monitoring. 49210284Sjmallett * 50210284Sjmallett * <hr>$Revision: 41586 $<hr> 51210284Sjmallett */ 52210284Sjmallett#ifndef __CVMX_HELPER_LOOP_H__ 53210284Sjmallett#define __CVMX_HELPER_LOOP_H__ 54210284Sjmallett 55210284Sjmallett/** 56210284Sjmallett * @INTERNAL 57210284Sjmallett * Probe a LOOP interface and determine the number of ports 58210284Sjmallett * connected to it. The LOOP interface should still be down after 59210284Sjmallett * this call. 60210284Sjmallett * 61210284Sjmallett * @param interface Interface to probe 62210284Sjmallett * 63210284Sjmallett * @return Number of ports on the interface. Zero to disable. 64210284Sjmallett */ 65210284Sjmallettextern int __cvmx_helper_loop_probe(int interface); 66210284Sjmallett 67210284Sjmallett/** 68210284Sjmallett * @INTERNAL 69210284Sjmallett * Bringup and enable a LOOP interface. After this call packet 70210284Sjmallett * I/O should be fully functional. This is called with IPD 71210284Sjmallett * enabled but PKO disabled. 72210284Sjmallett * 73210284Sjmallett * @param interface Interface to bring up 74210284Sjmallett * 75210284Sjmallett * @return Zero on success, negative on failure 76210284Sjmallett */ 77210284Sjmallettextern int __cvmx_helper_loop_enable(int interface); 78210284Sjmallett 79210284Sjmallett#endif 80210284Sjmallett 81