From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0053.outbound.protection.outlook.com [104.47.36.53]) by dpdk.org (Postfix) with ESMTP id C13517CAE for ; Thu, 29 Jun 2017 12:28:59 +0200 (CEST) Received: from MWHPR03CA0021.namprd03.prod.outlook.com (10.175.133.159) by CY4PR03MB3271.namprd03.prod.outlook.com (10.171.246.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Thu, 29 Jun 2017 10:28:58 +0000 Received: from BY2FFO11FD040.protection.gbl (2a01:111:f400:7c0c::144) by MWHPR03CA0021.outlook.office365.com (2603:10b6:300:117::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11 via Frontend Transport; Thu, 29 Jun 2017 10:28:58 +0000 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; 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 BY2FFO11FD040.mail.protection.outlook.com (10.1.14.225) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1199.9 via Frontend Transport; Thu, 29 Jun 2017 10:28:57 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v5TASSbK002766; Thu, 29 Jun 2017 03:28:54 -0700 From: Nipun Gupta To: CC: , , , , , , Nipun Gupta Date: Thu, 29 Jun 2017 15:57:52 +0530 Message-ID: <1498732085-18449-9-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1498732085-18449-1-git-send-email-nipun.gupta@nxp.com> References: <1495735361-4840-1-git-send-email-nipun.gupta@nxp.com> <1498732085-18449-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131432057379978085; (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)(39450400003)(39400400002)(39380400002)(39850400002)(39840400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(8676002)(8936002)(38730400002)(81166006)(2351001)(575784001)(2906002)(50226002)(47776003)(86362001)(36756003)(4326008)(8656002)(6916009)(2950100002)(50986999)(305945005)(77096006)(54906002)(76176999)(53946003)(110136004)(53936002)(5660300001)(33646002)(189998001)(5003940100001)(498600001)(85426001)(356003)(104016004)(106466001)(50466002)(97736004)(105606002)(48376002)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB3271; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2FFO11FD040; 1:DAebIZQjq64zvE0IGFhxe7OYQDDFUrLg/tLoi5luDf?= =?us-ascii?Q?JRlaWFzVRxkaNpl+Kx3qfFFismhET5GusQchY3xpXgU6i3pndr6PmfBnOMRD?= =?us-ascii?Q?QMn3/w3Xe/2wcIjxoDC23fcMqz7U2swrxcJda8ZD1Roy34xGude6iksTcZcM?= =?us-ascii?Q?bCt3GZDCWs8BKBjsdcrgH96T2JzeGgPU7NP9XapFxn11SxrXPP5oSqLPFc/G?= =?us-ascii?Q?GLtolLIj5GDSCJrixpuM4wjiD2awvWPaREtj6A2FIGFLltzjqMyYd3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rafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31a56b49-ed0c-4ed1-7b65-08d4bed9a6b2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR03MB3271; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB3271; 3:5YZN0XTfRE6dfnH38j856XfC/b2mULVewHFw6JOq/v3SbHXpqwQM/I29pWxXX+UBeHJaKYaCnCl2jbOEq2/et9Hs8xtGOT88l1nzdD83EcCpARSeSqvSbF8xb5SFXiwxTS8VpO4WMpLjgvIZlPBhtiFsXMN96b5yRfIuJ/wQWY0uIXzmawdd34Yelohk1rQTMT2aC0naATmBOWiR85AtCSMbxleLbg1343JrkPLOgi1w8idwiFSx+45/JmqRapmsmbAOxVlZNvr97UbyHvVHo/OAs/+Q6W3Dpa10IbmqF9sZPt/zQ6UQBLA2itRkih6HjB6WY4jT0SeUhtkPkliTcVDn7Fd40X58RbsS+coVe1WK7D0604i03oUKsGnkU9WEarwvexnuum0Yz2bhpHbZtLbOUgqkvDEzqq3OqevBp3gl+JIPUkgGdO2QAjrdieO+naOiiUpL0ZZxnjKj8Ux85jEYzLwCDdML963CQe8foB8zlyx1hnCQBa7ZiPQxJupC2z6GYzyHF572+ehRcoCjlJXCtbVIhJxDeHfkDTdzwrf4bHToR3Ohppi7KbZ5kx25TnxYK4vz4F6Nf72j/2HUdFOrfjlftbCAZXMXNhSHawCZOiLtbTG6k5V+Yx6GFymTQJQXXv/GGG77vHIcXb4jDutTT0tXj6JvRjP0t1hWrS64x2CY0cBNPq6N3yXWyvFnN/dASys2s5kF6hUQKTr/HaQ7nCJGoWGKyafloWd91yXa73bjdOBH/E8GCUIAQx4GFs5o7+2zPPzFWgN3sxFnIJveK0jRXDDSJ6QowiRKW0kUhI6EMuDxk6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ics: 1; CY4PR03MB3271; 31:0QKM/jGU1KwK4UjHJffQenelnS7d4r4c8wKgRJOWS/oxJDgX87kj0MAbsI6tnmBTUeUC8tICCK/hT5KiKf2LxKJuLOBgXM89XBk1+r92DUA4YDnd+iMXHgB/NEXjZqWUrw9YlV7mQ3PFC7ukRRc+x+IEZM5UD2lscmTPs6gKrdR5gha9jeswhlAZpcMIGSYaL8bLjmtnFxYo2QQoqNToeYGukO2dgjBGriNcXE6MDfnxFUe9EvUPJsqcZ2qObqVuDKS4T2ZUUjvjoj7jcxS0aUaH6FIfi9K81kUsQSZc/2t9/xc6g9WtswP6IOEV7uoCkNLVlPN4Bj/fT2dYOwDjqQL3o1YJRTr78dVX1Dx/+vcnNwjvxjyrT2kXF/mIQNoh9d2gUWX0XUejZUr+jvXyzuihiOJM6bRNmkF4S87ejx3oZujar3cK5sae0W7ffODyvkb3GwPgyqkTt8fXFEJ1poWqIJYf8jF89G8xYFXNQmhXFlFziPtwZjwoB4VckOqDfXVHTWqNYONxDQtgF+Nlx4lUxtUoaykTSKtdzp2yERoWDtT/2A1i3NvhO6NEngfiddgyOx5SUO9fHIja+s9OVTQV9ecdEfjqwpJd8hoqVpqvPELx/PFDiOiP1Q4TzQCdCEdB+4IMVAPPebWdRN+4CC82SXj8UTp7rblb8hIHclvfnPsRocslNXJQGaBmAUy957zg7xt1G1k+3ATkH4zMWQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(185117386973197)(48057245064654)(148574349560750)(275809806118684)(158140799945019)(247924648384137); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(5005006)(13016025)(13018025)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123561025)(20161123559100)(20161123565025)(20161123556025)(20161123563025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB3271; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB3271; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB3271; 4:8utUfhT8XUzyU7e9bFi6MclRdtg622taQIiu/YHHAE?= =?us-ascii?Q?m0NmRQBK3TDmNtUUVpSqsDNw3lQ3jn02Lh8kdA7eVaw3xbdYucpmKooxjt6X?= =?us-ascii?Q?oYJ3MIrGuDyWYmxHQurI6iGoS83IVGypbfOnl4Sy7kPHHsk1gbqcgR+mMG+O?= =?us-ascii?Q?bH7PPdPDmYvdlLDSD6gMNGLo1m2OmEW7x/0k+H7dLWmow0Zi6PFGiKJBkOAg?= =?us-ascii?Q?MM/XA8fjBY6yLRXz0B0zeh7qLxxJ8d/BvYHmjGElHjGQSqqhdzhoFLMaAsbO?= =?us-ascii?Q?jLAC4WIooX3s6Ljk74Fm/OiXAgwzuxb6OXOwC5EhafoFXTs0vusTVFW+iLxF?= =?us-ascii?Q?srzHXRzFwl67c8IPMg+0Zp9l+QPQJdKhbDcnzY/bSGKvpAjfeBdeIC0hHXU8?= =?us-ascii?Q?/Pk5g+3TtROnS5a0YBdQR9sH5fIXuq5a7LjVfB/ppQ2lLGiPEewdo/GuEcVy?= =?us-ascii?Q?JG7AQeqx40ljnD2xl7OTL3t+Zasy+XXtW/OAKO4DM62Mms4Xfee0CNhyJLlV?= =?us-ascii?Q?qfen7wyFAbTmAPRfvIaKHwaARlxQnH8R7AzDASE0XPC1cD1WRC7p8CwFPaKq?= =?us-ascii?Q?HJX0ECPGNZqbBMBMFng7otSrTIL78px3d2622PdqqzIGmEHX/x+qc6/49iU1?= =?us-ascii?Q?jewBEsCX3Ci1jsi7GxlvKD68mdnTw6tvLT0ZBcqjvtBTGPg9qFhP18pnW46y?= =?us-ascii?Q?PSITV7AwoR+qRuZNaszIiNHcAvXbjbA/22CY1jbjJ+9HPhkdmtIyTNmLvYj1?= =?us-ascii?Q?mFZDvMNpymNLzpu96GLZv9oHJx3L8Pwnu/BHc+tv3RDuMeAYxOSvwN9Hxg37?= =?us-ascii?Q?g/Enm/I4UcjW/xD1nlYXG0FxqsDDvECOSkjQ+mTyxes0ejtdcMuk9a5GgW+7?= =?us-ascii?Q?UrvkrkRcEDPqdVJVTRDt9uWwXxP0rk/6Yp4eFooCjbEdPzMI4ltFugNmrKO8?= =?us-ascii?Q?dstgDAjEeSBEzgvuQYrxKgk0E0VZWLHrhszqXoNtEn9HFGvAiE14YGI74Yq5?= =?us-ascii?Q?ool5tvLesMPrb50drWBaFJdUbmlZo22Ys3+AsycltaNFb1AlTPp5OZfq05dM?= =?us-ascii?Q?XbTaAWkW44bCGjZS2tp6vOJu8xwq2CbIAaVk/92sPkfZFZ/qAjpL2B2PXZeG?= =?us-ascii?Q?U1PXe8gzylHLvnqNgnMOQGLfzN/pa/RE2VKiXzuLV9tM1bga6RaYCcL+ndlQ?= =?us-ascii?Q?p0+/5GaYX2+R7G4ckgkXpNqPNZzwxgI10eG7AGABhXGY/W1CTNqIJRTsZGI3?= =?us-ascii?Q?2TothdMWsQdnF3u/pm1QoFbqNO7T767XEjZt048DIk0t7IrZ+6IXLmsxakRs?= =?us-ascii?Q?QaqLmZsjZXf5X+Gyzdr9UkvaUKXorPofYKP/YMrjUUX6mzQQXQRz+GZ7k/HS?= =?us-ascii?Q?QoBdJGIln+BgvaJOY8Czllc8GV4btG+fRaZI0RKDbbhopricqRWr5VJxSRZN?= =?us-ascii?Q?/6l136sECiBoCL0vTLaHRR3UGczTLWYAkLD4Tf8+1q8XaAs9xL45t4MqazPt?= =?us-ascii?Q?GQhD+lbTDjKqZYy8woAXYOrys4pUveSWM=3D?= X-Forefront-PRVS: 0353563E2B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB3271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+i/7NnP/ol/39PKZ3I8F06aomTOuw0Ukt/634ktfAyBvlVcHHED93wvNiT+ugf+pNSqsv5aM6+CsMUTljeGL9pRLizZUO/3i/6akf50O/wBwDWRKW/44gGlTosu0CkE8tWyXRFqcwUI1s/8fF6R/I2r7i+AvSbfREcJNuUuupUwG6aYhoQ= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2017 10:28:57.7950 (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: CY4PR03MB3271 Subject: [dpdk-dev] [PATCH 08/21 v4] bus/fslmc: adding basic dpci support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 10:29:00 -0000 Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/Makefile | 1 + drivers/bus/fslmc/mc/dpci.c | 307 +++++++++++++++++++++ drivers/bus/fslmc/mc/fsl_dpci.h | 404 ++++++++++++++++++++++++++++ drivers/bus/fslmc/mc/fsl_dpci_cmd.h | 147 ++++++++++ drivers/bus/fslmc/rte_bus_fslmc_version.map | 1 + 5 files changed, 860 insertions(+) create mode 100644 drivers/bus/fslmc/mc/dpci.c create mode 100644 drivers/bus/fslmc/mc/fsl_dpci.h create mode 100644 drivers/bus/fslmc/mc/fsl_dpci_cmd.h diff --git a/drivers/bus/fslmc/Makefile b/drivers/bus/fslmc/Makefile index 38d884e..4884d87 100644 --- a/drivers/bus/fslmc/Makefile +++ b/drivers/bus/fslmc/Makefile @@ -68,6 +68,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += \ mc/dpio.c \ mc/mc_sys.c \ mc/dpcon.c \ + mc/dpci.c SRCS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += portal/dpaa2_hw_dpio.c SRCS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += portal/dpaa2_hw_dpbp.c diff --git a/drivers/bus/fslmc/mc/dpci.c b/drivers/bus/fslmc/mc/dpci.c new file mode 100644 index 0000000..0ea7837 --- /dev/null +++ b/drivers/bus/fslmc/mc/dpci.c @@ -0,0 +1,307 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * BSD LICENSE + * + * Copyright 2013-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 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. + * + * GPL LICENSE SUMMARY + * + * 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. + */ +#include +#include +#include +#include + +int dpci_open(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + int dpci_id, + uint16_t *token) +{ + struct mc_command cmd = { 0 }; + int err; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_OPEN, + cmd_flags, + 0); + DPCI_CMD_OPEN(cmd, dpci_id); + + /* send command to mc*/ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + *token = MC_CMD_HDR_READ_TOKEN(cmd.header); + + return 0; +} + +int dpci_close(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_CLOSE, + cmd_flags, + token); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} + +int dpci_create(struct fsl_mc_io *mc_io, + uint16_t dprc_token, + uint32_t cmd_flags, + const struct dpci_cfg *cfg, + uint32_t *obj_id) +{ + struct mc_command cmd = { 0 }; + int err; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_CREATE, + cmd_flags, + dprc_token); + DPCI_CMD_CREATE(cmd, cfg); + + /* send command to mc*/ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + CMD_CREATE_RSP_GET_OBJ_ID_PARAM0(cmd, *obj_id); + + return 0; +} + +int dpci_destroy(struct fsl_mc_io *mc_io, + uint16_t dprc_token, + uint32_t cmd_flags, + uint32_t object_id) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_DESTROY, + cmd_flags, + dprc_token); + /* set object id to destroy */ + CMD_DESTROY_SET_OBJ_ID_PARAM0(cmd, object_id); + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} + +int dpci_enable(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_ENABLE, + cmd_flags, + token); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} + +int dpci_disable(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_DISABLE, + cmd_flags, + token); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} + +int dpci_is_enabled(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + int *en) +{ + struct mc_command cmd = { 0 }; + int err; + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_IS_ENABLED, cmd_flags, + token); + + /* send command to mc*/ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + DPCI_RSP_IS_ENABLED(cmd, *en); + + return 0; +} + +int dpci_reset(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_RESET, + cmd_flags, + token); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} + +int dpci_get_attributes(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + struct dpci_attr *attr) +{ + struct mc_command cmd = { 0 }; + int err; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_ATTR, + cmd_flags, + token); + + /* send command to mc*/ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + DPCI_RSP_GET_ATTRIBUTES(cmd, attr); + + return 0; +} + +int dpci_set_rx_queue(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + uint8_t priority, + const struct dpci_rx_queue_cfg *cfg) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_SET_RX_QUEUE, + cmd_flags, + token); + DPCI_CMD_SET_RX_QUEUE(cmd, priority, cfg); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} + +int dpci_get_rx_queue(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + uint8_t priority, + struct dpci_rx_queue_attr *attr) +{ + struct mc_command cmd = { 0 }; + int err; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_RX_QUEUE, + cmd_flags, + token); + DPCI_CMD_GET_RX_QUEUE(cmd, priority); + + /* send command to mc*/ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + DPCI_RSP_GET_RX_QUEUE(cmd, attr); + + return 0; +} + +int dpci_get_tx_queue(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + uint8_t priority, + struct dpci_tx_queue_attr *attr) +{ + struct mc_command cmd = { 0 }; + int err; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_TX_QUEUE, + cmd_flags, + token); + DPCI_CMD_GET_TX_QUEUE(cmd, priority); + + /* send command to mc*/ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + DPCI_RSP_GET_TX_QUEUE(cmd, attr); + + return 0; +} + +int dpci_get_api_version(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t *major_ver, + uint16_t *minor_ver) +{ + struct mc_command cmd = { 0 }; + int err; + + cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_API_VERSION, + cmd_flags, + 0); + + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + DPCI_RSP_GET_API_VERSION(cmd, *major_ver, *minor_ver); + + return 0; +} diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h new file mode 100644 index 0000000..1e155dd --- /dev/null +++ b/drivers/bus/fslmc/mc/fsl_dpci.h @@ -0,0 +1,404 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * BSD LICENSE + * + * Copyright 2013-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 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. + * + * GPL LICENSE SUMMARY + * + * 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_DPCI_H +#define __FSL_DPCI_H + +/* Data Path Communication Interface API + * Contains initialization APIs and runtime control APIs for DPCI + */ + +struct fsl_mc_io; + +/** General DPCI macros */ + +/** + * Maximum number of Tx/Rx priorities per DPCI object + */ +#define DPCI_PRIO_NUM 2 + +/** + * Indicates an invalid frame queue + */ +#define DPCI_FQID_NOT_VALID (uint32_t)(-1) + +/** + * All queues considered; see dpci_set_rx_queue() + */ +#define DPCI_ALL_QUEUES (uint8_t)(-1) + +/** + * dpci_open() - Open a control session for the specified object + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @dpci_id: DPCI unique ID + * @token: Returned token; use in subsequent API calls + * + * This function can be used to open a control session for an + * already created object; an object may have been declared in + * the DPL or by calling the dpci_create() function. + * This function returns a unique authentication token, + * associated with the specific object ID and the specific MC + * portal; this token must be used in all subsequent commands for + * this specific object. + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_open(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + int dpci_id, + uint16_t *token); + +/** + * dpci_close() - Close the control session of the object + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCI object + * + * After this function is called, no further operations are + * allowed on the object without opening a new control session. + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_close(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token); + +/** + * Enable the Order Restoration support + */ +#define DPCI_OPT_HAS_OPR 0x000040 + +/** + * Order Point Records are shared for the entire DPCI + */ +#define DPCI_OPT_OPR_SHARED 0x000080 + +/** + * struct dpci_cfg - Structure representing DPCI configuration + * @options: Any combination of the following options: + * DPCI_OPT_HAS_OPR + * DPCI_OPT_OPR_SHARED + * @num_of_priorities: Number of receive priorities (queues) for the DPCI; + * note, that the number of transmit priorities (queues) + * is determined by the number of receive priorities of + * the peer DPCI object + */ +struct dpci_cfg { + uint32_t options; + uint8_t num_of_priorities; +}; + +/** + * dpci_create() - Create the DPCI object. + * @mc_io: Pointer to MC portal's I/O object + * @dprc_token: Parent container token; '0' for default container + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @cfg: Configuration structure + * @obj_id: returned object id + * + * Create the DPCI object, allocate required resources and perform required + * initialization. + * + * The object can be created either by declaring it in the + * DPL file, or by calling this function. + * + * The function accepts an authentication token of a parent + * container that this object should be assigned to. The token + * can be '0' so the object will be assigned to the default container. + * The newly created object can be opened with the returned + * object id and using the container's associated tokens and MC portals. + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_create(struct fsl_mc_io *mc_io, + uint16_t dprc_token, + uint32_t cmd_flags, + const struct dpci_cfg *cfg, + uint32_t *obj_id); + +/** + * dpci_destroy() - Destroy the DPCI object and release all its resources. + * @mc_io: Pointer to MC portal's I/O object + * @dprc_token: Parent container token; '0' for default container + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @object_id: The object id; it must be a valid id within the container that + * created this object; + * + * The function accepts the authentication token of the parent container that + * created the object (not the one that currently owns the object). The object + * is searched within parent using the provided 'object_id'. + * All tokens to the object must be closed before calling destroy. + * + * Return: '0' on Success; error code otherwise. + */ +int dpci_destroy(struct fsl_mc_io *mc_io, + uint16_t dprc_token, + uint32_t cmd_flags, + uint32_t object_id); + +/** + * dpci_enable() - Enable the DPCI, allow sending and receiving frames. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCI object + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_enable(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token); + +/** + * dpci_disable() - Disable the DPCI, stop sending and receiving frames. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCI object + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_disable(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token); + +/** + * dpci_is_enabled() - Check if the DPCI is enabled. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCI object + * @en: Returns '1' if object is enabled; '0' otherwise + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_is_enabled(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + int *en); + +/** + * dpci_reset() - Reset the DPCI, returns the object to initial state. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCI object + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_reset(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token); + +/** + * struct dpci_attr - Structure representing DPCI attributes + * @id: DPCI object ID + * @num_of_priorities: Number of receive priorities + */ +struct dpci_attr { + int id; + uint8_t num_of_priorities; +}; + +/** + * dpci_get_attributes() - Retrieve DPCI attributes. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCI object + * @attr: Returned object's attributes + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_get_attributes(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + struct dpci_attr *attr); + +/** + * enum dpci_dest - DPCI destination types + * @DPCI_DEST_NONE: Unassigned destination; The queue is set in parked mode + * and does not generate FQDAN notifications; user is + * expected to dequeue from the queue based on polling or + * other user-defined method + * @DPCI_DEST_DPIO: The queue is set in schedule mode and generates FQDAN + * notifications to the specified DPIO; user is expected + * to dequeue from the queue only after notification is + * received + * @DPCI_DEST_DPCON: The queue is set in schedule mode and does not generate + * FQDAN notifications, but is connected to the specified + * DPCON object; + * user is expected to dequeue from the DPCON channel + */ +enum dpci_dest { + DPCI_DEST_NONE = 0, + DPCI_DEST_DPIO = 1, + DPCI_DEST_DPCON = 2 +}; + +/** + * struct dpci_dest_cfg - Structure representing DPCI destination configuration + * @dest_type: Destination type + * @dest_id: Either DPIO ID or DPCON ID, depending on the destination type + * @priority: Priority selection within the DPIO or DPCON channel; valid + * values are 0-1 or 0-7, depending on the number of priorities + * in that channel; not relevant for 'DPCI_DEST_NONE' option + */ +struct dpci_dest_cfg { + enum dpci_dest dest_type; + int dest_id; + uint8_t priority; +}; + +/** DPCI queue modification options */ + +/** + * Select to modify the user's context associated with the queue + */ +#define DPCI_QUEUE_OPT_USER_CTX 0x00000001 + +/** + * Select to modify the queue's destination + */ +#define DPCI_QUEUE_OPT_DEST 0x00000002 + +/** + * struct dpci_rx_queue_cfg - Structure representing RX queue configuration + * @options: Flags representing the suggested modifications to the queue; + * Use any combination of 'DPCI_QUEUE_OPT_' flags + * @user_ctx: User context value provided in the frame descriptor of each + * dequeued frame; + * valid only if 'DPCI_QUEUE_OPT_USER_CTX' is contained in + * 'options' + * @dest_cfg: Queue destination parameters; + * valid only if 'DPCI_QUEUE_OPT_DEST' is contained in 'options' + */ +struct dpci_rx_queue_cfg { + uint32_t options; + uint64_t user_ctx; + struct dpci_dest_cfg dest_cfg; +}; + +/** + * dpci_set_rx_queue() - Set Rx queue configuration + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCI object + * @priority: Select the queue relative to number of + * priorities configured at DPCI creation; use + * DPCI_ALL_QUEUES to configure all Rx queues + * identically. + * @cfg: Rx queue configuration + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_set_rx_queue(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + uint8_t priority, + const struct dpci_rx_queue_cfg *cfg); + +/** + * struct dpci_rx_queue_attr - Structure representing Rx queue attributes + * @user_ctx: User context value provided in the frame descriptor of each + * dequeued frame + * @dest_cfg: Queue destination configuration + * @fqid: Virtual FQID value to be used for dequeue operations + */ +struct dpci_rx_queue_attr { + uint64_t user_ctx; + struct dpci_dest_cfg dest_cfg; + uint32_t fqid; +}; + +/** + * dpci_get_rx_queue() - Retrieve Rx queue attributes. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCI object + * @priority: Select the queue relative to number of + * priorities configured at DPCI creation + * @attr: Returned Rx queue attributes + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_get_rx_queue(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + uint8_t priority, + struct dpci_rx_queue_attr *attr); + +/** + * struct dpci_tx_queue_attr - Structure representing attributes of Tx queues + * @fqid: Virtual FQID to be used for sending frames to peer DPCI; + * returns 'DPCI_FQID_NOT_VALID' if a no peer is connected or if + * the selected priority exceeds the number of priorities of the + * peer DPCI object + */ +struct dpci_tx_queue_attr { + uint32_t fqid; +}; + +/** + * dpci_get_tx_queue() - Retrieve Tx queue attributes. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCI object + * @priority: Select the queue relative to number of + * priorities of the peer DPCI object + * @attr: Returned Tx queue attributes + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_get_tx_queue(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + uint8_t priority, + struct dpci_tx_queue_attr *attr); + +/** + * dpci_get_api_version() - Get communication interface API version + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @major_ver: Major version of data path communication interface API + * @minor_ver: Minor version of data path communication interface API + * + * Return: '0' on Success; Error code otherwise. + */ +int dpci_get_api_version(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t *major_ver, + uint16_t *minor_ver); + +#endif /* __FSL_DPCI_H */ diff --git a/drivers/bus/fslmc/mc/fsl_dpci_cmd.h b/drivers/bus/fslmc/mc/fsl_dpci_cmd.h new file mode 100644 index 0000000..6d4e273 --- /dev/null +++ b/drivers/bus/fslmc/mc/fsl_dpci_cmd.h @@ -0,0 +1,147 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * BSD LICENSE + * + * Copyright 2013-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 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. + * + * GPL LICENSE SUMMARY + * + * 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_DPCI_CMD_H +#define _FSL_DPCI_CMD_H + +/* DPCI Version */ +#define DPCI_VER_MAJOR 3 +#define DPCI_VER_MINOR 3 + +/* Command IDs */ +#define DPCI_CMDID_CLOSE 0x8001 +#define DPCI_CMDID_OPEN 0x8071 +#define DPCI_CMDID_CREATE 0x9072 +#define DPCI_CMDID_DESTROY 0x9871 +#define DPCI_CMDID_GET_API_VERSION 0xa071 + +#define DPCI_CMDID_ENABLE 0x0021 +#define DPCI_CMDID_DISABLE 0x0031 +#define DPCI_CMDID_GET_ATTR 0x0041 +#define DPCI_CMDID_RESET 0x0051 +#define DPCI_CMDID_IS_ENABLED 0x0061 + +#define DPCI_CMDID_SET_IRQ_ENABLE 0x0121 +#define DPCI_CMDID_GET_IRQ_ENABLE 0x0131 +#define DPCI_CMDID_SET_IRQ_MASK 0x0141 +#define DPCI_CMDID_GET_IRQ_MASK 0x0151 +#define DPCI_CMDID_GET_IRQ_STATUS 0x0161 +#define DPCI_CMDID_CLEAR_IRQ_STATUS 0x0171 + +#define DPCI_CMDID_SET_RX_QUEUE 0x0e01 +#define DPCI_CMDID_GET_LINK_STATE 0x0e11 +#define DPCI_CMDID_GET_PEER_ATTR 0x0e21 +#define DPCI_CMDID_GET_RX_QUEUE 0x0e31 +#define DPCI_CMDID_GET_TX_QUEUE 0x0e41 +#define DPCI_CMDID_SET_OPR 0x0e51 +#define DPCI_CMDID_GET_OPR 0x0e61 + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_CMD_OPEN(cmd, dpci_id) \ + MC_CMD_OP(cmd, 0, 0, 32, int, dpci_id) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_CMD_CREATE(cmd, cfg) \ +do { \ + MC_CMD_OP(cmd, 0, 0, 8, uint8_t, cfg->num_of_priorities);\ + MC_CMD_OP(cmd, 2, 0, 32, uint32_t, cfg->options);\ +} while (0) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_RSP_IS_ENABLED(cmd, en) \ + MC_RSP_OP(cmd, 0, 0, 1, int, en) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_RSP_GET_ATTRIBUTES(cmd, attr) \ +do { \ + MC_RSP_OP(cmd, 0, 0, 32, int, (attr)->id);\ + MC_RSP_OP(cmd, 0, 48, 8, uint8_t, (attr)->num_of_priorities);\ +} while (0) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_RSP_GET_PEER_ATTR(cmd, attr) \ +do { \ + MC_RSP_OP(cmd, 0, 0, 32, int, attr->peer_id);\ + MC_RSP_OP(cmd, 1, 0, 8, uint8_t, attr->num_of_priorities);\ +} while (0) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_RSP_GET_LINK_STATE(cmd, up) \ + MC_RSP_OP(cmd, 0, 0, 1, int, up) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_CMD_SET_RX_QUEUE(cmd, priority, cfg) \ +do { \ + MC_CMD_OP(cmd, 0, 0, 32, int, cfg->dest_cfg.dest_id);\ + MC_CMD_OP(cmd, 0, 32, 8, uint8_t, cfg->dest_cfg.priority);\ + MC_CMD_OP(cmd, 0, 40, 8, uint8_t, priority);\ + MC_CMD_OP(cmd, 0, 48, 4, enum dpci_dest, cfg->dest_cfg.dest_type);\ + MC_CMD_OP(cmd, 1, 0, 64, uint64_t, cfg->user_ctx);\ + MC_CMD_OP(cmd, 2, 0, 32, uint32_t, cfg->options);\ +} while (0) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_CMD_GET_RX_QUEUE(cmd, priority) \ + MC_CMD_OP(cmd, 0, 40, 8, uint8_t, priority) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_RSP_GET_RX_QUEUE(cmd, attr) \ +do { \ + MC_RSP_OP(cmd, 0, 0, 32, int, attr->dest_cfg.dest_id);\ + MC_RSP_OP(cmd, 0, 32, 8, uint8_t, attr->dest_cfg.priority);\ + MC_RSP_OP(cmd, 0, 48, 4, enum dpci_dest, attr->dest_cfg.dest_type);\ + MC_RSP_OP(cmd, 1, 0, 8, uint64_t, attr->user_ctx);\ + MC_RSP_OP(cmd, 2, 0, 32, uint32_t, attr->fqid);\ +} while (0) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_CMD_GET_TX_QUEUE(cmd, priority) \ + MC_CMD_OP(cmd, 0, 40, 8, uint8_t, priority) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_RSP_GET_TX_QUEUE(cmd, attr) \ + MC_RSP_OP(cmd, 0, 32, 32, uint32_t, attr->fqid) + +/* cmd, param, offset, width, type, arg_name */ +#define DPCI_RSP_GET_API_VERSION(cmd, major, minor) \ +do { \ + MC_RSP_OP(cmd, 0, 0, 16, uint16_t, major);\ + MC_RSP_OP(cmd, 0, 16, 16, uint16_t, minor);\ +} while (0) + +#endif /* _FSL_DPCI_CMD_H */ diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index 01a7939..cf7c0ee 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -53,6 +53,7 @@ DPDK_17.05 { DPDK_17.08 { global: + dpci_set_rx_queue; dpcon_open; dpcon_get_attributes; mc_get_soc_version; -- 1.9.1