diff options
author | Aaron Williams <awilliams@marvell.com> | 2020-12-11 19:05:24 +0300 |
---|---|---|
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2021-04-23 22:02:12 +0300 |
commit | e7bc6eabd1c8b3322d7aa4188d5abde8e08aa712 (patch) | |
tree | 68c003aa983aa600ac1c2ed2b681ec6566dc9e03 /arch/mips/mach-octeon/include/mach/cvmx-helper-pko.h | |
parent | 2d80cbfb0556eea18f0e3a10a1c0fa48282429d1 (diff) | |
download | u-boot-e7bc6eabd1c8b3322d7aa4188d5abde8e08aa712.tar.xz |
mips: octeon: Add misc cvmx-helper header files
Import misc cvmx-helper header files from 2013 U-Boot. They will be used
by the later added drivers to support PCIe and networking on the MIPS
Octeon II / III platforms.
Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/mips/mach-octeon/include/mach/cvmx-helper-pko.h')
-rw-r--r-- | arch/mips/mach-octeon/include/mach/cvmx-helper-pko.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/mips/mach-octeon/include/mach/cvmx-helper-pko.h b/arch/mips/mach-octeon/include/mach/cvmx-helper-pko.h new file mode 100644 index 0000000000..806102df22 --- /dev/null +++ b/arch/mips/mach-octeon/include/mach/cvmx-helper-pko.h @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2020 Marvell International Ltd. + * + * PKO helper, configuration API + */ + +#ifndef __CVMX_HELPER_PKO_H__ +#define __CVMX_HELPER_PKO_H__ + +/* CSR typedefs have been moved to cvmx-pko-defs.h */ + +/** + * cvmx_override_pko_queue_priority(int ipd_port, u64 + * priorities[16]) is a function pointer. It is meant to allow + * customization of the PKO queue priorities based on the port + * number. Users should set this pointer to a function before + * calling any cvmx-helper operations. + */ +void (*cvmx_override_pko_queue_priority)(int ipd_port, u8 *priorities); + +/** + * Gets the fpa pool number of pko pool + */ +s64 cvmx_fpa_get_pko_pool(void); + +/** + * Gets the buffer size of pko pool + */ +u64 cvmx_fpa_get_pko_pool_block_size(void); + +/** + * Gets the buffer size of pko pool + */ +u64 cvmx_fpa_get_pko_pool_buffer_count(void); + +int cvmx_helper_pko_init(void); + +/* + * This function is a no-op + * included here for backwards compatibility only. + */ +static inline int cvmx_pko_initialize_local(void) +{ + return 0; +} + +int __cvmx_helper_pko_drain(void); +int __cvmx_helper_interface_setup_pko(int interface); + +#endif /* __CVMX_HELPER_PKO_H__ */ |