Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754388AbdCHV4H (ORCPT ); Wed, 8 Mar 2017 16:56:07 -0500 Received: from mail-by2nam03on0053.outbound.protection.outlook.com ([104.47.42.53]:46646 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754200AbdCHV4D (ORCPT ); Wed, 8 Mar 2017 16:56:03 -0500 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Roy Pledge To: CC: , , , , , , , , , , , Roy Pledge , Stuart Yoder Subject: [v6 4/8] bus: fsl-mc: dpio: add global dpaa2 definitions Date: Wed, 8 Mar 2017 16:54:46 -0500 Message-ID: <1489010090-18025-5-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1489010090-18025-1-git-send-email-roy.pledge@nxp.com> References: <1489010090-18025-1-git-send-email-roy.pledge@nxp.com> Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131334837114358835;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.158.2;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39860400002)(39400400002)(39410400002)(39850400002)(39840400002)(39450400003)(39380400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(4720700003)(104016004)(2906002)(8656002)(54906002)(3450700001)(81166006)(36756003)(50226002)(77096006)(85426001)(8676002)(189998001)(97736004)(8936002)(86362001)(5003940100001)(105606002)(53936002)(106466001)(38730400002)(110136004)(2351001)(4326008)(43066003)(39060400002)(76176999)(50986999)(47776003)(7416002)(305945005)(33646002)(2950100002)(50466002)(356003)(5660300001)(6916009)(6666003)(48376002)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR03MB2949;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD020;1:I4HMV9fTB4/nSuOCzg4XEjaAFhuX8vovyP1xHxmkS3F7jl0iRQ/gbaSDdM/TGbJeRTjwcLwqI5z7/Z0nrVbhThmAGr2H+I+gDPQ8/NbYpokoPME3f0qkx0r/zB0stls+18UrXNXzamJlvW83DgWVt2qAqE3goUnoeMo3K/7+r8/cWNEm74+LzIEz/YmY+hnVqhwd2SwzAAXlSbTnohB7WE/KPgsRjFH1N+IqylV/BWHgfZdyRSzrKrfa4KB+aOSggVfLiHP/a2lLOcLJyybvLBRhCIG75tGdVYTMSK4Z/2nyWwl5DTl5GvLYTBUvnavfETU6iR4bceGJ8HFCV+Sdth5Fwd6j3W+eXlYd1P8BsMsp0Fjy84PjCODQ2mmJ90jxg0MxkWgIbPHsQON79wG1AUJQUn4vUmbWdfmQyYdFTsgix1xMfHPnfRJZdoDWcC0ArnUF1DJd6EBGAxCRfeqSTKygiwa/VgFV37cSIJWYkN7mqRUfkiUIqHI0dQu0taLJK/wUCQHUVd5sn8I6RBsogt1PFu19DXGaUxyZ9IH+Jh2NhriP5G6ZJPdRI/av59Zmm8jq3nRMd/CuPN6LItFerWr/UrXFzMBdglPesp+LJGFKclnlj/2AoetilTRuo5/kfMzwF8qFCY4NVAWZ5aDvJJ35IiesTK2Id6qCprpfGhEkMcaVonzW0TnU5DHBMBwMFq1b5hYD2k6fDAeWhCkx7A== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: e0ad9fc2-7922-487d-6ad2-08d4666dcb4a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY4PR03MB2949; X-Microsoft-Exchange-Diagnostics: 1;CY4PR03MB2949;3:fnYDa51mvDyRRQlY/ywBVRmBktqFsaBIu29kps1kaFPeHZmTx9eWT4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NGNy6hghwtlKELL84+GUGm0n3BF+9dAAVpA2jAQ== 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)(13023025)(13018025)(13024025)(5005006)(13015025)(13017025)(8121501046)(10201501046)(3002001)(6055026)(6096035)(20161123561025)(20161123559025)(20161123563025)(20161123556025)(20161123565025);SRVR:CY4PR03MB2949;BCL:0;PCL:0;RULEID:(400006);SRVR:CY4PR03MB2949; X-Microsoft-Exchange-Diagnostics: 1;CY4PR03MB2949;4:h0biPSJFIs2PY49ujFLNb0sntPU2R69mP2zxMTkh/Md2mq0VJjy4M2qiyJi+CovvsjyFwbJGCp6xJMej9QQWt7+xfbhcxnEMWP2mrKzSrwdQgYItrvCKOymaVASm9yKuierG7oCkQcPZDFS/6gVXbJMPqPOQ52vnu16LIsDIhDljPYJ+jrH/1+6l81gAlkJ4rgFGrYiJx3l2WzrHTZF53IKJApHK07NGjRuLCqS0FkPt9Ep9PzP9upiLITWfhVBPjJyO9qlvJL2GGtmKibjI8domkHY3rJwqpjBi+jmaizNRofgcYGYMtuzqWeqeMG7fPYrridbIpkgJgKoOFQhmyR54le3YxeDW7sL+C6vlmn9Pv0rLRVpPjG5ACynK+Y+BzlyzHE6z8YU98fGTjo4364M9UnYIYadPbXoU69f9QZPy1Ddp38I2AgAABB6hL00okEa4n67veiDg8gY6wWHlGdhS2hVmln1/PqcblnIIJw8574byjOZKI6ocClRjLKHZtcaL7qZnOCqrgarj22YpwjYg9xrS2CH4KrwWWXwoEgAdqg+Vp969wjnAuDVO/IEkdguOFm7mFmI8k7V3cNnCafiLHR8Rn6ORx1a++3xaPRDDfqI9wBYsSRw+Bd5jSCpUOG8oFcxSBvMFzCghlOoFNfkcxm3MReSIir8VNClkNrs0pxVxGYRV8tngauGOluNofmarSd0JYCzsXkskp4DaG/aAEm8wGeBwuR4E//EIC6xKDbw5iIo1lGlmxXipMHXW X-Forefront-PRVS: 02408926C4 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR03MB2949;23:dnC32d5sJTu6uL23BpB8dBnS2jqcBa/c3uGw0b8vk?= =?us-ascii?Q?M+chbc5adQd83y3R64I9lw5Q9gg4G89uGgIffY50BfCESC9h23dvFPPz/5pH?= =?us-ascii?Q?VmqR2MojX36B8dHx1aCXrQl7MybGwYLFGmcPgPACIb8Ed2CCX4rcsmcLsq1m?= =?us-ascii?Q?VNoe/p+ysl8hEoLqf83As/Egz2lt6oqOP8eFZJbFt6Oe8n0oXgjrDLfp92UL?= =?us-ascii?Q?yEklahQbNQAJdqDpZyko2CYG34PkwDGGASaClvcNgIHKrAM1MCZz3SxbXQ4Y?= =?us-ascii?Q?j2E7Q9kvrr0yDpT/4Sf6nzaOsgpVdq0vFDgwgBbuDinWfAuoLa4EuwL0MOve?= =?us-ascii?Q?ExO06dKBQU8WU3uNkAShZcnS6oQEr5VYrjofJabthqtIVsFenqzu0lFbRKOQ?= =?us-ascii?Q?GTm9gNdnTRlGHnE1w2gF1P++9wDbh48N1ufDNyil+BGTLTtzJ9bGHYZkmvxB?= =?us-ascii?Q?cWQy0zZ+rUwBg26OIHkPenJrluQnWc7c2NZf/okWG5tlsSEQxDUhFJSaVT3V?= =?us-ascii?Q?C2h8R1u01CT45HL0RPMFz8NgPpOeIS9AFaw7alK6Lw9id5TN25AqXxqYyr0O?= =?us-ascii?Q?Pb+1rEUCsWX6L+Y5cvuy8pxelyVpPyNMXSfJw2SioSCxSXNJnJBt+QR6egto?= =?us-ascii?Q?V4ooKdjiXd9tWHG8fwqR4Ldyz0hDaq+V8i+fQRY1D1xRcrR98IUZ3gJFRx5Q?= =?us-ascii?Q?SOx6iFjR95d4nKpziPYjYpytAKRA5xF/zH4evca+CE9rDcnEeQZBLWd7t3Ud?= =?us-ascii?Q?4W6VFDlGSbHMnFkXDanBUo4MGMKRLNfOj9753iHtu7+Mq4wm61VOrSeWbB7y?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+7CgkmRr29rQ8W5LvdYibyC1UyOieUlgHTm0M/X01rWchKch+/cuoSq937FgH0wiAMYturZrFrkAWTDimLO7RhLf0L+E=;5:c2nwq6FcHt/1jeDBBufSkYPVuChiK8P6MboAND1QxF7dAmZaCSA3yZRYm95wG+QOLdVyTm7R6eJrhbySHeU37vwcKjC6Nnj/Rt7cfaKJmv7EFllFHmSgeX8e6JqKGgCj/u5A+NUexw+f1dM2Dxp6IydwneHBPS1df5CaqGDQy2iq8ZEJ4xUOHyBtRH7F9e98;24:wJTkax/w07ROylDbyqI2WrSv9U5/7lKRXVTlM8T8xOSTGx3eFzxSWLElKVdeVfoav0WHggsg7/LZa/HZmJFmSkQNze+6Ix2U1912qA896Ws= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR03MB2949;7:Zg7Kq3sEBgWI4GCxu1LTBZTAwOyMUqKprvwoDVYGc0msO0/6UemLNPYAXqQnkUZ33EWSzaqRtjXgawubpuAatbSjf6S53ThTjTvwz9JXhqEOuMkgmgObEkjxAA+kw05jFVQ0ufRWceM7SFpXF+jCHqD+RNx/EPWfU1u/U9pp0A7Joo3cyHEVevXTjQlFs/mxgLNnjVYkS55x54o3qc4rGcOXJysDSz6MoWoy+mV32njkA394d/HnkzB5BmWDzP0oECNUShC1SZT4lYl3cyelSOK476ffJxPTYN5IpYHfIHtHoYLDYf4EN07s7oS92XExf6808wKsjud0KEhpLYoYhw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2017 21:55:06.2254 (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.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2949 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6441 Lines: 222 From: Roy Pledge Create header for global dpaa2 definitions. Add definitions for dequeue results. Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder --- drivers/staging/fsl-mc/include/dpaa2-global.h | 202 +++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 drivers/staging/fsl-mc/include/dpaa2-global.h diff --git a/drivers/staging/fsl-mc/include/dpaa2-global.h b/drivers/staging/fsl-mc/include/dpaa2-global.h new file mode 100644 index 0000000..0326447 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpaa2-global.h @@ -0,0 +1,202 @@ +/* + * Copyright 2014-2016 Freescale Semiconductor Inc. + * Copyright 2016 NXP + * + * 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 "dpaa2-fd.h" + +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 bool dpaa2_dq_is_pull_complete(const struct dpaa2_dq *dq) +{ + return !!(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 ODPVALID 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.7.9.5