1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
3 * Copyright 2010-2011 Freescale Semiconductor, Inc.
19 /* Thread-entry/exit hooks; */
20 int qman_thread_init(void);
21 int bman_thread_init(void);
22 int qman_thread_finish(void);
23 int bman_thread_finish(void);
25 #define QBMAN_ANY_PORTAL_IDX 0xffffffff
27 /* Obtain and free raw (unitialized) portals */
29 struct dpaa_raw_portal {
32 /* set to non zero to turn on stashing */
34 /* Stashing attributes for the portal */
39 /* Specifies the stash request queue this portal should use */
42 /* Specifes a specific portal index to map or QBMAN_ANY_PORTAL_IDX
43 * for don't care. The portal index will be populated by the
44 * driver when the ioctl() successfully completes.
53 int qman_allocate_raw_portal(struct dpaa_raw_portal *portal);
54 int qman_free_raw_portal(struct dpaa_raw_portal *portal);
56 int bman_allocate_raw_portal(struct dpaa_raw_portal *portal);
57 int bman_free_raw_portal(struct dpaa_raw_portal *portal);
59 /* Obtain thread-local UIO file-descriptors */
60 int qman_thread_fd(void);
61 int bman_thread_fd(void);
63 /* Post-process interrupts. NB, the kernel IRQ handler disables the interrupt
64 * line before notifying us, and this post-processing re-enables it once
65 * processing is complete. As such, it is essential to call this before going
66 * into another blocking read/select/poll.
68 void qman_thread_irq(void);
69 void bman_thread_irq(void);
71 void qman_clear_irq(void);
74 int qman_global_init(void);
75 int bman_global_init(void);
77 /* Direct portal create and destroy */
78 struct qman_portal *fsl_qman_fq_portal_create(int *fd);
79 int fsl_qman_fq_portal_destroy(struct qman_portal *qp);
80 int fsl_qman_fq_portal_init(struct qman_portal *qp);
86 #endif /* __FSL_USD_H */