1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
3 * Copyright 2010-2011 Freescale Semiconductor, Inc.
14 /* The process device underlies process-wide user/kernel interactions, such as
15 * mapping dma_mem memory and providing accompanying ioctl()s. (This isn't used
16 * for portals, which use one UIO device each.).
18 #define PROCESS_PATH "/dev/fsl-usdpaa"
20 /* Allocation of resource IDs uses a generic interface. This enum is used to
21 * distinguish between the type of underlying object being manipulated.
28 dpaa_id_max /* <-- not a valid type, represents the number of types */
31 int process_alloc(enum dpaa_id_type id_type, uint32_t *base, uint32_t num,
32 uint32_t align, int partial);
33 void process_release(enum dpaa_id_type id_type, uint32_t base, uint32_t num);
35 int process_reserve(enum dpaa_id_type id_type, uint32_t base, uint32_t num);
37 /* Mapping and using QMan/BMan portals */
38 enum dpaa_portal_type {
43 struct dpaa_portal_map {
48 struct dpaa_ioctl_portal_map {
49 /* Input parameter, is a qman or bman portal required. */
50 enum dpaa_portal_type type;
51 /* Specifes a specific portal index to map or 0xffffffff
56 /* Return value if the map succeeds, this gives the mapped
57 * cache-inhibited (cinh) and cache-enabled (cena) addresses.
59 struct dpaa_portal_map addr;
61 /* Qman-specific return values */
66 int process_portal_map(struct dpaa_ioctl_portal_map *params);
67 int process_portal_unmap(struct dpaa_portal_map *map);
69 struct dpaa_ioctl_irq_map {
70 enum dpaa_portal_type type; /* Type of portal to map */
71 int fd; /* File descriptor that contains the portal */
72 void *portal_cinh; /* Cache inhibited area to identify the portal */
75 int process_portal_irq_map(int fd, struct dpaa_ioctl_irq_map *irq);
76 int process_portal_irq_unmap(int fd);
78 struct usdpaa_ioctl_link_status {
79 char if_name[IF_NAME_MAX_LEN];
84 int dpaa_intr_enable(char *if_name, int efd);
87 int dpaa_intr_disable(char *if_name);
89 struct usdpaa_ioctl_link_status_args {
90 /* network device node name */
91 char if_name[IF_NAME_MAX_LEN];
95 struct usdpaa_ioctl_update_link_status_args {
96 /* network device node name */
97 char if_name[IF_NAME_MAX_LEN];
98 /* link status(ETH_LINK_UP/DOWN) */
103 int dpaa_get_link_status(char *if_name);
106 int dpaa_update_link_status(char *if_name, int link_status);
108 #endif /* __PROCESS_H */