From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0052.outbound.protection.outlook.com [104.47.36.52]) by dpdk.org (Postfix) with ESMTP id F16057CC7 for ; Thu, 15 Jun 2017 11:00:12 +0200 (CEST) Received: from MWHPR03CA0004.namprd03.prod.outlook.com (10.175.133.142) by CY1PR0301MB1195.namprd03.prod.outlook.com (10.160.165.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Thu, 15 Jun 2017 09:00:10 +0000 Received: from BY2FFO11FD042.protection.gbl (2a01:111:f400:7c0c::125) by MWHPR03CA0004.outlook.office365.com (2603:10b6:300:117::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14 via Frontend Transport; Thu, 15 Jun 2017 09:00:10 +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 BY2FFO11FD042.mail.protection.outlook.com (10.1.14.227) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1157.12 via Frontend Transport; Thu, 15 Jun 2017 09:00:09 +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 v5F8xWSb012830; Thu, 15 Jun 2017 02:00:06 -0700 From: Nipun Gupta To: CC: , , , , , , Nipun Gupta Date: Thu, 15 Jun 2017 14:28:43 +0530 Message-ID: <1497517136-11824-8-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1497517136-11824-1-git-send-email-nipun.gupta@nxp.com> References: <1495735361-4840-1-git-send-email-nipun.gupta@nxp.com> <1497517136-11824-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131419908100100151; (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)(39450400003)(39840400002)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(77096006)(4326008)(189998001)(36756003)(5003940100001)(6666003)(6916009)(85426001)(2950100002)(86362001)(50986999)(575784001)(76176999)(5660300001)(50226002)(8936002)(81166006)(8676002)(356003)(33646002)(106466001)(2906002)(105606002)(2351001)(305945005)(50466002)(48376002)(104016004)(47776003)(110136004)(38730400002)(53946003)(54906002)(498600001)(53936002)(8656002)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1195; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD042; 1:aYxEvDFURCbDSsNTs33IvZJ81xEJXbuf6hxbwX+wG0PPQk+mslmqpMIRUfx7B8MFhbeI546KZz1YxBn4IGRb5f5w/Ix3Wmf6z94c4chxCNRn/fZVcKuuZLfhyXfdAXhUa19jAi08wGNHOD00CiduSF9uYgqg6hS08+r2syTFssAWWIpvoWMYMQ/FO7NZa9sgSdCkddY8F4e35xgN1iN2PsjHhqn2Gr/5w1vLZtB9msM6NAMuoqQrjvFlvokWdR7D9P9aMs3LLOnw+0+I+Npbc7suDhoq5N7LOSwInReN0letmTfBSH7b0K5azRB15eTkEcp1Ok6FoXaCj0/0uYl0rUt05rtPzMeaIGqboHXMTu3Cp1OLEOQ9kSUflWrABdbQGsDcq4FF6WWkPQhVZ1+0Tf5is+jVaHzB0kQvjkUxg4BDmIU4mQFZtsf3bkAZmbrXeEymzVoghesiQn8iEEpuFP4KwT90XTrBJbEk1WxIfyqtq8OY8m8Ep3rKNQ/p37XQ7qsiniXSjW1h6NlMM4/2/KpWcgi192AqCSz3Gs0azrfr2c96ni/70S+4yoLTqbwQThaNRvHFzdpbqmGPZK1pW0my5AlYwtH3akX04pVD4x1TwfF98NIyuXg123JdFgtQx7Yg6igOTQoI1iXO46fcC3yVekh/2mj8axD7Kw5TLCmqQlg2GYMG3app6yImKHOeawP9EMaYVTlUqnx9/4esLMV5pUugbuMA1NFJMWfde2w= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0301MB1195: X-MS-Office365-Filtering-Correlation-Id: 0d800d19-3a05-4752-8527-08d4b3cced1c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:CY1PR0301MB1195; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1195; 3:lkFx5skJEgjA06QWl9z1E3PuxAv6Wgjz31w7TyOHUMHIpnO2kc+PAkZsWJhdyUJDPf6me1PAwpBI0vtrTHFqFkllIB8PdXSGvRB70rei0dq1rWYAhr8gJjceJTR+3L0axj0nsL7pMEJkd19gzcI1hjeCbuvvpAHw+n6nFOD6cMoT3Nz6KYHHqyG/e+VNHBeXJlTdWqE+mm+KwyDW6KoOYjgVEzKpvzoxz/ooRDDoUlUg0Oos4yxwb469rfrP4js48LvxEaIUNOrYipUseeAn9bqc5Ibz021IWpehoT25lpujHzZZu6988TDIxSMLaNLznPTyoITGm9am1asKZlDLwIVJsjB2VkEhNMnUj0+Af4J/IqJWXv++8UtdAQSAw2rGs+FzJfHSR4KCCrNFrkMwy3IJYnpiCBCwysc7wHDmjxBQTyYUhm3YTkpjdX04Qlcw; 25:JdzjFQxva6/gmc0IEoqZOuBC2Yq2jPLETX4Vsaf0ePaouyxLmjtSodmLfHAf8Z/TdKdNCzIZHZPuAdQ7To4X7B5HDasrRzczB1E1Vt3aB1gZlPY6DL2a9wA6mhbB2Yx/ZsZy8PWNlw9Wi/RbdfNd/tgmVqEQumWL4Fv2fvSPABjT6Ev86KFNO7v3SBl4pLygY/BtJqoKIF3D76GixKxLNDW2F4PAghzZFY7SUwmBGD2pDiRMjTNE7z/uNd8nRlzgOJOzSL48sf59oQok1oDRYklVbJu/ya82Jhi2vlrIcEtmiuYV9yEA9xW9etuHxoEuSlETCDUoYbFIdyDLalSF0y9hcMHmyEcJudtU96hgsbtoxXjL/oEOXkEkr+LPcUV0piQvmb6wsEMfhdRd5xR4vBIv4zpCkt8rpnSnOLMTVHTvq75jj0EUtX/VTlxz8SXHVqyk7OpvNSwJzdtxuLwUcF40KNWbzPh8Dxgeai/JimA= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1195; 31:eAA7rkZqLCRk1ehRg6nqI7R7mbog+PxPNqnyeAFKk1XdvmvD6NDlcTISu4V1gOO9bwgkLNc8Og1zWVsLGN7P9cjt5U5ffKSh6u9qitSNGUdTcDwwXoO+PyBH29+xEu+xLeolhx97vyPXfZkk6a170tIo0OmzjPKGD6VBp7sxR+3MCBHJ+7Vagnt6iJyNBZllyE5nLywcLmZMDKY9+OQqOrcI+h23YqIz2nbfWjPicszhbdg8h/YD9+9CNp92usTveEbFjO92nk8zaGeeZ1IG+w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6096035)(20161123565025)(20161123556025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123559100)(20161123561025)(20161123563025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR0301MB1195; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR0301MB1195; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB1195; 4:GXzDOys7jMsFbG3rbBfiJhUIcdzRSzR11ze4X9ci?= =?us-ascii?Q?dYi1Oi9lPAA2vFUlT63mxEPkM/TOh7mK6DLTdDTSpbT7w1Cvq5VjRZ3DNOmX?= =?us-ascii?Q?hTSeJa1F+AIbAgvCbEZD18uCP7OgWuKSHP4QPIb6zczDxkw2ZEN9VfuPPGq0?= =?us-ascii?Q?XP2XS7SpNSAVTLDASoxxJ2qcRSlOuTxztUDAte2AyfpTqiLaPhfk34tO4dYa?= =?us-ascii?Q?HxTfA8aOEHWXFSfeXCbCzEMZUqlUuVv14hYskdbdb+R51us8iqZqRJBT/z9/?= =?us-ascii?Q?t44KXMXPY7nsZgD4NmhOnVLhpVJ7nBMpskkqmbbc1b+c0K3IYLTrOW+60jGe?= =?us-ascii?Q?FQ1kTOlnXxDNsrOcMKrTnxwLTIzUacCmzhOmNSLnNyfovXkviZB+7bsEi+3w?= =?us-ascii?Q?wbGQSV9USTYxGH4P+eQJ0juxx/vH/8zfbmtrK6jAexfN6xDXRpdJZ6kZ0dsR?= =?us-ascii?Q?tZTJpW0/ObmXYTMUpkbFaIuaoMDZa+9zSqAiJv/NlPi17+uZn+ld8Z9I2N55?= =?us-ascii?Q?18Me0uV9GuljOC1zwO8N8Lq/DOUAu1JRc4TAFvfurhyIL2Drd6C3HQj4i7K7?= =?us-ascii?Q?ltuTZa0nKZuIt/QLftiGpQS9lm6Kd1wXXLSvjk+OjD/yzkmES93QNCEKveBT?= =?us-ascii?Q?whYQYV/SMKuF+zP+PUZtjK6359AEZyXsEJFGlYEJ8bQGPJ2nSHxWVGG+AFDM?= =?us-ascii?Q?dbW73wmlOvQei4UgwUDbITmQ9MznnSztXIDk4QFy8HfAvBb0m7kvt8NwoDik?= =?us-ascii?Q?5HekfxrfoeB3gcT8JEkPcOqf0cPtRWUr8Njqq0CnPx9RnmJHveemPSOv8vx9?= =?us-ascii?Q?Bj1DWP2j6f0Ca1QCAp/hEtHoXpa7Aj4QpDyCp3UfJVHKzyBon2Q9vsEN1VV0?= =?us-ascii?Q?zKiB0UzQxTC9J2iq9Xo+OhoBswSrXP1OUehbgJP24quKwDbRAm/9fi7bEGx8?= =?us-ascii?Q?vKGmICkFc/fwcKXaZBspJI5y/PjKci7Hzlgpz8hx4/k8giD4r+qUfox6eG5v?= =?us-ascii?Q?xeh8lJgei4cPlu7mTcibgQMQoK5fu5JTLIT8RSGoU9DbKfrMwK+SQo+obl2O?= =?us-ascii?Q?O+yv4+QZxWnVna5Ql3/fPj+KoqFO239n/CBdoKZyQ4lM2/Io/fWqjP3uvGiZ?= =?us-ascii?Q?Pvdx4k6nW64bFpyMCy9Ux6MYDAb6xaEqWGdcDwAMfX1uPK3yXVTYY/aUgKLD?= =?us-ascii?Q?vrbnQ8N4NJwlaRovbeHxPUBOaafXZM8tJM6SlkcQeDMf0wNqMPb3ay2OQTK8?= =?us-ascii?Q?B2ldTv/kxOICZepjL6DTLbMej1xtGpjamRiv01KTdP2N0l5GjAuNxjqPAuHN?= =?us-ascii?Q?ag=3D=3D?= X-Forefront-PRVS: 0339F89554 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB1195; 23:Fvjg3eyllseZnFy2Xag5jlZGAWMeZFurvwMhP2G?= =?us-ascii?Q?2fN1YkLIEGP77ZaBEsIu2y0ohoEgpTwsr4tC2gTdIV28to2gp1VAXADQQb+o?= =?us-ascii?Q?Y7/hwuG1rEWblUWt8WVS2xATae+iApyL28dz1LzQtB85b6Au756EdPZsq3Qw?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ant-OriginalArrivalTime: 15 Jun 2017 09:00:09.6980 (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: CY1PR0301MB1195 Subject: [dpdk-dev] [PATCH 07/20 v2] 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, 15 Jun 2017 09:00:14 -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 7ef805b..f0ad576 100644 --- a/drivers/bus/fslmc/Makefile +++ b/drivers/bus/fslmc/Makefile @@ -67,6 +67,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 008aaa0..4f62e08 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; qbman_eq_desc_set_dca; -- 1.9.1