.. | .. |
---|
1 | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ |
---|
2 | 2 | /* |
---|
3 | 3 | * Copyright 2014-2016 Freescale Semiconductor Inc. |
---|
4 | | - * Copyright NXP |
---|
| 4 | + * Copyright 2017-2019 NXP |
---|
5 | 5 | * |
---|
6 | 6 | */ |
---|
7 | 7 | #ifndef __FSL_DPAA2_IO_H |
---|
.. | .. |
---|
57 | 57 | u32 qman_version; |
---|
58 | 58 | }; |
---|
59 | 59 | |
---|
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); |
---|
61 | 62 | |
---|
62 | 63 | void dpaa2_io_down(struct dpaa2_io *d); |
---|
63 | 64 | |
---|
.. | .. |
---|
90 | 91 | void *dpio_private; |
---|
91 | 92 | }; |
---|
92 | 93 | |
---|
| 94 | +int dpaa2_io_get_cpu(struct dpaa2_io *d); |
---|
| 95 | + |
---|
93 | 96 | 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); |
---|
95 | 99 | 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); |
---|
97 | 102 | int dpaa2_io_service_rearm(struct dpaa2_io *service, |
---|
98 | 103 | struct dpaa2_io_notification_ctx *ctx); |
---|
99 | 104 | |
---|
| 105 | +int dpaa2_io_service_pull_fq(struct dpaa2_io *d, u32 fqid, |
---|
| 106 | + struct dpaa2_io_store *s); |
---|
100 | 107 | int dpaa2_io_service_pull_channel(struct dpaa2_io *d, u32 channelid, |
---|
101 | 108 | struct dpaa2_io_store *s); |
---|
102 | 109 | |
---|
| 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); |
---|
103 | 116 | int dpaa2_io_service_enqueue_qd(struct dpaa2_io *d, u32 qdid, u8 prio, |
---|
104 | 117 | 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, |
---|
106 | 119 | 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, |
---|
108 | 121 | u64 *buffers, unsigned int num_buffers); |
---|
109 | 122 | |
---|
110 | 123 | struct dpaa2_io_store *dpaa2_io_store_create(unsigned int max_frames, |
---|
.. | .. |
---|
112 | 125 | void dpaa2_io_store_destroy(struct dpaa2_io_store *s); |
---|
113 | 126 | struct dpaa2_dq *dpaa2_io_store_next(struct dpaa2_io_store *s, int *is_last); |
---|
114 | 127 | |
---|
| 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); |
---|
115 | 132 | #endif /* __FSL_DPAA2_IO_H */ |
---|