From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0088.outbound.protection.outlook.com [104.47.42.88]) by dpdk.org (Postfix) with ESMTP id 5DDC97CC4 for ; Tue, 4 Jul 2017 16:35:43 +0200 (CEST) Received: from CY1PR03CA0041.namprd03.prod.outlook.com (10.174.128.51) by BLUPR03MB471.namprd03.prod.outlook.com (10.141.78.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Tue, 4 Jul 2017 14:35:41 +0000 Received: from BL2FFO11FD045.protection.gbl (2a01:111:f400:7c09::194) by CY1PR03CA0041.outlook.office365.com (2603:10b6:600::51) 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; Tue, 4 Jul 2017 14:35:41 +0000 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; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD045.mail.protection.outlook.com (10.173.161.207) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1199.9 via Frontend Transport; Tue, 4 Jul 2017 14:35:40 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v64EZM6p016426; Tue, 4 Jul 2017 07:35:38 -0700 From: Shreyansh Jain To: CC: , Date: Tue, 4 Jul 2017 20:13:58 +0530 Message-ID: <1499179471-19145-8-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499179471-19145-1-git-send-email-shreyansh.jain@nxp.com> References: <1497591668-3320-1-git-send-email-shreyansh.jain@nxp.com> <1499179471-19145-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131436525409325051; (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)(39840400002)(39400400002)(39860400002)(39850400002)(39410400002)(39450400003)(39380400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(47776003)(36756003)(8936002)(50466002)(5003940100001)(189998001)(2906002)(5660300001)(50986999)(81166006)(33646002)(76176999)(8676002)(305945005)(48376002)(356003)(68736007)(626005)(53936002)(77096006)(104016004)(2950100002)(6666003)(6916009)(69596002)(106466001)(50226002)(8656002)(110136004)(38730400002)(105606002)(4326008)(575784001)(86362001)(54906002)(85426001)(2351001)(498600001)(2004002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB471; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2FFO11FD045; 1:gtea50JLxL/eTyiL67X5lE0EQTYN/o3ZbECKKVJnrO?= =?us-ascii?Q?SVNT6bQuSJnMbX1JxfrzlOCRHH5oirB5a/RFHLmX87ch9YTqwlrNhzq6ktH+?= =?us-ascii?Q?auhoGFRrDwwVy5ttvpY/8wskdsA+GV4g51xjngNiprUKTI3lyWsL5zk4ClpG?= =?us-ascii?Q?4PJ38cfc+bGkBHABEGoaaM7Y3sH7ObrF7azK8T1hgYMWkBt3Os5/Jd8l2X+e?= =?us-ascii?Q?auf8GyIL8bteaGmDnaGcbNPHWIkXIuUjVQh6YgVCI3bPsMmLMWEnfLfqBpQy?= =?us-ascii?Q?PBaGLPn3OMei64BCN58qC8YDN8bGrPX0UB1TlFqXfA789e3xDVKMp1gSzVfc?= =?us-ascii?Q?OqNW6Kb24Gej+bZiWQ1W3CAGlHogCnucdIA705NmmtPBO07jOUZAjDomdXXv?= =?us-ascii?Q?P+D9+oV43Hrt4TdmlG905sZ64DcNLMs+C4Y0dTrrZqdSOOtWIwdviKhwISff?= =?us-ascii?Q?JQO/vnJqETTwpBhqGYEEZk4TLegbrUXZ62DOPF6U3fXKB3Tp3SRHv1qxRAh9?= =?us-ascii?Q?pmTvKl08QG3Wg7YztiK45z7nrCq4EQzQYnjj03/Dv/oc1b7ocVIlg3vTQU+p?= =?us-ascii?Q?rf1NTb/oPisMYNJZHCSe2Tpqx0F/HtV5BrCxKseMnUYnYO5H45FVnK2B3Lhw?= =?us-ascii?Q?dRU9pp2sY5iehzJlnWYD3mSMkYdqYiRLBOI2xVO3/COMmWIdRAuQ9VN829Rc?= =?us-ascii?Q?1EZTSA2sE0azyPbVPlrqM66JI3Zmx/Qwj/k79sZ+HY/+CPAp72u1WhWIKXAd?= =?us-ascii?Q?ayiXM9CBLqwsv3iAQZHjiZicGQqMnCQYz/SU0QX3SUggcJ+BgjbxOQo7Y91g?= =?us-ascii?Q?ltAgxYVcnz90SKeLCvZM5lRaXKws+9KIcXAibL2vmwCEm8js6C0NKfYPIHCK?= =?us-ascii?Q?mdGxPmEsvOrLL5lLXjmAbtCiC7qPzXcFfd4DgKqqMKtrjxZi03y1L6+Z0Drb?= =?us-ascii?Q?hLZZJqa4dzDfze4yP+tR2/IrffwcBSaXkTF1A+FMHzFeobSfeAYuzb+tZG4p?= =?us-ascii?Q?gtLvYmBFuNmtAYmkNtOW1ealvXMUl4hqFNyEhF/gq14fMHlsbV2GdSmekM+R?= =?us-ascii?Q?qovbqUPqjmuYsTJLDLT6Glgfd7i8lPm6tN+D2+FdnIbodLdg=3D=3D?= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7664f417-5102-4d67-cffb-08d4c2e9f1ff 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:BLUPR03MB471; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB471; 3:mNFDKuEyeVFnO6iDmiI1LiWbuvGjmFGz4Q/MUtr2N55Ua5Gwfm8rRJvCPoi+9IQkYCovDDZCBaYZ/Y6jj3wrQEhj6xH1wVD4u2eNjXS7+LQDHJTURftKNnskPGaCKEbY8LYkYMN0GPsunFw/UIEkHG4JL+TL914DiDUWbbSoQ2uHj7JibZFV72tN3CKQ/mtGstJWAxozNXyApFGzkSanuNblB3rc6iqcUMfW7k4/nr0adScxujr22p4msGSpuz204zBhwxlmupSZ4+lyj4gWjcTv6yvDDXjcFCdrS4OKofDCs7FmpLPYBdIP+5B7sHC+0wwMuMF8zUrqtARRiX81+KWt8bNxNGCk66jRrgsWc3DXUftKHJcWw32JU1VRF4G0NTMdK/yQBuJHs5Tb9WWegGKqiHLvNnUz8SoxRBMPRLljR+VS+gtVDP+WMtJPk+U6icS7JoFKRFv7d/pYfhok2VUGQLvBWGdV5N+7zwO3A5jfztAOOkZQq6bnkoncgHMyrqQA56BOzotkmAmcaK6ZsJaG5CYNmi4sMCLlk+9pv1TgdCGS/nbDTjRuC8jVjRklEoegVjq/PEwor64pwfZP35/s9XBKq/Rm9xX97lMVoAS4jCQobV40uOb6dqhrqC4bbrv4AgahLXP2eH7qud1R8SXkvNx1tkD9MY437zNvScEXL2XCPiV03I2v3b3ivCzFKyD1YC6acqroT3fYeKt8j9vki2ic158LnlvWVXkvzLplRgI/yapMe7uJWjwSVewr53K75rxXZYuWgu/NVvqaynFyImvcLb1XanCQYwu4CvsnEH0nT/bJN1POUpYvqI6eNt6elDCyaOPHJS0+tsGAFeBIM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; 31:XEpiGHJbf/ssLHIcY1Mns7kh2ewXvrpsBWhBEQB0nT7nQbx4cDGY4Kau094oBoz9XLSfgLDEF7BuknlxpH6qMjvm8GiFwCDtB1WnbSl+KBtUqNDu4x+7FBvELYNECvkhe2RyEYmZPAy/MmNiZcRb0YeyPzOKM+486QfoltPsqJTUWD827FyS4A7QyU6ArXWK7rYFC0jfvG0lkHEnnv8YFtX5XFXWt69+jn/YNdfyH85GEO1imlJMxJODQD8YMzWktxOISuLCNy9X9BJ9fTJNdnzZerfVYwpVJyIZeYRkQujYZE8Bzg7l+2IkBji8NpLn2gSZKjHteJG9icv1kMmJONChrnH8ZM07+/fheuuc5T9QDXe9afKYRVqJStNTVmrcJIlo5kwVsXMAjsDJDs0mnIuGPVEgkpj0SHRuZTFKrjv4QJQpGEJKUzaQLnIjBcbaapZ+3Lf19UEo+z7lvjs5Es6EDsbmL5KPHyua64HjMBNieKbruaQ+Hf/yB0wot1CxIirWirWJ8ovLJJbc+UQ7bWGUKWoSx6jaZ2upiplAcnuP86d/QfibgrUyZOcqGiORPNYQuc0ZubztlEprhgZO6jySo0cZGuzM6/hXi6EYdykbrqtNGyutrjongYNZ4EK6kGkGy/YF8mmO1Q32XarvxW2LD0TQ1Ue1pECcmUftRrRK9dm3QC5gzrOFQRy28Mqq6jM5xHeAJUPa3pHIy6peHA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(236129657087228)(35073007944872)(185117386973197)(227817650892897)(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)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123565025)(20161123561025)(20161123559100)(20161123563025)(20161123556025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR03MB471; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR03MB471; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB471; 4:SaK8sRNo6QXtRVYNfbwz6+V7mRfLjYmc4GxN6cOa4EF?= =?us-ascii?Q?MjdjzGus0Q17266nNEStNYeKf5tnKgmeR9D+S4ervzHa7//Yd5KSHRz5Jskg?= =?us-ascii?Q?fzzwBn+T2la16LjYqKuCpmg3qcshZiPRaOaGwYDd9851KMy4lcDOetOIqs9i?= =?us-ascii?Q?/4tD+WE9Wigh2aebNjGP6S0ikf2ZJEuH6SKB87sTde4FC6z+RuWqKa+1a/IX?= =?us-ascii?Q?1akyAyhiQXvmrKmPLiIfrhn6QfEyrJD9SLKIk+mpOOWnW5OuVw+p5Bv0AimG?= =?us-ascii?Q?pE0kt5PyVsc7hUYc86Qkl2Hu18+skaGYya7WOHy/PCm3sAgs90DyTN5HzSel?= =?us-ascii?Q?bFaIfztnD2fq8beNSNWTxbbLdOAOHjG8sYsmhLvL2NY8fiQZu+4y+miX1jYU?= =?us-ascii?Q?mOzVZnypYb4yDxZBqnlXSlP+YghdeEiuhEUY4AmuWVX0xv/bB2ljdKH2Bqcn?= =?us-ascii?Q?A/R62shsTy3kTCYDS9aUifUpHSCCZkJF0XdmHzsyxp1T1tV5WeSpyKRiTjyv?= =?us-ascii?Q?azxVCnpjZdbqRlXt3wRkJunAHdoRUkotL57y1rgIZbKVXwR9rH0Q4AozFQzN?= =?us-ascii?Q?j5P2ZhFlVGiY/QKwVPsLrkIDpzDqNy3HSHnMRlyl49LSRnog9kDzdFcOaipE?= =?us-ascii?Q?3Q4wxfjBlBfLR7v8fNeMg79k0pzCFwRYXcOi2O6EvnGWV9H43llP899zxuTg?= =?us-ascii?Q?5Q9G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efront-PRVS: 0358535363 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB471; 23:9pkJuuqoQh3Mv5/w1e+6fNCimkoIPbkhm1VUWu1uL+?= =?us-ascii?Q?Zut8O/lf3h6u6Uq2tyinSj32GpBRzPa0IH6rHXx6mAkzFcN/5P+xzuYYBMyp?= =?us-ascii?Q?zQUPfGjWwB/prnaFPgWIXJ+kz3HtDGs+D6O8qGcLD7pnaTEylDKQN6PFtaUf?= =?us-ascii?Q?gmsbquD7wdXWpG9MYOLBybq4bH57zYTYg3Njq6plifjFoWwxqX+f2i/AKt0X?= =?us-ascii?Q?P7yeBr3jS54LhTnmEfh8bZCqtq7no44TJ9p5tQlvA9MJ6ni5UVzQcxkwALuR?= =?us-ascii?Q?4M8q0ZulfsYSM8Yb96rovtvUY+Pd45GSV6L5TxkrbKIdVASbE5/y4W1x1scW?= =?us-ascii?Q?ni+87qgwmjWpMcTZA+B7N2m7rRWLOkuFbjy5brGAP6w+So5AAGrAGZge8pg2?= =?us-ascii?Q?4sCWiLydUY4oAZdAE2Pm58rT+N8eDzaavfQbyinv4XB8+r4Mswy4iZWRTc5x?= =?us-ascii?Q?vF35N2l6OQRPBgNY8wcq/sl7+uxjyZWb8gur++G0ho5RN7NBd77sdFbezXt1?= =?us-ascii?Q?FJXRGB67y9AMTHDr6iMhM08gnlrZI6PZjeJY0Jm8P37uZhfiuUuUNRUdGsrs?= =?us-ascii?Q?FZFOvsZgzWw8hHFAk45rd3DSh78pWdUuhgTqpFSkWrb6452ht8rgEm6SDIuo?= =?us-ascii?Q?v4w9ISq6sOODK1bchgp4yiktftR4NWybSdfJQIhadQb5ltPlzWodcUPVP1rm?= =?us-ascii?Q?X4u6qzLUEOWeFcn6YYpQfhMcDEu0l9b3+KI9zCI3gMG6rd3Sq6RgN6GE7xun?= =?us-ascii?Q?sw78YosfxzO+iqX0bEmfcYUywSEgawdAKI4rsZIIYNcN0hhoSCesJitdh7UP?= =?us-ascii?Q?dolK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uf6j09oJLpo0BcyIxmgimjfD85pZsezaqID0MQuQuDLbCEPH5yxGwcVRgmlUwVwWJwpTTAPsLoLM9YyAcNVz9l0MSnz0neJr3ew7X7P74XHDqfaHnL2z0DRlNFszfpF+zbV2boSjmflsgMhhXabKq1n735jceLo6gkwQYGtV8/AGnQgrMa9WdKLbIdlCJrqLNvimuOs0zoUNUlpMcuiECCmli7dXdFM4L1v+XcNEHsHMcx+LlVCenFw+xcyfTZNWJNEl625Ja+/aOfTJ5+ki4Xv88xjHMB0QrHLE9MSY0xmVh+pYZmY7gxZpmBUAcUu3MmaycdU= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2017 14:35:40.6829 (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: BLUPR03MB471 Subject: [dpdk-dev] [PATCH v2 07/40] bus/dpaa: enable DPAA IOCTL portal driver 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: Tue, 04 Jul 2017 14:35:44 -0000 Userspace applications interact with DPAA blocks using this IOCTL driver. Signed-off-by: Geoff Thorpe Signed-off-by: Hemant Agrawal Signed-off-by: Shreyansh Jain --- drivers/bus/dpaa/Makefile | 4 +- drivers/bus/dpaa/base/qbman/process.c | 331 ++++++++++++++++++++++++++++++++++ drivers/bus/dpaa/include/fsl_usd.h | 88 +++++++++ drivers/bus/dpaa/include/process.h | 107 +++++++++++ 4 files changed, 529 insertions(+), 1 deletion(-) create mode 100644 drivers/bus/dpaa/base/qbman/process.c create mode 100644 drivers/bus/dpaa/include/fsl_usd.h create mode 100644 drivers/bus/dpaa/include/process.h diff --git a/drivers/bus/dpaa/Makefile b/drivers/bus/dpaa/Makefile index 94849b8..22218e2 100644 --- a/drivers/bus/dpaa/Makefile +++ b/drivers/bus/dpaa/Makefile @@ -51,6 +51,7 @@ CFLAGS += -D _GNU_SOURCE CFLAGS += -I$(RTE_BUS_DPAA)/ CFLAGS += -I$(RTE_BUS_DPAA)/include +CFLAGS += -I$(RTE_BUS_DPAA)/base/qbman CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include @@ -68,6 +69,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += \ base/fman/fman.c \ base/fman/fman_hw.c \ base/fman/of.c \ - base/fman/netcfg_layer.c + base/fman/netcfg_layer.c \ + base/qbman/process.c include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/bus/dpaa/base/qbman/process.c b/drivers/bus/dpaa/base/qbman/process.c new file mode 100644 index 0000000..b8ec539 --- /dev/null +++ b/drivers/bus/dpaa/base/qbman/process.c @@ -0,0 +1,331 @@ +/*- + * 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 2011-2016 Freescale Semiconductor Inc. + * 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. + * + * 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 + +#include "process.h" + +#include + +/* As higher-level drivers will be built on top of this (dma_mem, qbman, ...), + * it's preferable that the process driver itself not provide any exported API. + * As such, combined with the fact that none of these operations are + * performance critical, it is justified to use lazy initialisation, so that's + * what the lock is for. + */ +static int fd = -1; +static pthread_mutex_t fd_init_lock = PTHREAD_MUTEX_INITIALIZER; + +static int check_fd(void) +{ + int ret; + + if (fd >= 0) + return 0; + ret = pthread_mutex_lock(&fd_init_lock); + assert(!ret); + /* check again with the lock held */ + if (fd < 0) + fd = open(PROCESS_PATH, O_RDWR); + ret = pthread_mutex_unlock(&fd_init_lock); + assert(!ret); + return (fd >= 0) ? 0 : -ENODEV; +} + +#define DPAA_IOCTL_MAGIC 'u' +struct dpaa_ioctl_id_alloc { + uint32_t base; /* Return value, the start of the allocated range */ + enum dpaa_id_type id_type; /* what kind of resource(s) to allocate */ + uint32_t num; /* how many IDs to allocate (and return value) */ + uint32_t align; /* must be a power of 2, 0 is treated like 1 */ + int partial; /* whether to allow less than 'num' */ +}; + +struct dpaa_ioctl_id_release { + /* Input; */ + enum dpaa_id_type id_type; + uint32_t base; + uint32_t num; +}; + +struct dpaa_ioctl_id_reserve { + enum dpaa_id_type id_type; + uint32_t base; + uint32_t num; +}; + +#define DPAA_IOCTL_ID_ALLOC \ + _IOWR(DPAA_IOCTL_MAGIC, 0x01, struct dpaa_ioctl_id_alloc) +#define DPAA_IOCTL_ID_RELEASE \ + _IOW(DPAA_IOCTL_MAGIC, 0x02, struct dpaa_ioctl_id_release) +#define DPAA_IOCTL_ID_RESERVE \ + _IOW(DPAA_IOCTL_MAGIC, 0x0A, struct dpaa_ioctl_id_reserve) + +int process_alloc(enum dpaa_id_type id_type, uint32_t *base, uint32_t num, + uint32_t align, int partial) +{ + struct dpaa_ioctl_id_alloc id = { + .id_type = id_type, + .num = num, + .align = align, + .partial = partial + }; + int ret = check_fd(); + + if (ret) + return ret; + ret = ioctl(fd, DPAA_IOCTL_ID_ALLOC, &id); + if (ret) + return ret; + for (ret = 0; ret < (int)id.num; ret++) + base[ret] = id.base + ret; + return id.num; +} + +void process_release(enum dpaa_id_type id_type, uint32_t base, uint32_t num) +{ + struct dpaa_ioctl_id_release id = { + .id_type = id_type, + .base = base, + .num = num + }; + int ret = check_fd(); + + if (ret) { + fprintf(stderr, "Process FD failure\n"); + return; + } + ret = ioctl(fd, DPAA_IOCTL_ID_RELEASE, &id); + if (ret) + fprintf(stderr, "Process FD ioctl failure type %d base 0x%x num %d\n", + id_type, base, num); +} + +int process_reserve(enum dpaa_id_type id_type, uint32_t base, uint32_t num) +{ + struct dpaa_ioctl_id_reserve id = { + .id_type = id_type, + .base = base, + .num = num + }; + int ret = check_fd(); + + if (ret) + return ret; + return ioctl(fd, DPAA_IOCTL_ID_RESERVE, &id); +} + +/***************************************/ +/* Mapping and using QMan/BMan portals */ +/***************************************/ + +#define DPAA_IOCTL_PORTAL_MAP \ + _IOWR(DPAA_IOCTL_MAGIC, 0x07, struct dpaa_ioctl_portal_map) +#define DPAA_IOCTL_PORTAL_UNMAP \ + _IOW(DPAA_IOCTL_MAGIC, 0x08, struct dpaa_portal_map) + +int process_portal_map(struct dpaa_ioctl_portal_map *params) +{ + int ret = check_fd(); + + if (ret) + return ret; + + ret = ioctl(fd, DPAA_IOCTL_PORTAL_MAP, params); + if (ret) { + perror("ioctl(DPAA_IOCTL_PORTAL_MAP)"); + return ret; + } + return 0; +} + +int process_portal_unmap(struct dpaa_portal_map *map) +{ + int ret = check_fd(); + + if (ret) + return ret; + + ret = ioctl(fd, DPAA_IOCTL_PORTAL_UNMAP, map); + if (ret) { + perror("ioctl(DPAA_IOCTL_PORTAL_UNMAP)"); + return ret; + } + return 0; +} + +#define DPAA_IOCTL_PORTAL_IRQ_MAP \ + _IOW(DPAA_IOCTL_MAGIC, 0x09, struct dpaa_ioctl_irq_map) + +int process_portal_irq_map(int ifd, struct dpaa_ioctl_irq_map *map) +{ + map->fd = fd; + return ioctl(ifd, DPAA_IOCTL_PORTAL_IRQ_MAP, map); +} + +int process_portal_irq_unmap(int ifd) +{ + return close(ifd); +} + +struct dpaa_ioctl_raw_portal { + /* inputs */ + enum dpaa_portal_type type; /* Type of portal to allocate */ + + uint8_t enable_stash; /* set to non zero to turn on stashing */ + /* Stashing attributes for the portal */ + uint32_t cpu; + uint32_t cache; + uint32_t window; + /* Specifies the stash request queue this portal should use */ + uint8_t sdest; + + /* Specifes a specific portal index to map or QBMAN_ANY_PORTAL_IDX + * for don't care. The portal index will be populated by the + * driver when the ioctl() successfully completes. + */ + uint32_t index; + + /* outputs */ + uint64_t cinh; + uint64_t cena; +}; + +#define DPAA_IOCTL_ALLOC_RAW_PORTAL \ + _IOWR(DPAA_IOCTL_MAGIC, 0x0C, struct dpaa_ioctl_raw_portal) + +#define DPAA_IOCTL_FREE_RAW_PORTAL \ + _IOR(DPAA_IOCTL_MAGIC, 0x0D, struct dpaa_ioctl_raw_portal) + +static int process_portal_allocate(struct dpaa_ioctl_raw_portal *portal) +{ + int ret = check_fd(); + + if (ret) + return ret; + + ret = ioctl(fd, DPAA_IOCTL_ALLOC_RAW_PORTAL, portal); + if (ret) { + perror("ioctl(DPAA_IOCTL_ALLOC_RAW_PORTAL)"); + return ret; + } + return 0; +} + +static int process_portal_free(struct dpaa_ioctl_raw_portal *portal) +{ + int ret = check_fd(); + + if (ret) + return ret; + + ret = ioctl(fd, DPAA_IOCTL_FREE_RAW_PORTAL, portal); + if (ret) { + perror("ioctl(DPAA_IOCTL_FREE_RAW_PORTAL)"); + return ret; + } + return 0; +} + +int qman_allocate_raw_portal(struct dpaa_raw_portal *portal) +{ + struct dpaa_ioctl_raw_portal input; + int ret; + + input.type = dpaa_portal_qman; + input.index = portal->index; + input.enable_stash = portal->enable_stash; + input.cpu = portal->cpu; + input.cache = portal->cache; + input.window = portal->window; + input.sdest = portal->sdest; + + ret = process_portal_allocate(&input); + if (ret) + return ret; + portal->index = input.index; + portal->cinh = input.cinh; + portal->cena = input.cena; + return 0; +} + +int qman_free_raw_portal(struct dpaa_raw_portal *portal) +{ + struct dpaa_ioctl_raw_portal input; + + input.type = dpaa_portal_qman; + input.index = portal->index; + input.cinh = portal->cinh; + input.cena = portal->cena; + + return process_portal_free(&input); +} + +int bman_allocate_raw_portal(struct dpaa_raw_portal *portal) +{ + struct dpaa_ioctl_raw_portal input; + int ret; + + input.type = dpaa_portal_bman; + input.index = portal->index; + input.enable_stash = 0; + + ret = process_portal_allocate(&input); + if (ret) + return ret; + portal->index = input.index; + portal->cinh = input.cinh; + portal->cena = input.cena; + return 0; +} + +int bman_free_raw_portal(struct dpaa_raw_portal *portal) +{ + struct dpaa_ioctl_raw_portal input; + + input.type = dpaa_portal_bman; + input.index = portal->index; + input.cinh = portal->cinh; + input.cena = portal->cena; + + return process_portal_free(&input); +} diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h new file mode 100644 index 0000000..4ff48c6 --- /dev/null +++ b/drivers/bus/dpaa/include/fsl_usd.h @@ -0,0 +1,88 @@ +/*- + * 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 2010-2011 Freescale Semiconductor, Inc. + * All rights reserved. + * + * 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_USD_H +#define __FSL_USD_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define QBMAN_ANY_PORTAL_IDX 0xffffffff + +/* Obtain and free raw (unitialized) portals */ + +struct dpaa_raw_portal { + /* inputs */ + + /* set to non zero to turn on stashing */ + uint8_t enable_stash; + /* Stashing attributes for the portal */ + uint32_t cpu; + uint32_t cache; + uint32_t window; + + /* Specifies the stash request queue this portal should use */ + uint8_t sdest; + + /* Specifes a specific portal index to map or QBMAN_ANY_PORTAL_IDX + * for don't care. The portal index will be populated by the + * driver when the ioctl() successfully completes. + */ + uint32_t index; + + /* outputs */ + uint64_t cinh; + uint64_t cena; +}; + +int qman_allocate_raw_portal(struct dpaa_raw_portal *portal); +int qman_free_raw_portal(struct dpaa_raw_portal *portal); + +int bman_allocate_raw_portal(struct dpaa_raw_portal *portal); +int bman_free_raw_portal(struct dpaa_raw_portal *portal); + +#ifdef __cplusplus +} +#endif + +#endif /* __FSL_USD_H */ diff --git a/drivers/bus/dpaa/include/process.h b/drivers/bus/dpaa/include/process.h new file mode 100644 index 0000000..989ddcd --- /dev/null +++ b/drivers/bus/dpaa/include/process.h @@ -0,0 +1,107 @@ +/*- + * 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 2010-2011 Freescale Semiconductor, Inc. + * All rights reserved. + * + * 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 __PROCESS_H +#define __PROCESS_H + +#include + +/* The process device underlies process-wide user/kernel interactions, such as + * mapping dma_mem memory and providing accompanying ioctl()s. (This isn't used + * for portals, which use one UIO device each.). + */ +#define PROCESS_PATH "/dev/fsl-usdpaa" + +/* Allocation of resource IDs uses a generic interface. This enum is used to + * distinguish between the type of underlying object being manipulated. + */ +enum dpaa_id_type { + dpaa_id_fqid, + dpaa_id_bpid, + dpaa_id_qpool, + dpaa_id_cgrid, + dpaa_id_max /* <-- not a valid type, represents the number of types */ +}; + +int process_alloc(enum dpaa_id_type id_type, uint32_t *base, uint32_t num, + uint32_t align, int partial); +void process_release(enum dpaa_id_type id_type, uint32_t base, uint32_t num); + +int process_reserve(enum dpaa_id_type id_type, uint32_t base, uint32_t num); + +/* Mapping and using QMan/BMan portals */ +enum dpaa_portal_type { + dpaa_portal_qman, + dpaa_portal_bman, +}; + +struct dpaa_ioctl_portal_map { + /* Input parameter, is a qman or bman portal required. */ + enum dpaa_portal_type type; + /* Specifes a specific portal index to map or 0xffffffff + * for don't care. + */ + uint32_t index; + + /* Return value if the map succeeds, this gives the mapped + * cache-inhibited (cinh) and cache-enabled (cena) addresses. + */ + struct dpaa_portal_map { + void *cinh; + void *cena; + } addr; + /* Qman-specific return values */ + u16 channel; + uint32_t pools; +}; + +int process_portal_map(struct dpaa_ioctl_portal_map *params); +int process_portal_unmap(struct dpaa_portal_map *map); + +struct dpaa_ioctl_irq_map { + enum dpaa_portal_type type; /* Type of portal to map */ + int fd; /* File descriptor that contains the portal */ + void *portal_cinh; /* Cache inhibited area to identify the portal */ +}; + +int process_portal_irq_map(int fd, struct dpaa_ioctl_irq_map *irq); +int process_portal_irq_unmap(int fd); + +#endif /* __PROCESS_H */ -- 2.7.4