Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935013AbcKPURE (ORCPT ); Wed, 16 Nov 2016 15:17:04 -0500 Received: from mail-sn1nam01on0088.outbound.protection.outlook.com ([104.47.32.88]:10364 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934461AbcKPUQy (ORCPT ); Wed, 16 Nov 2016 15:16:54 -0500 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;nxp.com; dkim=none (message not signed) header.d=none; X-IncomingTopHeaderMarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:1026;Count:10 From: Stuart Yoder To: CC: , , , , , , , , Stuart Yoder , Laurentiu Tudor , Roy Pledge , Ioana Radulescu Subject: [PATCH v2 2/9] bus: fsl-mc: dpio: add DPIO driver overview document Date: Wed, 16 Nov 2016 14:09:52 -0600 Message-ID: <1479326999-29340-3-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1479326999-29340-1-git-send-email-stuart.yoder@nxp.com> References: <1479326999-29340-1-git-send-email-stuart.yoder@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131238010098398735;(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)(7916002)(2980300002)(1109001)(1110001)(339900001)(336004)(199003)(189002)(7416002)(626004)(6916009)(7846002)(110136003)(50226002)(6666003)(85426001)(87936001)(47776003)(305945005)(8676002)(5660300001)(4326007)(8666005)(2906002)(356003)(81156014)(97736004)(2950100002)(104016004)(86362001)(81166006)(8936002)(76176999)(50986999)(31430400001)(68736007)(105606002)(92566002)(36756003)(33646002)(2351001)(5003940100001)(48376002)(50466002)(77096005)(189998001)(106466001)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0301MB0748;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD005;1:VJvo1in6yYI7J2W6uMERTwlabNdUcvZdqV1mfiWeKPQKOtJ/WtvsbwxZ+DhGXEzSgVP9PuyNPfcOrwQH4hMX1STjptc8IB2w0OFCj+qCDQVlF4VPnhdXz2rJsEmu9fc9bTkjBt5sZDkAIkJnU2M87fafQWgsEB7f8N9JA+yWPM1Ji90mjhRD6r1i3pXFGhfUwIMvg1AXHMRqJqO82fKBIQuiBuO3lnNKDy6otr+StJ9OdPIiMdB/Mt08MpuuukMcYAvoMNegJR4O6NFBkVmM/YuBcByN3FtA/Yr9aMiXmx/xR0B28bDjbaDyOM9kXYct3B9JTo7ah/o6NgCOxnfachiFCPiNWXx9+seSTzahQIam3ru5Qw1/WsvgJDiGPd3t3Lt83aZf3YgyRlhDR8+oqgSfjrfLfCQJWPeUcejnB4M01NmPksNOmtMTGL7JqhotQebyeCtJHxBoXpHmXiIUQoABHj8j8O8FvTtQrHTaQzwEp5uI5VMJ7+tJEfTmglTE6ERxk7RfFjo5ett8LUiXWWeVgYVa1wSC9l4PxRGLyJhUHZ9P2ZY/4ZpwuyKJ+oa10lON+y7mBal3O4QiQ+Z+ILstYAcZjrhxOYkSjL8KnBp48YS19iIC9O705l/L2rm6IiXNUGQMvv9N/oum5Os3s3MIlwQzBgZWJpCU04zD/9/0z4MFwHXlWNF/XN/z/OSlv8gGh2Ol1R0aWO9kYXwI1mIz2zv4fcZg4QLou7PAPb0= MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0748;2:UKkzLP4puOvNr7nTnKSFD0h7T6skOf7FyizY31G7NhecDjkNM+cSxoX5Eq76czpiVWGReSUSqrODFAGsDycUdhI+zOxljiPErwLkpTAtKOtiSgL3UDP5lUChpNlYSIiq7+dgrhcr2GPfkx8HRNmAd81HNW1fu+K5cX7Yk6czYUE=;3:K7moYBPnN3Gj3kDSrJcYQf6atrwBb9XDBXNiIrqsTlSQHrLqZRkJmBbewd+Ku0kuwXluG7erXF/SdLlnXPqW2iAKmAsTamLVSC6qDAai54Yv6anU012sZJziz+tzkBnNdxwceSTLcQXx0DJ35rs/vHFF2HJtNFl8+IZwVVDCirzMe81/2/4F0fVfwdWKYCNyqBfoDZ0XuircJO35TXS5PsJ4wUkL3stLowpW79NdHl3CoeHRhrZl98QyD1Suwh4d5UEN9nBYJLPEfbMVXELItw==;25:7resyiAg0lSfoCrhTC1MwxNDoeyjpEOB2FoCwfsXUmVyFvibAeVTqJ8Xhdimravf8l4RNK8rq+l5oK2KIuc2arE8NeRryJT07eDWXmgtpuFZfZvlNexdS1QetUu6MXSe634mNT8EF+qw+b/eTgNRnEn2lgh9pw1U4B3TKQxC6WPYdrEfGUqDU+3mL7kN3LzUS1tyhTtbfnCoto1dT5l5jbU0ASl3v3qqflmzVh4q0M8ohrXBwmf/KdAi6XEZ9AA8Xn9HJ5NwfYAusFDrI62KhE8szP1ot891r/7QIaBXbaYucC1C/GbhAxJ3jgjGz4OgEdDxPLPVB0vInnJJ99NsM/ccXeGYnppiZJHpTW0c1m5gQuvqPIea+v7cpMCQe9RgnfUgK/qM5EGKxkF10Tjxrua4by75OSmixcfXDnFQPYtB8of/trxILl6Z9Tw8vomcqZms0Vi+DFBMHSDc45iuaQ== X-MS-Office365-Filtering-Correlation-Id: 17553d35-58c7-472e-ab0f-08d40e5d7f55 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR0301MB0748; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0748;31:DvgExABAZASXW75J+sGBr+oLQsZUs98UhS7ZOrowdqqMw/TXKHhuPmtVP4gzaFSKxkQbhDJaiyplnERxotSwO9sDNNclf7Ca3S9Y4pijshe+ev98dcz5yaU+gETD/jsTCT0syjvHl1L/cT6GqacFTWOPUmoyAvsWT0LLXMf5MXXMPWm2DQjzbVr6iFI/BmEaQQMzLVJG9+1+vLTjiSSLMNSFr3Xgoq2uM2BuZONqcpJIThNYM6DKsWUvll2h1saO974fPYLijr6IqbBXbEc+Yjd5BCFoiBAvK8gbBbvSwRQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095035)(601004)(2401047)(13024025)(13018025)(13023025)(5005006)(13017025)(8121501046)(13015025)(3002001)(10201501046)(6055026)(6096035);SRVR:CY1PR0301MB0748;BCL:0;PCL:0;RULEID:(400006);SRVR:CY1PR0301MB0748; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0748;4:+UlEqG5vri3kJfsd2QtZCejGRw/idMTwYJXjpMm+w6iQpl+XQwXIfxVo/xcoEUBWbWqkwBBfP3mwxbRLd3d0gReGg54sl61tgOdwLjQa/1bjSKRUYqpQjk2mwzMjXwGP1umeBnrpO3zHcRl0y4eZcnC1GlN9lwSlRgnsEhzsnMQEDHNAr1j63tl2dko51pcU1fOqXejJBVuePsl/YXqRsqzAefPKqOLyZTJAr3ox1KfA6XmjPr+wRn0olSQKUQFVtJlXKx7mOv2FmVNCy1s48u5LQ/I23n+r2qVDweTe1AMx72IhVxNLDHxhcyo9MgAjFDHp6heCQMbwOIFoqi4AXF9I/xGbPcQ8NuDD2e18JSyOVTKpS6ecQW4HI3oI7taf49kobLTgeP7bbomFvKfouUnUzVQ4UIDgv0tePlZeF7L9vJxWCLQagDZ+mPfYtmv34FQrnRluTz2dIaeJw7+QEY5oWhDfdv9N7P44USqESfTK2XcaJoRizUC5aX1A0KkR7iv1k4oLX/Ht1q14YphSyOT4mfauRRSNv6o4DXAyZdlrUGW/XyOr3rIYvUZ3Zi+SwAJNHoF73ilYwsuRqDdv4ZFKHoSer7W7oCvzVcg2eigk4og5X+ikv2aePeJvoVCOenlocVmznAFMgsKukVoqHA== X-Forefront-PRVS: 01283822F8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0301MB0748;23:s9GV9mGHiPbR0xti7bOrzasyi6aAvosVaERSmJV?= =?us-ascii?Q?npzH7z21gb5IPTbYwRn4u0bzTuQU4G9zdtSUpVL7wR54sd1SA/ipxV+lyV7x?= =?us-ascii?Q?gBDS0YpX3gr9lcLsNRPLzIjOgxn8UoYtm18maD3wTtKaZKqg89B46zqWrSrT?= =?us-ascii?Q?UMZQWlT76o+Ndi3JOnfpr49ND5mp7TyHTQHWwtevs+AfQe8PG1oPzrR7otmb?= =?us-ascii?Q?acMPPiLBDXVdg/foJk9vSHnsTFhUtua8w+NMVMzNoxzto60SpSkK3QkXPGUs?= =?us-ascii?Q?1DQQ/n8j7487Dv5mAHJYnhgoSQKjXWhUC3SYi+pMBiAdxg5JObnGy7qkn63b?= =?us-ascii?Q?JqEbCi0Do5CV+SlVL38Mvi7iYE6r+Jp+bXY/oq6WKjcUZwDX30SLk6QmHn+P?= =?us-ascii?Q?Zi0We+5Zlo5CZmD6YzfmHBsje3ygvyj6Hj6ExzEdBkwphWywEHv5eM1BpOsT?= =?us-ascii?Q?WQwpLW0qaUnH3N1FYEGn0S5ZXaH9sRmZN8gGZO+VcHYFxZT1f3QVOXunWs3T?= =?us-ascii?Q?yrgUXu7Y7ZEuPdo+BSolLBMfUDemwh16eUcstsowlPLrfu7dpvdB3NlJgT4t?= =?us-ascii?Q?qX926tjfZG9j9sFIiZB3ZvKUROpFgn18IlO42LHYe9h49j7p6JS6STUqgy1Q?= =?us-ascii?Q?hxW1f46KzNJV83J+nOH1A12Zpb+AwzF44iZ5CJv2dcqyGPs/luXRqlbRAZrM?= =?us-ascii?Q?8Ze0G5s2Q4j2UyOb1vAKmbt4MBoQ/j9rSAUrOjHxaCgP9Sbl/axlLP9M7rgG?= =?us-ascii?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lBa0t+nmN3x6SMMzdPxF4OW1PH4n;24:921So7Q7zVwSDkGlV4vKhaFlVWBwx5XFYPl07mYPP1vHDaNZskmXoKgv+RkvqvvKZi32LEGCoW34Zvs7u17IGyL2ji+hJI5OaWFO2ELl3L4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0748;7:yMNixVArPf9x09FvijsaDVQ+iWxL2VEOKbIyauR5MH4ciykSh+p5ZeYIf/9LFTaSCfuwz+GLH5vE5/xVvaJHpUebfAWLmKwn4F7INOoZQyf4I7ITTR3L51xgOBJ611v/KwajCSskDqOek9Qs7vyvh8RLi5/BHXtdrdbTbHdJqrt3EJaE6Q7Xg/94GmUAPPn/c/jHVrlp9YRq2+GQHth14c0KQuxE8K3pd6I8msqwTqvnxIhnTsguwFYzbqE05gwBv1xb6IV56rM3787PwTd0j0DkOhzsRghniFgezbZ/zCkmk/9BU7fTG5MlQHpteB9lc/lorn0pkdfC3L+bb5P3owm7pXqUvL2L4EDWvwPL1WI= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2016 20:16:49.4654 (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: CY1PR0301MB0748 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6443 Lines: 158 add document describing the dpio driver and it's role, components and major interfaces Signed-off-by: Stuart Yoder Cc: Laurentiu Tudor Cc: Roy Pledge Cc: Ioana Radulescu --- -v2 -no changes Documentation/dpaa2/dpio-driver.txt | 135 ++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 Documentation/dpaa2/dpio-driver.txt diff --git a/Documentation/dpaa2/dpio-driver.txt b/Documentation/dpaa2/dpio-driver.txt new file mode 100644 index 0000000..5c192b3 --- /dev/null +++ b/Documentation/dpaa2/dpio-driver.txt @@ -0,0 +1,135 @@ +Copyright (C) 2016 Freescale Semiconductor Inc. + +Introduction +------------ + +A DPAA2 DPIO (Data Path I/O) is a hardware object that provides +interfaces to enqueue and dequeue frames to/from network interfaces +and other accelerators. A DPIO also provides hardware buffer +pool management for network interfaces. + +This document provides an overview the Linux DPIO driver, its +subcomponents, and its APIs. + +See Documentation/dpaa2/overview.txt for a general overview of DPAA2 +and the general DPAA2 driver architecture in Linux. + +Driver Overview +--------------- + +The DPIO driver is bound to DPIO objects discovered on the fsl-mc bus and +provides services that: + A) allow other drivers, such as the Ethernet driver, to enqueue and dequeue + frames for their respective objects + B) allow drivers to register callbacks for data availability notifications + when data becomes available on a queue or channel + C) allow drivers to manage hardware buffer pools + +The Linux DPIO driver consists of 3 primary components-- + DPIO object driver-- fsl-mc driver that manages the DPIO object + DPIO service-- provides APIs to other Linux drivers for services + QBman portal interface-- sends portal commands, gets responses + + fsl-mc other + bus drivers + | | + +---+----+ +------+-----+ + |DPIO obj| |DPIO service| + | driver |---| (DPIO) | + +--------+ +------+-----+ + | + +------+-----+ + | QBman | + | portal i/f | + +------------+ + | + hardware + +The diagram below shows how the DPIO driver components fit with the other +DPAA2 Linux driver components: + +------------+ + | OS Network | + | Stack | + +------------+ +------------+ + | Allocator |. . . . . . . | Ethernet | + |(DPMCP,DPBP)| | (DPNI) | + +-.----------+ +---+---+----+ + . . ^ | + . . | | dequeue> + +-------------+ . | | + | DPRC driver | . +--------+ +------------+ + | (DPRC) | . . |DPIO obj| |DPIO service| + +----------+--+ | driver |-| (DPIO) | + | +--------+ +------+-----+ + | +------|-----+ + | | QBman | + +----+--------------+ | portal i/f | + | MC-bus driver | +------------+ + | | | + | /soc/fsl-mc | | + +-------------------+ | + | + =========================================|=========|======================== + +-+--DPIO---|-----------+ + | | | + | QBman Portal | + +-----------------------+ + + ============================================================================ + + +DPIO Object Driver (dpio-driver.c) +---------------------------------- + + The dpio-driver component registers with the fsl-mc bus to handle objects of + type "dpio". The implementation of probe() handles basic initialization + of the DPIO including mapping of the DPIO regions (the QBman SW portal) + and initializing interrupts and registering irq handlers. The dpio-driver + registers the probed DPIO with dpio-service. + +DPIO service (dpio-service.c, dpaa2-io.h) +------------------------------------------ + + The dpio service component provides queuing, notification, and buffers + management services to DPAA2 drivers, such as the Ethernet driver. A system + will typically allocate 1 DPIO object per CPU to allow queuing operations + to happen simultaneously across all CPUs. + + Notification handling + dpaa2_io_service_register() + dpaa2_io_service_deregister() + dpaa2_io_service_rearm() + + Queuing + dpaa2_io_service_pull_fq() + dpaa2_io_service_pull_channel() + dpaa2_io_service_enqueue_fq() + dpaa2_io_service_enqueue_qd() + dpaa2_io_store_create() + dpaa2_io_store_destroy() + dpaa2_io_store_next() + + Buffer pool management + dpaa2_io_service_release() + dpaa2_io_service_acquire() + +QBman portal interface (qbman-portal.c) +--------------------------------------- + + The qbman-portal component provides APIs to do the low level hardware + bit twiddling for operations such as: + -initializing Qman software portals + -building and sending portal commands + -portal interrupt configuration and processing + + The qbman-portal APIs are not public to other drivers, and are + only used by dpio-service. + +Other (dpaa2-fd.h, dpaa2-global.h) +---------------------------------- + + Frame descriptor and scatter-gather definitions and the APIs used to + manipulate them are defined in dpaa2-fd.h. + + Dequeue result struct and parsing APIs are defined in dpaa2-global.h. -- 1.9.0