18c2ecf20Sopenharmony_ci/***********************license start***************
28c2ecf20Sopenharmony_ci * Author: Cavium Networks
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Contact: support@caviumnetworks.com
58c2ecf20Sopenharmony_ci * This file is part of the OCTEON SDK
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Copyright (c) 2003-2008 Cavium Networks
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * This file is free software; you can redistribute it and/or modify
108c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License, Version 2, as published by
118c2ecf20Sopenharmony_ci * the Free Software Foundation.
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci * This file is distributed in the hope that it will be useful,
148c2ecf20Sopenharmony_ci * but AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of
158c2ecf20Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT.
168c2ecf20Sopenharmony_ci * See the GNU General Public License for more details.
178c2ecf20Sopenharmony_ci *
188c2ecf20Sopenharmony_ci * You should have received a copy of the GNU General Public License
198c2ecf20Sopenharmony_ci * along with this file; if not, write to the Free Software
208c2ecf20Sopenharmony_ci * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
218c2ecf20Sopenharmony_ci * or visit http://www.gnu.org/licenses/.
228c2ecf20Sopenharmony_ci *
238c2ecf20Sopenharmony_ci * This file may also be available under a different license from Cavium.
248c2ecf20Sopenharmony_ci * Contact Cavium Networks for more information
258c2ecf20Sopenharmony_ci ***********************license end**************************************/
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci/**
288c2ecf20Sopenharmony_ci * @file
298c2ecf20Sopenharmony_ci *
308c2ecf20Sopenharmony_ci * Functions for LOOP initialization, configuration,
318c2ecf20Sopenharmony_ci * and monitoring.
328c2ecf20Sopenharmony_ci *
338c2ecf20Sopenharmony_ci */
348c2ecf20Sopenharmony_ci#ifndef __CVMX_HELPER_LOOP_H__
358c2ecf20Sopenharmony_ci#define __CVMX_HELPER_LOOP_H__
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci/**
388c2ecf20Sopenharmony_ci * Probe a LOOP interface and determine the number of ports
398c2ecf20Sopenharmony_ci * connected to it. The LOOP interface should still be down after
408c2ecf20Sopenharmony_ci * this call.
418c2ecf20Sopenharmony_ci *
428c2ecf20Sopenharmony_ci * @interface: Interface to probe
438c2ecf20Sopenharmony_ci *
448c2ecf20Sopenharmony_ci * Returns Number of ports on the interface. Zero to disable.
458c2ecf20Sopenharmony_ci */
468c2ecf20Sopenharmony_ciextern int __cvmx_helper_loop_probe(int interface);
478c2ecf20Sopenharmony_cistatic inline int __cvmx_helper_loop_enumerate(int interface) {return 4; }
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci/**
508c2ecf20Sopenharmony_ci * Bringup and enable a LOOP interface. After this call packet
518c2ecf20Sopenharmony_ci * I/O should be fully functional. This is called with IPD
528c2ecf20Sopenharmony_ci * enabled but PKO disabled.
538c2ecf20Sopenharmony_ci *
548c2ecf20Sopenharmony_ci * @interface: Interface to bring up
558c2ecf20Sopenharmony_ci *
568c2ecf20Sopenharmony_ci * Returns Zero on success, negative on failure
578c2ecf20Sopenharmony_ci */
588c2ecf20Sopenharmony_ciextern int __cvmx_helper_loop_enable(int interface);
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci#endif
61