Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761580AbcLAWtu (ORCPT ); Thu, 1 Dec 2016 17:49:50 -0500 Received: from mail-cys01nam02on0079.outbound.protection.outlook.com ([104.47.37.79]:28253 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750898AbcLAWt3 (ORCPT ); Thu, 1 Dec 2016 17:49:29 -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:940;Count:10 From: Stuart Yoder To: CC: , , , , , , , , , Roy Pledge , Stuart Yoder Subject: [PATCH v3 5/9] bus: fsl-mc: dpio: add global dpaa2 definitions Date: Thu, 1 Dec 2016 16:41:30 -0600 Message-ID: <1480632094-3621-6-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1480632094-3621-1-git-send-email-stuart.yoder@nxp.com> References: <1480632094-3621-1-git-send-email-stuart.yoder@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131251061357749936;(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)(1110001)(1109001)(336004)(339900001)(189002)(199003)(4326007)(626004)(189998001)(7416002)(97736004)(68736007)(85426001)(2950100002)(106466001)(39410400001)(36756003)(39400400001)(5003940100001)(104016004)(110136003)(50466002)(39450400002)(39380400001)(5660300001)(38730400001)(6916009)(6666003)(92566002)(50226002)(8676002)(2906002)(81166006)(48376002)(86362001)(356003)(81156014)(50986999)(105606002)(7846002)(33646002)(8936002)(77096006)(47776003)(305945005)(76176999)(8666005)(2351001)(7059030)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR0301MB0742;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD005;1:HXnPQcYuAD4ZsT7yZAbI+tFPGmBfk8PERf5VauJf04dDaVTyOHemPqlyeeV340KESvc036m6jTXEVmQTRynBVMNgauFy9HLK4dKYSsIUVBk52SazWswoY68iDSkryU3ExA8SNNbrBDdgefLAxm6o7wpFoTefxcIUyWRvVEDbJTRvL2atUirb4GgMnSmORUL7x8uMIqqvYrlru6ULNkEr5GFwtIo0/FRdGE/+eEjL8uX+JC5vNzXltqV+XI2fMG1aih4B6GMIz+6duLwxWPHcI3iaJoukthfVdjCl9YwMBgaYFLDxVo9M2TIvNxqAxn8jD2LH0RKDj7xp41A6evp963aaYIqtPoxXWAOjyrDkTPuL1QkERgJqzUtlRYKWT/vyeA5RWU60siZIAc0xZ84a12C4QVswndrsodr3xLcZ1OWI+xFJYGOpliAfMoD6ydrXdTYO6qlJyQGoHnNq3e9SGB2PDXvcToxOSw2c9NGr7Vwyx8G6bdTdB2XsHrkiBEVlc3gTzuSBZzAIgbmK1ZVwg7jdukJDv6HuF3QSeGIqQrs4xxyGdlfGtLl42tyrW7o1htiyvCMYkYKgRQKghh30sg1UoQKiT0sRNeUxsX4tTbGlrLa/kvwIf51ft3fp/E+eTuOZ/4Lw0pXZVY8fPGndqxGM0XZo9ugyHMn2oJmA4S0mE5SMbP/EYcVqb+Fh2dWOyBtqh7LHbxN6uy+KoohbmTnylfmm0/UGT0OHgXQUmNo= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 8f3ff36f-a758-45a7-1bb0-08d41a3c3b03 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BY2PR0301MB0742; X-Microsoft-Exchange-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r+5j9KKMUBu0bXbq18EUvuffIAamCnTyezK+QnsK18Cxga0TeZBtjCLy6XR9mo068ihkhP0MIlRENbqHwELKtBy0wkgif9DE3l+DM1aBhHlCjIM+dkA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095060)(601004)(2401047)(13017025)(13024025)(5005006)(13023025)(13015025)(13018025)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123556025)(20161123559025)(20161123563025)(20161123565025)(20161123561025);SRVR:BY2PR0301MB0742;BCL:0;PCL:0;RULEID:(400006);SRVR:BY2PR0301MB0742; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB0742;4:V0q+gpOQPfItPPzKLXZO+mSV7Iyzdjcq9r2dgZbliULcUBVDzTuhX9xnmkzbn0imeyVI/xkbpzFv7OhF59j7KvMoZN1u0XHoejUz6IvtMvfxxok0pB5ezNoMNO0eyvepg1FZKOD5ga5ryCshKM/ZT9fuE89sTHZJiIom851VsOZPM+ZuPKSeTWkmmmInfQGCyq+oOv2pX6OGQ+GwfkhtYkTLG8ibzWsmh4ftd6wixAPDqo2O831+CNQTvYy26UcilnwxI62tcL86M078/m+2mMXVAa5ORk54z1BgGiUY/cSbdc4i1BE3itwtgi9DSETwmn1mPU7II2ngxpqtH9gXZesudTmskY54qkKPOxdTePdxV2OBUymMUqMShAUhClF/TadXPUzWjYUBfZhx90l8NBOKlBJylXNs3n7DSgSc3Akg1BMUGO8QDO31N8lFkqNXYw7oKplB1TAmq8dEf0hWHOxmIUn5Lk6TVYjkliLXYiW0mmTyKC0NeiagCB3QbjMYQw4iZjhPEVsCpHZaOkix+hYO4AUTIEqElzmuY2O4WVw7Oyq4QQ9mZngy7RM0e4Ij6/cRS69gEd1SI+3Fvl859hraI+fMwFbSGG0zP3qv8O+79oEAyKj94H6wLWpmBcHnNdLZPbQGPgaUAbJxSpAupbfiuJpkhO8/nzJu/dji6/woo9fIOqPAHb9xphekWXJETUaRMljsfICaLHtx+Ctxm7wT/Q7pJMfHbcHk4h/TaAgQFMKy5UbEjAO0C2OvZE1h X-Forefront-PRVS: 014304E855 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR0301MB0742;23:Ckzze7qaeDPkq5BsD7joJ8uMaB5Mx9aNGw/m6JK?= =?us-ascii?Q?Tw93MNZ5oBhBY6ZePfoRUauX5UDZHZZP4GmiJjU/+F5JU638TvDy+vNqhiMU?= =?us-ascii?Q?OEawhd3rc1yW0ehe1JvJFY9QF+0AKrma5i//IeLmd6LDe/y7d2FAkvQpcWRt?= =?us-ascii?Q?smTZnEn+/6b+rkioWZAJs4lamjCT7yB2TYhaR+jaUobBAmTwkccjyTN0gBRK?= =?us-ascii?Q?iElwT0p32Srsb48cSLA5uRhC+7OxoouDO7f0s4cGWukLF29aw8HxpcyaU1cE?= =?us-ascii?Q?1dAck56HNT7vpALVkRDGzxtXDzyZOZgZ8w0pNzQpsMzCkOF290TBizJAeeLb?= =?us-ascii?Q?N2y22ebMGq/E1MpZpXP4BAZOpr0hM8ko8eZhdzBP/j/fDRQQBhE5BJRJNa5U?= =?us-ascii?Q?tZlicFENlcTIj8iHBUNrbccXOpyIbFhevIiZeKTfgGFEE8Q2tORmn304IXlc?= =?us-ascii?Q?dR0dBGooR72VYZVgpaZjQawk3S0CK+86MWw4/i7IHZRi6rKGzHhxuTSczWmN?= =?us-ascii?Q?EiDZ8yuaQ9rSGPHe6UD8BCtFEGvA/tDNwDrVGpCzKJhQPdeN73sQNUvbvA6Z?= =?us-ascii?Q?MjD3aSj/2TFHp9jA2xm1J9elFVTmm5ON3yXULdYI7FGNA/4PjiP71cd68IzJ?= =?us-ascii?Q?G10SbwGmwi9Rv1Lhr5YRqKecTjwZfF4HHXXgYHmrdfcG4pfuKg9Im6fn6lIA?= =?us-ascii?Q?rTE1DjQsJSh3dKN+X+GXgPgTdl95UtePur+vij6E4IWDcoJFKTzT+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FJ/pP6vq/STceSpUHcvcrGTT0GWWg7VPgjOgdZHnQSOuLA6SsLEiuz2TJJXRC73yQH;5:TM5AX1mMEawLsMNuMcAtQRn7TQMNuO6CmI0o1MOwDPzfYTlQBlBLcSWir4KGj0aUAbiIhC2YjfY7/QoJPGe1sj6x+GqFqfb+EZrp/g0pXuCHc/pXflnZFwyBDNtxesg2TLixxY6KtEMQwAip8PfUFf6Mxw8sE5nLP6eAAyQ9ESbKVdTI2Kv1waRnqEFsrjun;24:EuG/loEImcmCgvrrC5PD9TvVttUiO5hWiGQzNwaVYh0EbZQ6BgBbyOq4D62cCyJyzgvqz4VCRak9jwKyB1UJ+f5G8eUypi+N3wbf2z/c1Hc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB0742;7:LhDlmiufCKLKAhH+FLCs1aevPUUsq8GpT5oTeLbSEKmd0N3LiP2Fp429bU6EvI00S/NgzdqP9KF/BIseAFSG8tQ4DvMU/5DODmMAErd6YXc++T4bUkGVab6FRWUVN8wofAHyxyW+tI0Us7gPUibSSAv7zLNV+lPvLj6fSM2jiu3VMQMNYH54BE8RZFzdDWTsEjsuzx7lrYIAxRqujF3aQ6Rru8sikwo/1RfhpIULYfezc8AeJxzVRlBYFQzipYPUxB4Rww676WJR97IHXk+10mFlLyrVD1G4ahZxv+9JwvGptv40R0dxZ5zyaaGoLYrGhGMEPVPwRjC/wwHIwlmsWe3FDcAPnWmI2iXs6nN7o420T9HM9FXKDqYzPgSpkaNFOMZbmF3mFhYTn6tabXQ2ObDOa2yUzu2Lz2DuULj+P6tHqEG7RfLaO42lTxrEAjAOLjQGRlthMpsujWo9QNHUww== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2016 22:48:55.4473 (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: BY2PR0301MB0742 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6384 Lines: 223 From: Roy Pledge Create header for global dpaa2 definitions. Add definitions for dequeue results. Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder --- 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