1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2020 Marvell International Ltd.
6 #ifndef __CVMX_HELPER_PKO3_H__
7 #define __CVMX_HELPER_PKO3_H__
10 * Initialize PKO3 unit on the current node.
12 * Covers the common hardware, memory and global configuration.
13 * Per-interface initialization is performed separately.
15 * Return: 0 on success.
18 int cvmx_helper_pko3_init_global(unsigned int node);
19 int __cvmx_helper_pko3_init_global(unsigned int node, u16 gaura);
22 * Initialize a simple interface with a a given number of
23 * fair or prioritized queues.
24 * This function will assign one channel per sub-interface.
26 int __cvmx_pko3_config_gen_interface(int xiface, u8 subif, u8 num_queues, bool prioritized);
29 * Configure and initialize PKO3 for an interface
31 * @param interface is the interface number to configure
32 * Return: 0 on success.
35 int cvmx_helper_pko3_init_interface(int xiface);
36 int __cvmx_pko3_helper_dqs_activate(int xiface, int index, bool min_pad);
39 * Uninitialize PKO3 interface
41 * Release all resources held by PKO for an interface.
42 * The shutdown code is the same for all supported interfaces.
44 int cvmx_helper_pko3_shut_interface(int xiface);
49 * Should be called after all interfaces have been shut down on the PKO3.
51 * Disables the PKO, frees all its buffers.
53 int cvmx_helper_pko3_shutdown(unsigned int node);
56 * Show integrated PKO configuration.
58 * @param node node number
60 int cvmx_helper_pko3_config_dump(unsigned int node);
63 * Show integrated PKO statistics.
65 * @param node node number
67 int cvmx_helper_pko3_stats_dump(unsigned int node);
70 * Clear PKO statistics.
72 * @param node node number
74 void cvmx_helper_pko3_stats_clear(unsigned int node);
76 #endif /* __CVMX_HELPER_PKO3_H__ */