blob: f985ce2c241b911eab3cb8d6e707c5136937ef1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2020 Marvell International Ltd.
*/
#ifndef __CVMX_HELPER_PKO3_H__
#define __CVMX_HELPER_PKO3_H__
/*
* Initialize PKO3 unit on the current node.
*
* Covers the common hardware, memory and global configuration.
* Per-interface initialization is performed separately.
*
* Return: 0 on success.
*
*/
int cvmx_helper_pko3_init_global(unsigned int node);
int __cvmx_helper_pko3_init_global(unsigned int node, u16 gaura);
/**
* Initialize a simple interface with a a given number of
* fair or prioritized queues.
* This function will assign one channel per sub-interface.
*/
int __cvmx_pko3_config_gen_interface(int xiface, u8 subif, u8 num_queues, bool prioritized);
/*
* Configure and initialize PKO3 for an interface
*
* @param interface is the interface number to configure
* Return: 0 on success.
*
*/
int cvmx_helper_pko3_init_interface(int xiface);
int __cvmx_pko3_helper_dqs_activate(int xiface, int index, bool min_pad);
/**
* Uninitialize PKO3 interface
*
* Release all resources held by PKO for an interface.
* The shutdown code is the same for all supported interfaces.
*/
int cvmx_helper_pko3_shut_interface(int xiface);
/**
* Shutdown PKO3
*
* Should be called after all interfaces have been shut down on the PKO3.
*
* Disables the PKO, frees all its buffers.
*/
int cvmx_helper_pko3_shutdown(unsigned int node);
/**
* Show integrated PKO configuration.
*
* @param node node number
*/
int cvmx_helper_pko3_config_dump(unsigned int node);
/**
* Show integrated PKO statistics.
*
* @param node node number
*/
int cvmx_helper_pko3_stats_dump(unsigned int node);
/**
* Clear PKO statistics.
*
* @param node node number
*/
void cvmx_helper_pko3_stats_clear(unsigned int node);
#endif /* __CVMX_HELPER_PKO3_H__ */
|