blob: e1eb824c934677d976da0ddffca75efd137d69e5 [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 * PKO helper, configuration API
6 */
7
8#ifndef __CVMX_HELPER_PKO_H__
9#define __CVMX_HELPER_PKO_H__
10
11/* CSR typedefs have been moved to cvmx-pko-defs.h */
12
13/**
14 * cvmx_override_pko_queue_priority(int ipd_port, u64
15 * priorities[16]) is a function pointer. It is meant to allow
16 * customization of the PKO queue priorities based on the port
17 * number. Users should set this pointer to a function before
18 * calling any cvmx-helper operations.
19 */
Stefan Roesecbe62432022-04-07 09:11:10 +020020extern void (*cvmx_override_pko_queue_priority)(int ipd_port, u8 *priorities);
Aaron Williams3bda89d2020-12-11 17:05:24 +010021
22/**
23 * Gets the fpa pool number of pko pool
24 */
25s64 cvmx_fpa_get_pko_pool(void);
26
27/**
28 * Gets the buffer size of pko pool
29 */
30u64 cvmx_fpa_get_pko_pool_block_size(void);
31
32/**
33 * Gets the buffer size of pko pool
34 */
35u64 cvmx_fpa_get_pko_pool_buffer_count(void);
36
37int cvmx_helper_pko_init(void);
38
39/*
40 * This function is a no-op
41 * included here for backwards compatibility only.
42 */
43static inline int cvmx_pko_initialize_local(void)
44{
45 return 0;
46}
47
48int __cvmx_helper_pko_drain(void);
49int __cvmx_helper_interface_setup_pko(int interface);
50
51#endif /* __CVMX_HELPER_PKO_H__ */