Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754599AbdCMTDO (ORCPT ); Mon, 13 Mar 2017 15:03:14 -0400 Received: from mail-bn3nam01on0072.outbound.protection.outlook.com ([104.47.33.72]:1920 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754353AbdCMTCV (ORCPT ); Mon, 13 Mar 2017 15:02:21 -0400 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: [RESEND PATCH v6 4/8] bus: fsl-mc: dpio: add global dpaa2 definitions Date: Mon, 13 Mar 2017 15:02:00 -0400 Message-ID: <20170313190204.28190-5-roy.pledge@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170313190204.28190-1-roy.pledge@nxp.com> References: <20170313190204.28190-1-roy.pledge@nxp.com> Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131339053388784115;(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)(39450400003)(39860400002)(39840400002)(39380400002)(39850400002)(39400400002)(39410400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(86362001)(48376002)(8936002)(50466002)(4326008)(50226002)(189998001)(105606002)(106466001)(39060400002)(81166006)(8676002)(2201001)(38730400002)(3450700001)(53936002)(7416002)(36756003)(2906002)(1076002)(305945005)(85426001)(5003940100001)(356003)(77096006)(47776003)(54906002)(8656002)(33646002)(104016004)(43066003)(5660300001)(6666003)(76176999)(2950100002)(50986999)(2004002)(217873001)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1PR03MB187;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD043;1:DOhkWNQZwlbYLFeGnMD1RSAMwIg7cGl9gCfSn/f48UEvFIN0uhh9sL7rgdxhhQaW4sSTebMh0J+RGYPvWmAZehj6QX31gvjAY8kCcXulc7Q9IgbF9oX5e7ut8sXqx++XngUDSzXYLJSQrYnNJx1VdzgutP9WFLCiDYV3A53PWWHF4lFoah3wtlmH57KhnLsqCrBAURkT45h/in3PxAhGETMHMn8Tf7O945jfyxDsVg2ouoJYXf+pDErrhhL+zwMSina6DTkpbPYwflWK8mGPcUhzFpTu8z+PCGr3aGVC20MgN4jbn7QQZFewcR+9VRoRSYIjjD40AP890+qLXpG4WVZ0dtFLpKgbZ80f8bMjcIqQdX/WViTve+Ug0FjoZ+OIKlweU2/t2D58r4AIWSE5UpUblBXC6ORrnGievJtXQqIQ483bNQzpt/IMCwSHwo61tvJl0o5QtI+CvzuSta2xwIsjj7OBaH1jkuom0D4fkkdaBqPEyykrdFcKXkcOr4twSmNUBQA+PMQdcNzYUMYuviWFH6AoTPyQG5ICe1rWB4qpdLfPgvolUsNgqKnMn7B6XT78TgbMvIY0yOIWnpr5z7bTAKAih0Yu8mmwZEqrpDr9Ck4RCOfL1aFsOFXICAOBogOAcRIdTAyVTPOxOhDdxmZ9CjY1YQXYupbvh1v++qiE+ng73uuBnXHD6U0H3Ef5b3PwO36YVf1InwxX3411Rw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 95876b6f-728a-476f-8093-08d46a4378d4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN1PR03MB187; X-Microsoft-Exchange-Diagnostics: 1;BN1PR03MB187;3:fSmKY0okDdRlInMP5+WZRX0Rv/wRkmz03pJMDa3ARpxs/rtH6itxQBtpWey2F0wPrbtqDOTBsF2POWBxpoIJa7pLJ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TT4dY2kvo3AccWLkIDZPOV0TccDO20= 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)(13015025)(5005006)(13017025)(8121501046)(13018025)(13024025)(13023025)(10201501046)(3002001)(6055026)(6096035)(20161123563025)(20161123561025)(20161123565025)(20161123556025)(20161123559025);SRVR:BN1PR03MB187;BCL:0;PCL:0;RULEID:(400006);SRVR:BN1PR03MB187; X-Microsoft-Exchange-Diagnostics: 1;BN1PR03MB187;4:JtdR95/ia6AbQjx+S83lAR3nLm0jczZ7MBYO7OvaxepE2dQnhVIX6jgEV+fP4ZrQWIcGlJoiymWjaM//gLJW6NZ3EDotlRehrXme3JJpIeuWI5Ka2vNM6BtTBLY7l8ypVPxJdxitl3K+utZ2LMQZciyNjF9MDrWUmkhJgnyrTVwag/bCzW/UmHsn7p4btYqbSwirVBLmQAPKPgqM4011Cl05eG2aR8IJT1oUrZt7wgkCwriEbuiJH7r1NzmJPl58f+bkUx0SArXUEkZpBiWjHCWg7ZRDr7WEq7PFxgq/pqK+v5JNfvWeHz4zFFGki4h0xETryYUI91EMqkgtailmOXyFxmF7VmkZUvVl9n5sDbaaQeNYKhX4EYp1e5VmUJp0L/nz1+dff9VfxodkY1QtQRoALeIrdXlW2SSdDlRvm/SFf5N2Z8bpqm5EHdDvFa8SVCsxyu+qZJXaEYXhGRdYUzZ3COft1TgafRxksMd+B6FIiDs6Ta6K68d2zauZDFvx9XGw73dk1mMhgAnPqtyf8VkEQhGI7+7Do/xMsGQokjtVdyT7dQYETDAZVGWMbLCttctny15Zjq+BvkdgCWnO1k4NwYIZibNj7dW6JvEDgA1+U+0jyVEMp4Q3O5iqIYu0ystZeqRNAOjn+i53wJkMBISiG/LlqO42ciMVdPlebGyvfo1FN1AeLf1+5JozhMTPStkOCH2tBi0Lg1Sj6cbcktDWuJdnX5SKJUO73b8LwBpwIaZxUjqf2WQEs08P/ZKE X-Forefront-PRVS: 0245702D7B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1PR03MB187;23:Q0CC44clpe8TpTGhn7bspuNBW/az6zpa39a2GdvTCL?= =?us-ascii?Q?H09U5H4K1/Peg9dcG52tnWAkFLqjytGbN7qbPLeAR4PLMa84nGW5Qi3DCJsA?= =?us-ascii?Q?EULxxOyUH3vQFbTXgF4l9yIx/fBrq9Ds34Tk/1Wd2ahrDnI9Yx5aAcUq6Wo0?= =?us-ascii?Q?NMn0gkqZvsdH03yswmLijudvR2Erjl3tdi7YHTztdd4ph0qmQzBaHAFLGXAX?= =?us-ascii?Q?/8O+NFhBhZKNl1jEGT9hJ4yZT7HFZeVDEEM1At2KhhT119ztrjFQIQ8Vy/yn?= =?us-ascii?Q?G0YjUGJiGUaYatP+AsutNrnTVDgcjBLtH9Lm7uwr8l0gnI55Px+xPQRr3ThY?= =?us-ascii?Q?Mv1E6LnE6KSDTLcj+pqJ28bRyHvvAiWVjmiNH3zV6isb89shaoYJxuyI6uhk?= =?us-ascii?Q?DXeaLsIFSgxri9BYbSVSkdtqR6K4aoVwfnoqCrEPNyZQadNgSWZUVGyRfmkt?= =?us-ascii?Q?x9qpxw+dyYoBTFFgiRVlptJznwNcH8cZGDlnyZgitRQYySKN756308yo1j/u?= =?us-ascii?Q?Ctxg+wMXF/B2Sw3oYie1ABJIh8SvPE7tZTgbbiIdwf3906ojDcCqoQF1wQt1?= =?us-ascii?Q?6E6Vzjz182L7l6rCXvukPWpVUnOtcn48864fGLvqE51R6s05cMtoEPIIlinA?= =?us-ascii?Q?sLLPhZ26BQX1SChv95ufSYvw8cXcx0EI/pWF59tv0U2jfm606hN5nURsA+/1?= =?us-ascii?Q?MjSmIQe3B4jeavRXktHJf/A3HlzuFBPuMIdCGEiu/kZsRrftOnME4F0Acstt?= =?us-ascii?Q?DMDU2YqHmm50ivRpxo1ZeX+tFDoLuVOxVzcnTL8eJQNu0VA+h3y3aHMJ9L6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jrAH1LEF14Yn2AkzXp7lCj52xHJyYIUgePY3g=;5:sTM54cST99xqG7/CfF346pHT+ZQOVvkasdRzPo74HwlIuh7s4MJIGZQNdw9eqov83h0xAivE4F1xgglWlAy9iH3AyeZST05PEig46t2+13A8EF2QNsb1i4O9H9CrNxh+9HUdVDT727+Dt3D+i671IDLkOoIpjdkguu0YozYzeefjoPudv394o+mVSju9rbjG;24:xmfP0Wlz6Eyok7IfJQekcvJ/lrT/Cc1OpgF8S/gh51qse1ZVmlca8E+6v6b1e2SNaPMJTiDsiFY0SVQNy/BNYK69XqpqIDSv3BAg4qmBqlM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN1PR03MB187;7:0h20Sbjcl3Ar20O/7/Jhka03Kr97PxTHWKpH5SfVr4bhvoVKwguyAwSK5wWF186DwyoPlBHjtMm0U52JuFND67nlMQL0pHJCgmFYZB5GbV9WcPwS+fvKpx0e8vKCJkPKY4D/2uxJPzAzT/ohh3AYdKIx1wF81+QIbpwZhH1WAtoaARE2W4P1H1xxZOjxCcLcQHL1edseGJhdl/q1RAtVkQ55VETActrzEp7Hs8Fw92Qd9YzabTd4EDfsKOVbj12GYbeixP2WgQrQt/vp9/0lGoHuxEe6+3843BilodaiNhpKXI359iYJI7skGISe9DLWuC3/o6VGWwwlYDDNF/ANuA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2017 19:02:18.6288 (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: BN1PR03MB187 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6666 Lines: 230 From: Roy Pledge Create header for global dpaa2 definitions. Add definitions for dequeue results. Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder --- Notes: -v4 -adjust file location to be in drivers/staging -whitespace/alignment cleanup, make dpaa2_dq_is_pull_complete() return bool, fix spelling typo -updated copyright 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 */ -- 2.9.3