summaryrefslogtreecommitdiff
path: root/arch/mips/mach-octeon/include/mach/cvmx-helper-pko3.h
diff options
context:
space:
mode:
authorAaron Williams <awilliams@marvell.com>2020-12-11 19:05:24 +0300
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2021-04-23 22:02:12 +0300
commite7bc6eabd1c8b3322d7aa4188d5abde8e08aa712 (patch)
tree68c003aa983aa600ac1c2ed2b681ec6566dc9e03 /arch/mips/mach-octeon/include/mach/cvmx-helper-pko3.h
parent2d80cbfb0556eea18f0e3a10a1c0fa48282429d1 (diff)
downloadu-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-pko3.h')
-rw-r--r--arch/mips/mach-octeon/include/mach/cvmx-helper-pko3.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/arch/mips/mach-octeon/include/mach/cvmx-helper-pko3.h b/arch/mips/mach-octeon/include/mach/cvmx-helper-pko3.h
new file mode 100644
index 0000000000..ca8d848bd1
--- /dev/null
+++ b/arch/mips/mach-octeon/include/mach/cvmx-helper-pko3.h
@@ -0,0 +1,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__ */