1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
3 * Copyright 2010-2011 Freescale Semiconductor, Inc.
13 /* The process device underlies process-wide user/kernel interactions, such as
14 * mapping dma_mem memory and providing accompanying ioctl()s. (This isn't used
15 * for portals, which use one UIO device each.).
17 #define PROCESS_PATH "/dev/fsl-usdpaa"
19 /* Allocation of resource IDs uses a generic interface. This enum is used to
20 * distinguish between the type of underlying object being manipulated.
27 dpaa_id_max /* <-- not a valid type, represents the number of types */
30 int process_alloc(enum dpaa_id_type id_type, uint32_t *base, uint32_t num,
31 uint32_t align, int partial);
32 void process_release(enum dpaa_id_type id_type, uint32_t base, uint32_t num);
34 int process_reserve(enum dpaa_id_type id_type, uint32_t base, uint32_t num);
36 /* Mapping and using QMan/BMan portals */
37 enum dpaa_portal_type {
42 struct dpaa_ioctl_portal_map {
43 /* Input parameter, is a qman or bman portal required. */
44 enum dpaa_portal_type type;
45 /* Specifes a specific portal index to map or 0xffffffff
50 /* Return value if the map succeeds, this gives the mapped
51 * cache-inhibited (cinh) and cache-enabled (cena) addresses.
53 struct dpaa_portal_map {
57 /* Qman-specific return values */
62 int process_portal_map(struct dpaa_ioctl_portal_map *params);
63 int process_portal_unmap(struct dpaa_portal_map *map);
65 struct dpaa_ioctl_irq_map {
66 enum dpaa_portal_type type; /* Type of portal to map */
67 int fd; /* File descriptor that contains the portal */
68 void *portal_cinh; /* Cache inhibited area to identify the portal */
71 int process_portal_irq_map(int fd, struct dpaa_ioctl_irq_map *irq);
72 int process_portal_irq_unmap(int fd);
74 #endif /* __PROCESS_H */