1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
3 * Copyright 2013-2016 Freescale Semiconductor Inc.
12 int dpio_open(struct fsl_mc_io
*mc_io
,
17 int dpio_close(struct fsl_mc_io
*mc_io
,
22 * enum dpio_channel_mode - DPIO notification channel mode
23 * @DPIO_NO_CHANNEL: No support for notification channel
24 * @DPIO_LOCAL_CHANNEL: Notifications on data availability can be received by a
25 * dedicated channel in the DPIO; user should point the queue's
26 * destination in the relevant interface to this DPIO
28 enum dpio_channel_mode
{
30 DPIO_LOCAL_CHANNEL
= 1,
34 * struct dpio_cfg - Structure representing DPIO configuration
35 * @channel_mode: Notification channel mode
36 * @num_priorities: Number of priorities for the notification channel (1-8);
37 * relevant only if 'channel_mode = DPIO_LOCAL_CHANNEL'
40 enum dpio_channel_mode channel_mode
;
44 int dpio_enable(struct fsl_mc_io
*mc_io
,
48 int dpio_disable(struct fsl_mc_io
*mc_io
,
53 * struct dpio_attr - Structure representing DPIO attributes
55 * @qbman_portal_ce_offset: offset of the software portal cache-enabled area
56 * @qbman_portal_ci_offset: offset of the software portal cache-inhibited area
57 * @qbman_portal_id: Software portal ID
58 * @channel_mode: Notification channel mode
59 * @num_priorities: Number of priorities for the notification channel (1-8);
60 * relevant only if 'channel_mode = DPIO_LOCAL_CHANNEL'
61 * @qbman_version: QBMAN version
65 u64 qbman_portal_ce_offset
;
66 u64 qbman_portal_ci_offset
;
68 enum dpio_channel_mode channel_mode
;
73 int dpio_get_attributes(struct fsl_mc_io
*mc_io
,
76 struct dpio_attr
*attr
);
78 int dpio_set_stashing_destination(struct fsl_mc_io
*mc_io
,
83 int dpio_get_api_version(struct fsl_mc_io
*mc_io
,
88 int dpio_reset(struct fsl_mc_io
*mc_io
,
92 #endif /* __FSL_DPIO_H */