Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761649AbcLAWu4 (ORCPT ); Thu, 1 Dec 2016 17:50:56 -0500 Received: from mail-sn1nam01on0042.outbound.protection.outlook.com ([104.47.32.42]:64403 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751601AbcLAWt3 (ORCPT ); Thu, 1 Dec 2016 17:49:29 -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:903;Count:10 From: Stuart Yoder To: CC: , , , , , , , , , Stuart Yoder Subject: [PATCH v3 2/9] bus: fsl-mc: dpio: add DPIO driver overview document Date: Thu, 1 Dec 2016 16:41:27 -0600 Message-ID: <1480632094-3621-3-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1480632094-3621-1-git-send-email-stuart.yoder@nxp.com> References: <1480632094-3621-1-git-send-email-stuart.yoder@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131251061356576990;(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)(336004)(339900001)(189002)(199003)(106466001)(6666003)(48376002)(105606002)(189998001)(86362001)(110136003)(33646002)(38730400001)(8936002)(76176999)(626004)(97736004)(92566002)(50226002)(2351001)(50986999)(2906002)(39450400002)(77096006)(68736007)(5003940100001)(81156014)(7416002)(50466002)(104016004)(39380400001)(39410400001)(4326007)(39400400001)(7846002)(36756003)(2950100002)(8666005)(81166006)(85426001)(8676002)(5660300001)(31430400001)(356003)(47776003)(6916009)(305945005)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB0750;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD032;1:HZoXTN7Q88Xay31zxX2/Esp12C1R34pS5I9ipk7Nw9MWkgFeOzvn+k3U+vPNgbeV3hBcravokVa+jJIZGVoGG3wtJwJKLzIFNSqaDP6hua49O486vZNqkdhkuIOhqnxKu7LT5ZwDZ43D0jA0Z6hXkS7vGZiM18e93AUVz5MwM/ltw7rq2piJ2SOyUhWs332h0iIvKzZ0R1taMMGFk15dgJMYgipWQSrZUtVMks2TM0EgyKxkTGnB5lk7IJ3XQKG0D36U3qFDpbR93EN3RVqRVyg5wAH9DleIhOsuvv0fBPjONQoCGMiRTwxVkl+3oiLjmhZ3KLiCl24XQj72p5LHUayT+/SnixbcVdszKFzBM6MIlE/dCr6FKpdcLHx8GEfq21Y4yXWAVlEm4jquPfKplBEmRHvZWkrQC4ycMS8oK9Fvyj/tR9BmxvwQ62a/MHx2EBsm3BGHffc62xO5rpOl/s8fvlxOhIMogmMc2NA9ouxYoewuNSKYUI9HXDyV9oexb6Ye0l48siaPjy8kK9UFAnreVkcok+5/wElGuGfc/3E0Dcf7nqg3RyA+pq4ru+JiM5HyKYGajih5TA4e3o7RSxO8guPdEkHfGbB7H5AtS5MeXGFIyChRkjuWaGG6e8PO2f8UKHbUY0Quf8MV0jmNpk7XxoHffmSSKCvAL7z0gWQNGvSNNXgnhce7QBxwvRGuXWORa0q9n7rSq5hNGqoV1tKqOBJOZurZqcZCIwdqSoM= MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;2:XyZTpoLA8V9OsXBMFscDUTVcM7v44Z2a3/WrwYA7mJLNP+GdDSlkmq7FR1WXt8WKGcLKq4poLfssoX+HJoVgGg97gsRGTSFILOf/g4F/ywEmZuw2Bw7bXrOEX1VHhiRE6wuJbL6qmQjjOGaFXG+BWyLPNtq3B2rihNYXUvAVYYU=;3:wWqq42+FBYfRd1ZfV50tlSEVk19XkF+SDSZYCfOZCoW4JeCObgyuzGHWko7mTgDPG0+WHiVuOYOk6Tvb3CLVpX2aCwDXZJvt3YC5DYyky5h8i3e7WRS3BDuh1iUfUZgInEFGgVs3XJ7lf+4uKwo4FobQU0iELXKjKTYS1goG1Yiw1/dT6oH9ToK9rFlqRloCEnHkCNoYwg9yvDkiAzmRbGntQeeMkM1L3t+6r/rdK8G5eD0B03Lpaeti0+/8PUJrrscVcQ+9B6reOy3ApSAidw== X-MS-Office365-Filtering-Correlation-Id: 5c68fa9e-a1fb-4e83-35d6-08d41a3c3af1 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM2PR0301MB0750; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;25:w/to3NCMPT6eH9qvJgHdWbq5eZH6b9RmiaLmZ27NcdsjourW4HCBWwZ4Pq9loDIvpqdFgR4FYlg2CgUuDbXhKE5LGiUuo2d3juBSo35XZk6FMF4seKcWdcqOE2QrKQuK4MW+tZMiHYJ1/XSfzIE4rAWJG4X2fWtDgoxRkvrNxmRms0gWrc/5Mx7SfQMZKA2Sl89IUO2ixdQfEzF9zeGTliu6afPW+9O40Yx6yMvSqXuKnVGvCVikAmYb3wTviHTclU+D/ulQRjCrDZgUGTxbJm9CFw51MEGJcyRCf9v3BkziWJ/Jk3ahkCJKl6uwt17+Sag8C0+HDrxB0anBv6WHmWtOl81bx2K6acATF1gCwzkuTau/l5Cw5G2rjNJrwI1Q/ux3AkObMF5b7hUUDtkn19fYGL/zXcl8a+FlcHk5LMzt17ph1wvkgZnBY4KYZBeb+aYOZn2NxYmv2ciFAyUPMzyB8HHzrciJtiMurexEUAZ8it5YgA0isdEA89ViVp73QTIkZRefxHnRUpHkUV7WRIq38cs3zMjVwRfxB2B2sw/OLROgUFxOBxW9dWbWg/VA4UBCh1/dGIQP218s3mqhqYQ/MPPMhLSEcZc5Wa2qt2ZFj4znkQZuxfC2SVjAAD/ejvaZfjJ5zRXzQO3NSpD8jPVON6VIepUoFpSgLDvM90i9gUyXUlkuMc741neRO+b3Ue3QqwdwijJPrHm9LDdHyV19TGOtVFQ4L8NAJF6M+uAswP6lcT+M8i0N09h2+3etRCpvQp5Jq6+ZXWmg4e7KlIU0TGOXSFsFsT3CGshQXCxxg1WaDSXK3OEmKHCPaCjT X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;31:e0HRU+y7WB633xlEY3JTTHicIy2Mst7IN42NeZRe0LAk08oXfi+K4lyJYcnHMWTQPp+ADH1l8Bvi0mCzLWAjAcAOJCNA4kzVXc4LSZwP5dixP+WHk4nLokcmsdWWBAZB1wv/Y5TF13sMXnb6wK3IMIwnf7aaa8GObwZ3kfJ/DvxLbEtddueet4VgyNOdO78N8lXb7dWKlWcaFXg4V4mpH6IQSdvLun1QMjYYo97K2cd5x4u1YpU0FORkoY5zfu/0D2LLNsWbVLK2+PwpRPs85g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095060)(601004)(2401047)(13023025)(13015025)(13017025)(13018025)(13024025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123565025)(20161123563025)(20161123556025);SRVR:DM2PR0301MB0750;BCL:0;PCL:0;RULEID:(400006);SRVR:DM2PR0301MB0750; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;4:FULQv9TCdhcQBdLBCfnq17a2rU0GvFRKIh7KbIWsqd63vttEj5p2bA07UHMvvwver69jfKozs2u/FwajTykK4Cxe2HYbnwNAG+cIEMEXHfCy5sKMj+WBcmumec2zpKRV0E6KIc5C0tcNh2bKBUTqMhG1fjRYZMcH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nDvWjNVltqaEV1VKpO3XqzD6WjKm5qZJ?= =?us-ascii?Q?ZiuqPUItSccfdXVM2witmLOw/iedb5bUCy9YDB17QyontG+mFqDlihlbrlYY?= =?us-ascii?Q?/vHfKcYi+V87vueu4xfRJGUjvhYSD8+YFW38Kko8t?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;6:R2gRZP5sM1b1WIAuE28MF3ARDoUDqb5lRblXJWFSqYQuDfEg+/Crs5J4Ensf+qY/inh7/8GcYU43g7z84/NPd5OVI0ksFDRjVsAfvy/nsxc/XrHW8N4ENRCoVc6Ld8+CEC27YPLWkN7OwL3zAJJ/sSaskC63CYVThkOPtU07UxSZmQojjihUcoBVDFkL+CRVTjUiUedPzSBNX79AQfpIhy3ao5iS+9Ee2QUl9vCmWaYUatzpR6C4dsxkUPZ5/5dlhTGLqCna6tF5up32+WwFYQw2v4IF/hTqGYOeysVKriGFRrluS6ZAEnmOBIAQS22ys6BI3HTCQhzQxiE5zl2B0Q==;5:aVufCICzBJvnZQN6rJtAlj/xdYKKdIS3mlzIIS+o5s42jkWeO5tgGX4k6iBkyLQ7Yah4sQvmlrakTjV6VwdjJ1Ln4X7sH7zaYBpbjHClJHEwRN0LF7YJjjzF3ZZW1iS1Xhs/96IvV/d/ZFIDXquJ0paSMtbouLD8ZNJ2xOM5P3FdYCrHVKKLkLLDr4YF4kcU;24:XEDDDwjH9dbNlAeFz09wMDgZCgoFWxQ+OqHfEsG0JD1Kw21N+Y7mNWSrtPO+nYipl4LIAQN5ytoCbyDHPXzrdQimcDWfhYfoo6pJ3H21b/4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0750;7:88E59UJHz0uBvcA7wk0cIOhbN+nduwFxDpR1HcKXnEzODEM9nVlJQpHlniJrpW0idEtdl3V8pvmW4shTeOtw32OwaiBztWbmS1tt1ueK5ZxVuad7j2tekCoNtsj9NqYyjpJIETqiDHLILvHTox7xVgEsZc6DE8PrqGMmPVaqEA3bcI7fjS3uiSNqWK35L+7YY1yw+xMF4aMVTXO5uEa1otvIY/dpEi2Fy+SOTlykH8l1wmI159iZV0XQ8WVJjUkY2+2DnMw7GwQawxgXq0A/HKpkiwTbdUoZxWT5sRa+zhGzQU6VdCmNKCtjEYhxjgwIPFVa1cY5LDf0M+I5gJQo6Qzjp15iK9YBXrCtTaxuGRM= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2016 22:48:55.2208 (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: DM2PR0301MB0750 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6293 Lines: 152 add document describing the dpio driver and it's role, components and major interfaces Signed-off-by: Stuart Yoder --- 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