From patchwork Thu Aug 10 17:42:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Horia Geanta X-Patchwork-Id: 9894437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C071F60384 for ; Thu, 10 Aug 2017 17:48:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B029D2832D for ; Thu, 10 Aug 2017 17:48:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4CAF28500; Thu, 10 Aug 2017 17:48:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E7F552832D for ; Thu, 10 Aug 2017 17:48:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EGHDJng9uu9ALuLcXPa3MLuuhWY80//39PlWgtYFRqk=; b=mJEZ+O1kOQp+kM qDREIlW6MuE/j1z2ez8UpT7M/XZCpd7MklICA9VlsEDu9++byD/VyhP8tW9+C0XFDU5cVNmWCdWio 8u8udadKCxr1xpnrXPjXD8L7wa2Z4clXQXy0lbuLvgEP2X/IoG2CPXkQxdMCpTXOXb36fUQzT2PG+ 2FhrZeGtDpMgmUuEzj7I+T6gOmtu8AJQBs/3Jl8BVYYWcArPYhqlt9yD0RCt/CX+cEt61K8+lIZPc JZnU5OcwQlQGBS14X7eqO13vR45OsQ94pa0QO2cxiP+fmVT6iOLfIUImcPdVQwVOJvoEKMKA5588M FD9JHzvxbCrrgorFE+hg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dfrZl-0006qu-1z; Thu, 10 Aug 2017 17:48:53 +0000 Received: from mail-by2nam01on0064.outbound.protection.outlook.com ([104.47.34.64] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dfrV2-0002yS-GQ for linux-arm-kernel@lists.infradead.org; Thu, 10 Aug 2017 17:44:04 +0000 Received: from BN3PR03CA0071.namprd03.prod.outlook.com (2a01:111:e400:7a4d::31) by MWHSPR01MB180.namprd03.prod.outlook.com (2603:10b6:301:7b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1320.16; Thu, 10 Aug 2017 17:43:38 +0000 Received: from BY2FFO11FD045.protection.gbl (2a01:111:f400:7c0c::157) by BN3PR03CA0071.outlook.office365.com (2a01:111:e400:7a4d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.17 via Frontend Transport; Thu, 10 Aug 2017 17:43:38 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; driverdev.osuosl.org; dkim=none (message not signed) header.d=none;driverdev.osuosl.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD045.mail.protection.outlook.com (10.1.15.177) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1304.16 via Frontend Transport; Thu, 10 Aug 2017 17:43:37 +0000 Received: from enigma.ea.freescale.net (enigma.ea.freescale.net [10.171.77.120]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v7AHhN1t012849; Thu, 10 Aug 2017 10:43:34 -0700 From: =?UTF-8?q?Horia=20Geant=C4=83?= To: Herbert Xu , Greg Kroah-Hartman , Stuart Yoder , Laurentiu Tudor , Ioana Radulescu , Catalin Marinas , Will Deacon Subject: [RFC PATCH 03/10] staging: fsl-mc: dpio: add order preservation support Date: Thu, 10 Aug 2017 20:42:46 +0300 Message-ID: <20170810174253.20951-4-horia.geanta@nxp.com> X-Mailer: git-send-email 2.12.0.264.gd6db3f216544 In-Reply-To: <20170810174253.20951-1-horia.geanta@nxp.com> References: <20170810174253.20951-1-horia.geanta@nxp.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131468606182718141; (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)(336005)(39410400002)(39850400002)(39400400002)(39840400002)(39860400002)(39450400003)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(33646002)(104016004)(356003)(305945005)(85426001)(54906002)(1076002)(36756003)(2906002)(7416002)(4326008)(5660300001)(626005)(23676002)(76176999)(39060400002)(5820100001)(38730400002)(8676002)(81156014)(81166006)(498600001)(50986999)(8936002)(97736004)(2870700001)(106466001)(50226002)(50466002)(53936002)(77096006)(8656003)(86362001)(6666003)(68736007)(2950100002)(47776003)(105606002)(189998001)(2004002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHSPR01MB180; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD045; 1:YMNBnb9Kyl7MYQ4/32vXnPQ9E6tgv5SLr1bKSHXpQA6LPvNwS/FgFmhJ/QQ1tSZp0d2MhWNBTJ5GCPnsZukdUdRdErk4AtGw1Oxede6LpnHfCMtOjRPrfHHjfyNipo+5CO1n3O0VnIvNxslHcJYa3GP2TPfyNRaHhvdHN2DiAdXwQIDox9x2EXDRlB7euFkfn+flNqC2SpDFeKiHoO1rn2xG8UrKaEVbqOnmtZ88lVforlwPOyqVnBnn4xFPCuxXHlfxpqNLX2mH2Z4iFQ7wXXuuyk3PxsXTqxy+D++2ucQ8QYr2+RnNB4VFpuHK3fHy2Hqw2mysre7Fno9Con+iO0sWUQCQuVxhVifqLJ/hWLyPia5CnwiP9XFnrIdCg+JrwpG/JwaaYhc+4/Md2gqRYEqTX4ilo5O4neSA4vACBHpT1iFJp+BnFtXX7ZFHsmmP+okQlVna8cGB2TOPgzdWJXdCUvkYNOSvyD8Q+024XJpaeKGm4v4+DZkcuGYdytv6ANl3shx3jediN8CJ83T3qb8UdUgkKVE6gKDIpr9S1DTM/C8RiJZt5vliWFWXLuKns26Mixq46N/WFDmAC3PUGpBNAJIZzD5/cDVAaUxruWRAcT1PqqveWJOE3daDRQLkoY/AqGy1Bd3AlfRggl2bliClxTDziv4QEdhWwzVfAOYOwLj5VMtPqLqmHeGyutjcCHomfJonQA17hsRLqSliE6o1z0eSc0WWiWKojZL7Pf1W6fPNAICKl/V+4Qdf8Tiuw0pDxz5W+Fi33uURqdS/l1S7dya0nG5VcjVrVcsX2DW5rNiaI/K2cr+xM6wFBsI5FV+mcVU5+Dg8wSDaYOmS8vEiI0abGXOudI4kEWs3KpaFEfo0CVieKpMvn9/0K6Qj X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 72c608f3-6854-4533-efc5-08d4e0175506 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHSPR01MB180; X-Microsoft-Exchange-Diagnostics: 1; MWHSPR01MB180; 3:xyI16apT1HQtSqUa466hvNZ5f3787KDH7Y2eJNYM5j87Gd5jo6ucCt0S/xiYm2EErbkcQz91eTNxQohDtX6nJ/yTg2oFuAG1uJSGMBgkZ2yRHcd5c1cX9xCGvE1Da3tnwIQTket8kSgSEm46aXBj6NFEciZ+IPNIZdyTNH7i897svOf894CbS4ac2kPdPHF9O2XQeJAp9mUh2HKqtj87yFALb+3yPN7pLFOxE62emMwQ1T3fhSE6oJRuHlspV4rjMQHhrsmHIYej7V24d6LgoXvdPgk147JOE3EXmi7kZ8tp2k+g6lUNmy5qUKVcMVsUHaygzwN1IJFeo0/N/zrXw7L7mxgDhGKpEywX2kfAOY0=; 25:MH++PyuncBEo2D2a+xDxjdLvgioYDPpQkGBpPcnHDByqoLaancnbBhyBfRHOmrmHbktOI7/XLBjH2uSJAKzD97AEutcDyqedvxH/Ol3zfsEl6Pz/mywTAXt//1TVdx48uVnKyFWgS3+VhNBmGJZ7Hv8NPjabsdtcNVoKOCl4hM3CBjkRBisq3m8Ue+SRsR7POXjucLFBi8bKAergBgrNFr7oNcNnCr7u++ENpnaLldewlovI+aqXnh3mre1NDPx5zl0V/LFi9u49J4IjTULdXzgk/xbz11SG8Kt4z4G5OnfByCDGKnvbV8JTe9nUTwwltPqhf6M7fEKFIfe4C7HkOw== X-MS-TrafficTypeDiagnostic: MWHSPR01MB180: X-Microsoft-Exchange-Diagnostics: 1; MWHSPR01MB180; 31:268shvIz2vOTxHi/slPuLPCVXgNcfa5Tuu4Gx1iF9iThFIfUG0bLHYGcqNbIFp5x4jxih7QFuuyWj+n5leUTgM1l0c3rn/7FgDK4Leq9GjXVKrIDFf75zslkZg5NtGk3dypJn8o8k0rXBEUxPjCA9IL2jtWwBDXWATvWotyaVnKHYsXLmfw+PcTZZ89JLkdth1YKknuS0q6E4PpvyH6gzQJAJn6j6igSq90hlFCLGEQ=; 4:B1FVPyPlZSJtelg+y43SLKcOYtXzkwHH8ZIaA10xS1Nt+Ji7jJxRXAyj9ETgDBUZhwidPWqguoCPFYvkW8cr4VzhBZzG2PwGYt01UOWclhWABRnfMu3DNdhg7jNI1331FH3shw09MOcwkyHDOviwoNmeeuyKYJpTHKjmxAIhYSoEd8wpido9BdnOKjiE3H9cooH0d4NiUKpr+5VxVYNhAaaOfib+jsGrdc5c1me5VuLJSsM0YR0abCIGYLT4pYnpXoY1rCqKbVk2ZDUoube9nxYg9YK889NQoHGhS9HktT8= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123561025)(20161123556025)(20161123559100)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHSPR01MB180; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHSPR01MB180; X-Forefront-PRVS: 03950F25EC X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hTUFIwMU1CMTgwOzIzOm1KM1UxeFptVXZxaW1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T3FDa0VsQkg3ZFhuMVlDb0hWd3c9PQ==?= X-Microsoft-Exchange-Diagnostics: 1; MWHSPR01MB180; 6:58dzbeALehCjd2kk1MDqF//rvpDU3GgbQf1feqzuHRp2HiSyKeFl9ElzDGEorkb7cz8MYjo+cH0lGswvpMtp+7eV8kpG7/PQhTa6L3h+lILrVVS0jC/WKbIkNMBGzot0Fm37kX13IchFwwYjGTNFBCdr3kK51DLfNn+NInR1s8I7hrBwiD5UvwbJHo/f+3LCCNZlsusjBEi6F3pe/yvc2AHQSx8x+5vgRMsSnboxoSubIZn4jdHE3vwGgi9vP8To/7kRjb8ao4jTxnGnKVfMHBWCKdlL/LSEDHYX2PPT9kcEOmSGPzNVFWYUA/jrBixUxlZA2GSt6IuFnTECXKc15g==; 5:BqyUopDsxODt1/JgPLwCDWS7+Ah+L8IlfgqxXWnl1lX9MaAcHn1Z77QMTwo68kUtD//yCUmoGnNw+9H9lMOENxdertg49TzhOo+CewASwFpG1SadpIsG2ReAR7zyq8yN+xjIlv8Xplz12JRm4tkS0Q==; 24:U6rQoN6Z9xW55HFVudT5oYAlx8ogTpyNC08dwQmS9g6rEtrhSa/awu+N0xzCPritjGvmuSqIN0r3epgxxac38RX4p5HvT8uIKr+toq53ckw=; 7:Z+5nMV/k2rrcko7qCdJmY/WLIQcrrblykQOGBXChA5E88ejnsiOb6nCMkzhRdIIX2PeBDn3yA9QfR+zXDIrznWf4ahrDOFMiMOmdMjrPpoBHM02bRGxvaDr1uRODF430KckkAkrXXbtBhdz9MjHe5PwdhpUQ/j9pQ0KBEWHvMKr/x7eJPTjE7mu0A09N9fYggOkphRwNHs4xzQkjHdcQjJSy8Q3NXpuOHO3rE771B/o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2017 17:43:37.9130 (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: MWHSPR01MB180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170810_104400_823349_312C8EF0 X-CRM114-Status: GOOD ( 16.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Roy Pledge , Dan Douglass , Radu Alexe , linux-crypto@vger.kernel.org, "David S . Miller" , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Radu Alexe Order preservation is a feature that will be supported in dpni, dpseci and dpci devices. This is a preliminary patch for the changes to be introduced in the corresponding drivers. Signed-off-by: Radu Alexe Signed-off-by: Horia Geantă --- drivers/staging/fsl-mc/include/dpopr.h | 110 +++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 drivers/staging/fsl-mc/include/dpopr.h diff --git a/drivers/staging/fsl-mc/include/dpopr.h b/drivers/staging/fsl-mc/include/dpopr.h new file mode 100644 index 000000000000..e1110af2fe54 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpopr.h @@ -0,0 +1,110 @@ +/* + * Copyright 2017 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 the above-listed copyright holders nor the + * names of any 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT HOLDERS OR CONTRIBUTORS 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_DPOPR_H_ +#define __FSL_DPOPR_H_ + +/* Data Path Order Restoration API + * Contains initialization APIs and runtime APIs for the Order Restoration + */ + +/** Order Restoration properties */ + +/** + * Create a new Order Point Record option + */ +#define OPR_OPT_CREATE 0x1 +/** + * Retire an existing Order Point Record option + */ +#define OPR_OPT_RETIRE 0x2 + +/** + * struct opr_cfg - Structure representing OPR configuration + * @oprrws: Order point record (OPR) restoration window size (0 to 5) + * 0 - Window size is 32 frames. + * 1 - Window size is 64 frames. + * 2 - Window size is 128 frames. + * 3 - Window size is 256 frames. + * 4 - Window size is 512 frames. + * 5 - Window size is 1024 frames. + * @oa: OPR auto advance NESN window size (0 disabled, 1 enabled) + * @olws: OPR acceptable late arrival window size (0 to 3) + * 0 - Disabled. Late arrivals are always rejected. + * 1 - Window size is 32 frames. + * 2 - Window size is the same as the OPR restoration + * window size configured in the OPRRWS field. + * 3 - Window size is 8192 frames. Late arrivals are + * always accepted. + * @oeane: Order restoration list (ORL) resource exhaustion + * advance NESN enable (0 disabled, 1 enabled) + * @oloe: OPR loose ordering enable (0 disabled, 1 enabled) + */ +struct opr_cfg { + u8 oprrws; + u8 oa; + u8 olws; + u8 oeane; + u8 oloe; +}; + +/** + * struct opr_qry - Structure representing OPR configuration + * @enable: Enabled state + * @rip: Retirement In Progress + * @ndsn: Next dispensed sequence number + * @nesn: Next expected sequence number + * @ea_hseq: Early arrival head sequence number + * @hseq_nlis: HSEQ not last in sequence + * @ea_tseq: Early arrival tail sequence number + * @tseq_nlis: TSEQ not last in sequence + * @ea_tptr: Early arrival tail pointer + * @ea_hptr: Early arrival head pointer + * @opr_id: Order Point Record ID + * @opr_vid: Order Point Record Virtual ID + */ +struct opr_qry { + char enable; + char rip; + u16 ndsn; + u16 nesn; + u16 ea_hseq; + char hseq_nlis; + u16 ea_tseq; + char tseq_nlis; + u16 ea_tptr; + u16 ea_hptr; + u16 opr_id; + u16 opr_vid; +}; + +#endif /* __FSL_DPOPR_H_ */