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 /* Post-process interrupts. NB, the kernel IRQ handler disables the interrupt
59 * line before notifying us, and this post-processing re-enables it once
60 * processing is complete. As such, it is essential to call this before going
61 * into another blocking read/select/poll.
63 void qman_thread_irq(void);
64 void bman_thread_irq(void);
67 int qman_global_init(void);
68 int bman_global_init(void);
70 /* Direct portal create and destroy */
71 struct qman_portal *fsl_qman_portal_create(void);
72 int fsl_qman_portal_destroy(struct qman_portal *qp);
78 #endif /* __FSL_USD_H */