1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
3 * Copyright 2010-2011 Freescale Semiconductor, Inc.
13 #include <dpaa_list.h>
20 /* Thread-entry/exit hooks; */
21 int qman_thread_init(void);
22 int bman_thread_init(void);
23 int qman_thread_finish(void);
24 int bman_thread_finish(void);
26 #define QBMAN_ANY_PORTAL_IDX 0xffffffff
28 /* Obtain and free raw (unitialized) portals */
30 struct dpaa_raw_portal {
33 /* set to non zero to turn on stashing */
35 /* Stashing attributes for the portal */
40 /* Specifies the stash request queue this portal should use */
43 /* Specifes a specific portal index to map or QBMAN_ANY_PORTAL_IDX
44 * for don't care. The portal index will be populated by the
45 * driver when the ioctl() successfully completes.
54 int qman_allocate_raw_portal(struct dpaa_raw_portal *portal);
55 int qman_free_raw_portal(struct dpaa_raw_portal *portal);
57 int bman_allocate_raw_portal(struct dpaa_raw_portal *portal);
58 int bman_free_raw_portal(struct dpaa_raw_portal *portal);
60 /* Obtain thread-local UIO file-descriptors */
61 int qman_thread_fd(void);
62 int bman_thread_fd(void);
64 /* Post-process interrupts. NB, the kernel IRQ handler disables the interrupt
65 * line before notifying us, and this post-processing re-enables it once
66 * processing is complete. As such, it is essential to call this before going
67 * into another blocking read/select/poll.
69 void qman_thread_irq(void);
70 void bman_thread_irq(void);
71 void qman_fq_portal_thread_irq(struct qman_portal *qp);
73 void qman_clear_irq(void);
76 int qman_global_init(void);
77 int bman_global_init(void);
79 /* Direct portal create and destroy */
80 struct qman_portal *fsl_qman_fq_portal_create(int *fd);
81 int fsl_qman_fq_portal_destroy(struct qman_portal *qp);
82 int fsl_qman_fq_portal_init(struct qman_portal *qp);
88 #endif /* __FSL_USD_H */