1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
3 * Copyright 2010-2011 Freescale Semiconductor, Inc.
18 /* Thread-entry/exit hooks; */
19 int qman_thread_init(void);
20 int bman_thread_init(void);
21 int qman_thread_finish(void);
22 int bman_thread_finish(void);
24 #define QBMAN_ANY_PORTAL_IDX 0xffffffff
26 /* Obtain and free raw (unitialized) portals */
28 struct dpaa_raw_portal {
31 /* set to non zero to turn on stashing */
33 /* Stashing attributes for the portal */
38 /* Specifies the stash request queue this portal should use */
41 /* Specifes a specific portal index to map or QBMAN_ANY_PORTAL_IDX
42 * for don't care. The portal index will be populated by the
43 * driver when the ioctl() successfully completes.
52 int qman_allocate_raw_portal(struct dpaa_raw_portal *portal);
53 int qman_free_raw_portal(struct dpaa_raw_portal *portal);
55 int bman_allocate_raw_portal(struct dpaa_raw_portal *portal);
56 int bman_free_raw_portal(struct dpaa_raw_portal *portal);
58 /* Obtain thread-local UIO file-descriptors */
59 int qman_thread_fd(void);
60 int bman_thread_fd(void);
62 /* Post-process interrupts. NB, the kernel IRQ handler disables the interrupt
63 * line before notifying us, and this post-processing re-enables it once
64 * processing is complete. As such, it is essential to call this before going
65 * into another blocking read/select/poll.
67 void qman_thread_irq(void);
68 void bman_thread_irq(void);
70 void qman_clear_irq(void);
73 int qman_global_init(void);
74 int bman_global_init(void);
76 /* Direct portal create and destroy */
77 struct qman_portal *fsl_qman_portal_create(void);
78 int fsl_qman_portal_destroy(struct qman_portal *qp);
84 #endif /* __FSL_USD_H */