blob: fe257c912abfc0b5aadc9bc6f73befa7d4d8a73c [file] [log] [blame]
Aaron Williams3bda89d2020-12-11 17:05:24 +01001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2020 Marvell International Ltd.
4 *
5 * Functions for NPI initialization, configuration,
6 * and monitoring.
7 */
8
9#ifndef __CVMX_HELPER_NPI_H__
10#define __CVMX_HELPER_NPI_H__
11
12/**
13 * @INTERNAL
14 * Probe a NPI interface and determine the number of ports
15 * connected to it. The NPI interface should still be down after
16 * this call.
17 *
18 * @param interface Interface to probe
19 *
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010020 * Return: Number of ports on the interface. Zero to disable.
Aaron Williams3bda89d2020-12-11 17:05:24 +010021 */
22int __cvmx_helper_npi_probe(int interface);
23
24/**
25 * @INTERNAL
26 * Bringup and enable a NPI interface. After this call packet
27 * I/O should be fully functional. This is called with IPD
28 * enabled but PKO disabled.
29 *
30 * @param xiface Interface to bring up
31 *
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010032 * Return: Zero on success, negative on failure
Aaron Williams3bda89d2020-12-11 17:05:24 +010033 */
34int __cvmx_helper_npi_enable(int xiface);
35
36/**
37 * Sets the number of pipe used by SLI packet output in the variable,
38 * which then later used for setting it up in HW
39 */
40void cvmx_npi_config_set_num_pipes(int num_pipes);
41
42#endif