Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422738AbcKPUSD (ORCPT ); Wed, 16 Nov 2016 15:18:03 -0500 Received: from mail-dm3nam03on0061.outbound.protection.outlook.com ([104.47.41.61]:40564 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934451AbcKPUQw (ORCPT ); Wed, 16 Nov 2016 15:16:52 -0500 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; X-IncomingTopHeaderMarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:1012;Count:10 From: Stuart Yoder To: CC: , , , , , , , , Roy Pledge , Stuart Yoder , Laurentiu Tudor , Ioana Radulescu Subject: [PATCH v2 5/9] bus: fsl-mc: dpio: add global dpaa2 definitions Date: Wed, 16 Nov 2016 14:09:55 -0600 Message-ID: <1479326999-29340-6-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1479326999-29340-1-git-send-email-stuart.yoder@nxp.com> References: <1479326999-29340-1-git-send-email-stuart.yoder@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131238010095462436;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(336004)(189002)(199003)(50466002)(189998001)(626004)(86362001)(48376002)(85426001)(33646002)(50226002)(7846002)(5660300001)(305945005)(110136003)(50986999)(81156014)(76176999)(97736004)(106466001)(92566002)(105606002)(81166006)(8936002)(2351001)(47776003)(6916009)(2950100002)(8666005)(104016004)(5003940100001)(2906002)(68736007)(7416002)(87936001)(77096005)(36756003)(356003)(4326007)(8676002)(6666003)(7059030)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB0750;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD049;1:tJ87SaBBpGQuXV8XLbZ5Uze/qsaj7RxUDwPVpCS7AA4WrJgkf9xKOiSk1pI6k1V4NeUJDPR+GP4HPt8rCdLGSuYieu4Bb+M3RhqHfWQTKadco9MFFIYZDsFrNJ1+qLIOliX3zoDscTro+Ll9MrxNW3dE0nIDE/zg6otWOJVaY39Cf9WSVgvojnHeNcVt8ObORQlH+Dmb1H7YT3Uf3SXX5mdg5WilUcLt8RFpjOcwlIZ/8PxJ0OZvruhvPBCvERJbQ7a2ZlPNsRkuiABdJOiPu0K3vNuCUa18lbda0TeJpCLCCJlyhjst2Dg2pxnm9dGO4wpiqkNyHS0B+2Qqbgmc2zYe6snr6ukp9EE+IZ8glLhmU3jKA2KG6DZX0yPM/w3MqqdOxvP3q2FdENiQTHxBySt+a4cDgRzMUEO3zqKNgQpV3n0F82gU42S06vX8CoDWamZPmOJP0cLqBTNeHsTV5rLb7ZWcbqioe+OmqdSzuZ1FCkrRr5CeaMewuvbMYyon5To0BqLaP6VOS292w2jyaEZGw/RLti1i6QL5scUwxoZb4IJB+FQ7HbuLoOsetHNMyEAqbqjbW72ynoRBJ+WJyM0JokKVygN82D5Fsd7Azu6RtzNOR98JdW5LV4RLhn1sCYo1Q8TPaVwQKsYqMW90OPmHpxCLC/N9ofsRYOCV95mBJJma66cRfyApTrbCxdDKlhp5IkXtlsRoMtH8zc9uJWoZNYJRpusjwPeVWHHk4lw= MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;2:67mAeu/YpZm1QHPA9jdV9vZKNLndKB1EETxffkDJ8scwA6qflTfJO67e57LQnlDtptTpy8Uxf/cazm6gT/1f9RsaOpBHR9TeLT6e2Zsx/H+wUT5MHxlFQ0YuUc9tllu+VHIQtMrveJuDfZyO5wp+iSSMrWpymelI8ejTTqRBHYA=;3:l2Al/hcGiXEil6s/IILUy1XPNtNPHZ05YP9Op9usI8eaEqzS4hjQKHuHla8bN4G7hsWlrPnasJBKJWLZ1O+fpu2cq+8sAZSxsE7jFqHzBoD8Mg/emrP5Dol94CqbM8GSciLv5Gau6nj7kjxHnZHcb65Yrp4qc02cNQj1m8DAZpFZmVzLc1GSIlWoZpfAeGHrLJgMkSBhG0pfnKIDAyIrXb7R/Ar1AHED4Ki3kQMPba+djuB+TyjFQnPE+oshyanIQrB/xDnhsAct+PkNacqJgw== X-MS-Office365-Filtering-Correlation-Id: 1bc05bd1-ab1e-4999-86c6-08d40e5d7f39 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM2PR0301MB0750; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;25:9hPZuxs/tLEXDjRb+gJ6KiAM3aLTeMQWqedwKERXVl1sQusg/qIjZajtVmnjZc+sUV0du0HO3wDS6rDTRYFtfZPBk6BRfBH17g3Clga6OfdfQs5gUBFw3xicBvbnV+IR4bYTRTGHqhuqkcpYFdUX4WS530cYZGBD/bKXJPlit+dMNNP0nmzzpH4ycF9kl1e3xu5+Zw2HH6D0bsGbsPQ2fYw6UBNlfeFv1QsNTi06UUlw2fMakp+/uWCd8VdfC0MQPJWG8xucAi/mQNvr6QJrRRgqHNIYyEr+ioeZQmCI40slbyoskWFKgKSXptSwzUwnQ6JjgDrWDfX+Jz63D8WjhebYQ3fRKxdi6IRdrJjhYye52z55YtqN+QJB4KvrVw7+2VvrWqyauDrD1K3SJOhxyH/xU8g9oZ/QnHvYe5S+zYIOGKYP//hhKCLNo4L8NZEqkV6cu9F85f/OyfqwAJIwtsxJj2RPP7Tp5FNIqe3ZPPpitndQGkw+MBVbZc5KpN/nYz+8wktFn4sFFhuCeb5jmG4yco2JgcmpNw0BYB7b1JuKThZpWHOQ/xEJG9x88yHTIUjpjdA8+0myQt4qXmzqBeiwlKtgKJosMDXyLThdx0gEpuUqOkGzFczQ4q/2swPhAeu3I9hIW5XiODxnfP6IYv6wf2KQmYDoW8O8bfOUH2ROxdNsshmRhto4b3Zb07NcOvnvjBvXUodYhht4ifxBDL6At2SS+hQoX8r2vvMYEWTGSECh1QFnb8bZI8/xe/r6BjwYU9kB7Bmoa1ocpfuV7PVx3vn3ekjCWrmtpWdQlqw= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;31:IpWQWJigLeiDKOG8QmkYRA/TH45SgKyIJYl2wi5Z7J8VY0EOJEpX4rYMtQ+F3UseMI0D3Ctf0kvG4Xiq1BChmLHYcVOESNZXuR0qIDSir0tjJSaO+Pb36zETI2KZzuW1U8nbnrlfGvTelK3O+zOO2CruJEV7b8OOfXvdVWkhACpZ0+pNuaTJ2xIFLQzVAkQAQcFbbOGe4n5y3dza/OpkTy9yzAp+dxi2I7VQGLT4WTL3tfOyc0dQQ7uG6dHE6ChhRsYYQnQbbQMNlMwlaeYnGzl4ifdOjIVfYKRaST17djE=;4:tr3JoC3UbUfiirVBSwRMULCiCfGb3gEORJSoaEXRDisNUU22yzJJK8ljaTcg3q595FkQ9akiSQo4YrPYlCpH9pXCdMHf2ZINKugEzZ8vTHpUBQWV7DImjHQr5T6Wo0RcPdHf6Hc44vAn4+9e3jxCqR3JA5/q9L5lywOuhuyMty1E/HK2TnYxolqk5KIh+/17aUSeweDw63b3W+WZlkQiCMkcxRE8tSB2e/tVmsfnxJ3G8IsPcQ+11ghHhwKAgRebnnYl8ix57mTx29hhjZyWv0GEw79nM8SzPSUhloVHMB8mH+fGSjUwy/SRDVBAboONt8O0a/ZIuEjWH0PGlH9mK1PVQCbOjJA1O1Jiie0Ze/oYrnDMvyXegj95d8pAH51/hKhAEemA+P3sCm4q/Tnka3kT9WHSaBoqhyQvsgeBXrIXjo1OGyfL9c03NIJYVsBWs2i2G1ZS4AoiHm2/Fdt6WWTewqS/ph/KnwX+wOYmz538aEkj7aBSX3LStsvbqPkpC1VK2P/lzrcBLsDwUdGpsqskp0tKAx3zb5b28oSBcizJLDqoHtMQCUSAhCUQVntS7hKxsTftnKD/CgVdNZBGHg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095035)(601004)(2401047)(13015025)(8121501046)(13018025)(13024025)(5005006)(13017025)(13023025)(10201501046)(3002001)(6055026)(6096035);SRVR:DM2PR0301MB0750;BCL:0;PCL:0;RULEID:(400006);SRVR:DM2PR0301MB0750; X-Forefront-PRVS: 01283822F8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0750;23:ljFUMbGMXjvN3Nse1seDn3afsht6OSHBQS9/lqt?= =?us-ascii?Q?SVL7RmbwNwh2bKFEEkoOU16ucrTwk5APf1xB6NQicecl4kqP5DOPnzlTDJy5?= =?us-ascii?Q?K7o7bTKDt1ad0L0/U6MF3LpflAux/NjybW15B1AduMaI6wR3+gY+N0kb3uWS?= =?us-ascii?Q?Bw+nERBp78KW7xo9b5eZIkpoGioo5UQtdrdXBIPQxNgwhCq6EwcthlLMuQfm?= =?us-ascii?Q?tORu824hxCNNlIkxDlbptvPNNE/t6i4ThjKGYO/7sdKTidTZTqNKTMxAEHeq?= =?us-ascii?Q?yVsvTrrORRMwoEzyAcaq5/U045/eCykRh1GLQFMSFRVHtlJ79+c0KArFY0yo?= =?us-ascii?Q?NRZ3ksZt0FPGYC0PTb5idhAyHxYL75if2eeMymvEzIUSINBG5nxkf6eefxur?= =?us-ascii?Q?DI+s+qONdEZ81uiHa8tNhKo8TR9xRlHPXYCA/tYcAYADOjEiZdFFQrTaF+/G?= =?us-ascii?Q?9Ty8p7wN+Z+ipyw08v5ID/Hx7+OnSADMvxiFWNF744GLEztCnN/BeFuRZRqh?= =?us-ascii?Q?6/dzD3PP7MAXcKani3E0zNF6lzzEr2tHvQ3ONwt70VE/apn9lhyP5Pcik7VZ?= =?us-ascii?Q?szXApNbz0b5LYb5gxsh8EQo2UHG13BTN8ORdn9smu2xhL0G0zOMswFCZiQ/5?= =?us-ascii?Q?ViihL7zcX/L9omViAEKEDRbAoOP6WEeAxJRlqNSGkj+1wwL8bwWvzbtrTHjO?= =?us-ascii?Q?dBLiMe54rJ2Q7UMdlL5XkXnXE+V9VXmV3BBfVXhpD8SWz90AhbUKcd6ZVGfo?= =?us-ascii?Q?iAA/Wy30Pkm07U4wNKEmFN5gWKBNB26dHBKz8sDard5SkraFYXyZq9oRXYWq?= =?us-ascii?Q?hjb0vS8R99vfmbADHAe55PHk6caJkICCzvAQZVwkhvTBWfWl3ImIX9/IBPC7?= =?us-ascii?Q?QSosn9ltZzFmHNfjxqFoE76BVZsahhZslZQI7UcdXCd67H7RP5Y/A2dyYAxK?= =?us-ascii?Q?UZ4FOLIU2kD0lwVtn7A3sm34jpRJSNqC8FBXewa8xpxfQa1YXYh2rSmrT8l1?= =?us-ascii?Q?TRyRSg1QaRtLgiMaLVg3MXiptfI+RbCisxDaOfpGjICYqfEzrU/O6OicFluK?= =?us-ascii?Q?v16XF31wPDcZpnH+NfufM0pevUPS60qxNCXLttgbrgugCOywXYE1/nYHV4aS?= =?us-ascii?Q?6oi3iEIhVMwPse2KOjpvShL4p8L4kK1V6?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;6:3Lr1W5M2DKS92rof+2ouRVTycnYrnW1jbDTN+kGa2zvpjplknZI59G7fqLLVRt7lq1CI8fFwxgWucA4ZsLhRUtVacie4i9sVyamT0P9qglzFmyC1DA0Vu6rKq/vy29A5hR4IkEG/Mwt+U3+msKdO9jVQcxs3knBI739T0hMWBxQZaaOxLBQVAZFYzBBa/feH/v5hvQQFJxezXIDphpKuqVqocGAI0sS37TBLd0/A+Xhu8TMppk078fxjiWqOjotazX1ocdiy7VLbcW1/AyshGZDb618/vS22nVAoXnAko5noEVrsRmb9fqbIzgb7pIBK8qWM2aI/4H6JPx1sFhwmPw==;5:pr0CELviwnSgmILOABxzmCRwvjOrZb0/gOHhsjvXb+QsSgY2ZWTRduRolwhNrrkDnk9j2/GywrCvfJhJPN5OqX0zulGE3F/yaaOTdMHpWjqMt6wSdlwMHhfrQGH/0Mu/SF1kJazl34nCpzQYmEN6BWcuGsVCn/NeHaNMyvX9SxKV6KU7AG2uxDdv5YkSxhAd;24:SPpolbd2CnuJubGY1Tvi+iWnptFGz3Ux6GlvCAkPvsegFZ20x6V8oz1xDL+H+DskBDdjDJ4NKslltpO5KNoYf7lOjH7B1r3vKojqaXqmHe8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;7:h3v00a8o20Ktw6G8l5c/mG6bdW4gfLNNb7wvg8OFgLeaHWGVqMH+bPyNEMYhCJ9a6SZ5feAzu68vx6jlv62qc/hevmdzS7DVvqRYb4Kk1rdc5zkmpW5S+8A73q1WPkh8u6LaQe5uuZt5Ugmc8ooEeFsFbi6sURvuZg8x+6usrv4oU8tzkittfEF9Q6fTVxjdt6JSQ4tzXjE5T4qqGFQ3AbeQUbD6cgJK7UaBR7ZXfnMCU8YTwbx+pYcQxb6BoIctkc24YPYMp0zAdArh/8M2cKv6UaGVHPpNHsA1lpnBu/UyrvOItr9rD1WjLMLiYV1GgWbQNoPCsyK0NhAK0K508PSWtq8Yk+w1+yzTuiZQBqk= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2016 20:16:49.3590 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0750 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6499 Lines: 228 From: Roy Pledge Create header for global dpaa2 definitions. Add definitions for dequeue results. Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder Cc: Laurentiu Tudor Cc: Ioana Radulescu --- -v2 -no changes include/linux/fsl/dpaa2-global.h | 203 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 include/linux/fsl/dpaa2-global.h diff --git a/include/linux/fsl/dpaa2-global.h b/include/linux/fsl/dpaa2-global.h new file mode 100644 index 0000000..3ee3f29 --- /dev/null +++ b/include/linux/fsl/dpaa2-global.h @@ -0,0 +1,203 @@ +/* + * Copyright 2014-2016 Freescale Semiconductor Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Freescale Semiconductor nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * ALTERNATIVELY, this software may be distributed under the terms of the + * GNU General Public License ("GPL") as published by the Free Software + * Foundation, either version 2 of that License or (at your option) any + * later version. + * + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __FSL_DPAA2_GLOBAL_H +#define __FSL_DPAA2_GLOBAL_H + +#include +#include +#include + +struct dpaa2_dq { + union { + struct common { + u8 verb; + u8 reserved[63]; + } common; + struct dq { + u8 verb; + u8 stat; + __le16 seqnum; + __le16 oprid; + u8 reserved; + u8 tok; + __le32 fqid; + u32 reserved2; + __le32 fq_byte_cnt; + __le32 fq_frm_cnt; + __le64 fqd_ctx; + u8 fd[32]; + } dq; + struct scn { + u8 verb; + u8 stat; + u8 state; + u8 reserved; + __le32 rid_tok; + __le64 ctx; + } scn; + }; +}; + + +/* Parsing frame dequeue results */ +/* FQ empty */ +#define DPAA2_DQ_STAT_FQEMPTY 0x80 +/* FQ held active */ +#define DPAA2_DQ_STAT_HELDACTIVE 0x40 +/* FQ force eligible */ +#define DPAA2_DQ_STAT_FORCEELIGIBLE 0x20 +/* valid frame */ +#define DPAA2_DQ_STAT_VALIDFRAME 0x10 +/* FQ ODP enable */ +#define DPAA2_DQ_STAT_ODPVALID 0x04 +/* volatile dequeue */ +#define DPAA2_DQ_STAT_VOLATILE 0x02 +/* volatile dequeue command is expired */ +#define DPAA2_DQ_STAT_EXPIRED 0x01 + +#define DQ_FQID_MASK 0x00FFFFFF +#define DQ_FRAME_COUNT_MASK 0x00FFFFFF + +/** + * dpaa2_dq_flags() - Get the stat field of dequeue response + * @dq: the dequeue result. + */ +static inline u32 dpaa2_dq_flags(const struct dpaa2_dq *dq) +{ + return dq->dq.stat; +} + +/** + * dpaa2_dq_is_pull() - Check whether the dq response is from a pull + * command. + * @dq: the dequeue result + * + * Return 1 for volatile(pull) dequeue, 0 for static dequeue. + */ +static inline int dpaa2_dq_is_pull(const struct dpaa2_dq *dq) +{ + return (int)(dpaa2_dq_flags(dq) & DPAA2_DQ_STAT_VOLATILE); +} + +/** + * dpaa2_dq_is_pull_complete() - Check whether the pull command is completed. + * @dq: the dequeue result + * + * Return boolean. + */ +static inline int dpaa2_dq_is_pull_complete( + const struct dpaa2_dq *dq) +{ + return (int)(dpaa2_dq_flags(dq) & DPAA2_DQ_STAT_EXPIRED); +} + +/** + * dpaa2_dq_seqnum() - Get the seqnum field in dequeue response + * @dq: the dequeue result + * + * seqnum is valid only if VALIDFRAME flag is TRUE + * + * Return seqnum. + */ +static inline u16 dpaa2_dq_seqnum(const struct dpaa2_dq *dq) +{ + return le16_to_cpu(dq->dq.seqnum); +} + +/** + * dpaa2_dq_odpid() - Get the odpid field in dequeue response + * @dq: the dequeue result + * + * odpid is valid only if ODPVAILD flag is TRUE. + * + * Return odpid. + */ +static inline u16 dpaa2_dq_odpid(const struct dpaa2_dq *dq) +{ + return le16_to_cpu(dq->dq.oprid); +} + +/** + * dpaa2_dq_fqid() - Get the fqid in dequeue response + * @dq: the dequeue result + * + * Return fqid. + */ +static inline u32 dpaa2_dq_fqid(const struct dpaa2_dq *dq) +{ + return le32_to_cpu(dq->dq.fqid) & DQ_FQID_MASK; +} + +/** + * dpaa2_dq_byte_count() - Get the byte count in dequeue response + * @dq: the dequeue result + * + * Return the byte count remaining in the FQ. + */ +static inline u32 dpaa2_dq_byte_count(const struct dpaa2_dq *dq) +{ + return le32_to_cpu(dq->dq.fq_byte_cnt); +} + +/** + * dpaa2_dq_frame_count() - Get the frame count in dequeue response + * @dq: the dequeue result + * + * Return the frame count remaining in the FQ. + */ +static inline u32 dpaa2_dq_frame_count(const struct dpaa2_dq *dq) +{ + return le32_to_cpu(dq->dq.fq_frm_cnt) & DQ_FRAME_COUNT_MASK; +} + +/** + * dpaa2_dq_fd_ctx() - Get the frame queue context in dequeue response + * @dq: the dequeue result + * + * Return the frame queue context. + */ +static inline u64 dpaa2_dq_fqd_ctx(const struct dpaa2_dq *dq) +{ + return le64_to_cpu(dq->dq.fqd_ctx); +} + +/** + * dpaa2_dq_fd() - Get the frame descriptor in dequeue response + * @dq: the dequeue result + * + * Return the frame descriptor. + */ +static inline const struct dpaa2_fd *dpaa2_dq_fd(const struct dpaa2_dq *dq) +{ + return (const struct dpaa2_fd *)&dq->dq.fd[0]; +} + +#endif /* __FSL_DPAA2_GLOBAL_H */ -- 1.9.0