hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/include/soc/fsl/dpaa2-io.h
....@@ -1,7 +1,7 @@
11 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
22 /*
33 * Copyright 2014-2016 Freescale Semiconductor Inc.
4
- * Copyright NXP
4
+ * Copyright 2017-2019 NXP
55 *
66 */
77 #ifndef __FSL_DPAA2_IO_H
....@@ -57,7 +57,8 @@
5757 u32 qman_version;
5858 };
5959
60
-struct dpaa2_io *dpaa2_io_create(const struct dpaa2_io_desc *desc);
60
+struct dpaa2_io *dpaa2_io_create(const struct dpaa2_io_desc *desc,
61
+ struct device *dev);
6162
6263 void dpaa2_io_down(struct dpaa2_io *d);
6364
....@@ -90,21 +91,33 @@
9091 void *dpio_private;
9192 };
9293
94
+int dpaa2_io_get_cpu(struct dpaa2_io *d);
95
+
9396 int dpaa2_io_service_register(struct dpaa2_io *service,
94
- struct dpaa2_io_notification_ctx *ctx);
97
+ struct dpaa2_io_notification_ctx *ctx,
98
+ struct device *dev);
9599 void dpaa2_io_service_deregister(struct dpaa2_io *service,
96
- struct dpaa2_io_notification_ctx *ctx);
100
+ struct dpaa2_io_notification_ctx *ctx,
101
+ struct device *dev);
97102 int dpaa2_io_service_rearm(struct dpaa2_io *service,
98103 struct dpaa2_io_notification_ctx *ctx);
99104
105
+int dpaa2_io_service_pull_fq(struct dpaa2_io *d, u32 fqid,
106
+ struct dpaa2_io_store *s);
100107 int dpaa2_io_service_pull_channel(struct dpaa2_io *d, u32 channelid,
101108 struct dpaa2_io_store *s);
102109
110
+int dpaa2_io_service_enqueue_fq(struct dpaa2_io *d, u32 fqid,
111
+ const struct dpaa2_fd *fd);
112
+int dpaa2_io_service_enqueue_multiple_fq(struct dpaa2_io *d, u32 fqid,
113
+ const struct dpaa2_fd *fd, int number_of_frame);
114
+int dpaa2_io_service_enqueue_multiple_desc_fq(struct dpaa2_io *d, u32 *fqid,
115
+ const struct dpaa2_fd *fd, int number_of_frame);
103116 int dpaa2_io_service_enqueue_qd(struct dpaa2_io *d, u32 qdid, u8 prio,
104117 u16 qdbin, const struct dpaa2_fd *fd);
105
-int dpaa2_io_service_release(struct dpaa2_io *d, u32 bpid,
118
+int dpaa2_io_service_release(struct dpaa2_io *d, u16 bpid,
106119 const u64 *buffers, unsigned int num_buffers);
107
-int dpaa2_io_service_acquire(struct dpaa2_io *d, u32 bpid,
120
+int dpaa2_io_service_acquire(struct dpaa2_io *d, u16 bpid,
108121 u64 *buffers, unsigned int num_buffers);
109122
110123 struct dpaa2_io_store *dpaa2_io_store_create(unsigned int max_frames,
....@@ -112,4 +125,8 @@
112125 void dpaa2_io_store_destroy(struct dpaa2_io_store *s);
113126 struct dpaa2_dq *dpaa2_io_store_next(struct dpaa2_io_store *s, int *is_last);
114127
128
+int dpaa2_io_query_fq_count(struct dpaa2_io *d, u32 fqid,
129
+ u32 *fcnt, u32 *bcnt);
130
+int dpaa2_io_query_bp_count(struct dpaa2_io *d, u16 bpid,
131
+ u32 *num);
115132 #endif /* __FSL_DPAA2_IO_H */