Aaron Williams | 3bda89d | 2020-12-11 17:05:24 +0100 | [diff] [blame] | 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 | |
| 9 | #ifndef __CVMX_HELPER_LOOP_H__ |
| 10 | #define __CVMX_HELPER_LOOP_H__ |
| 11 | |
| 12 | /** |
| 13 | * @INTERNAL |
| 14 | * Probe a LOOP interface and determine the number of ports |
| 15 | * connected to it. The LOOP interface should still be down after |
| 16 | * this call. |
| 17 | * |
| 18 | * @param xiface Interface to probe |
| 19 | * |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 20 | * Return: Number of ports on the interface. Zero to disable. |
Aaron Williams | 3bda89d | 2020-12-11 17:05:24 +0100 | [diff] [blame] | 21 | */ |
| 22 | int __cvmx_helper_loop_probe(int xiface); |
| 23 | int __cvmx_helper_loop_enumerate(int xiface); |
| 24 | |
| 25 | /** |
| 26 | * @INTERNAL |
| 27 | * Bringup and enable a LOOP interface. After this call packet |
| 28 | * I/O should be fully functional. This is called with IPD |
| 29 | * enabled but PKO disabled. |
| 30 | * |
| 31 | * @param xiface Interface to bring up |
| 32 | * |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 33 | * Return: Zero on success, negative on failure |
Aaron Williams | 3bda89d | 2020-12-11 17:05:24 +0100 | [diff] [blame] | 34 | */ |
| 35 | int __cvmx_helper_loop_enable(int xiface); |
| 36 | |
| 37 | #endif |