Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161223AbcLPQkG (ORCPT ); Fri, 16 Dec 2016 11:40:06 -0500 Received: from mail-co1nam03on0084.outbound.protection.outlook.com ([104.47.40.84]:60000 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161162AbcLPQjF (ORCPT ); Fri, 16 Dec 2016 11:39:05 -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:936;Count:10 From: Stuart Yoder To: CC: , , , , , , , , , , Stuart Yoder Subject: [PATCH v5 1/8] bus: fsl-mc: dpio: add DPIO driver overview document Date: Fri, 16 Dec 2016 10:30:59 -0600 Message-ID: <1481905866-10816-2-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1481905866-10816-1-git-send-email-stuart.yoder@nxp.com> References: <1481905866-10816-1-git-send-email-stuart.yoder@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131263799368857448;(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)(7916002)(39450400003)(39860400002)(39850400002)(39840400002)(39410400002)(39400400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(50226002)(33646002)(77096006)(626004)(7416002)(4326007)(104016004)(8676002)(5660300001)(81166006)(31430400001)(68736007)(106466001)(105606002)(92566002)(2351001)(86362001)(81156014)(48376002)(50466002)(6916009)(2950100002)(110136003)(2906002)(189998001)(85426001)(356003)(38730400001)(8666005)(36756003)(5003940100001)(97736004)(8936002)(50986999)(305945005)(76176999)(47776003)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR0301MB0741;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD021;1:0SecpgrUHjR/33U/ZKcYJLS43IADyefhCwpyEBRr1JPwE5TaD0aJNZYDeeBO4Vf/0zZh3LMcrTodvss6BLMU7SlCJk9/x2dX/EbhIvD/yu8lTjKJSpmakoy6flZPb6YYyd4onUWVJbqo6UWlgGk3m7tsr5OK5jR/io8yJ0HOIWCUUua3rbrdfuq8DPIy34ZJRpuAZT9cN/yClMULiRNl+dN3STz4RpKmSdQC1X5jSus9oHQ1lZ+8OqcLcJLd7bCbQTn0Fda2/Z92NxA+LrnakYUniKj6l98iTNaJi2TJPfSwE8N5tEhTpiY0/PYmtVtmu2kLRy0+SSiyyY8P3wcoIjRcri5LD/STWNjATaETIJl52FspebMix+LJvQWtr6xYqeHKBp+V/+9UMXpkCINAZM4hiCl8KM433NxSl/ZzPc+S8sRqOPl4Plwjb617q8uDbQ0qiPhnoEsgiRqiaMEoJdpG8rVBTtO8i9FCxDgELpuJZn7qjLhgOISp2biL/s1ffkQSU3tjqDrY6QAflMCC1mJzjd8elklfqUlVA+aGXIWDnm1Hc+zdFEiDmoHEY1MVRlQsTAFs3WSutin4Z99xYvlW3FGmUc4Wx/T7+s2oF/fF3tg4iBRISydfBqY+yGG0Nl6PC6NnYz5PA3yzZi3jrQ8pbSVoI+ZoG9AkrEjM+PSkaNe7ujbUqq/ItxsI4VOLPGjwsW6ItTctvMvCYkLV40vaJcf64gFsOg2b7KP5tk4= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: ac95421d-29d8-437f-5608-08d425d207b4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BY2PR0301MB0741; X-Microsoft-Exchange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P2XgCnDPwTw+uqg7hy8Zy/22x3BasVqj44uQ9+dg2tsmBSCVRWF67Mw+G5b6tfp+JAnw7a/MG9T3oa9FAIJLyounkKyTNvBKFt6bgccUHTsTNis+ILmFwRwEx7HLwiafL2f2xMZMIY78yFmRHqhiusPN62Y8ubx4JyK4BfzaJdMClPc9zGY/DVOqK2atQB4xiRS0vPS2fWjyw0VEgwwRzxl X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB0741;31:CcKD7MyTUPKgN2cCF6YTmsIUYxV8W7eSczTAFRbh5LitGWZzGONwAdyUXt9gHy5m8McWIJ6Kion5bF0/akCaCkkWjzsgHoQ2KDut0Zlbbe1jUKTKFAd0dlNdY43Qqr5hwb+2a65sz8SaUnCHnYdxS6TEokIkG/B09A+c42fdmg0fAY51kFW7Xg4c/h2rI/mvECYt0n2LqSNmX6mobBoeNccCYWu5Y/oNRpfff1BM2khAZEUPWgnMgpybEPj/7HdUWqrer/3QhFuAwgFsrg78kfO3+T/TroCjTkCJzg/fG3A= 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)(13024025)(13017025)(13015025)(5005006)(13018025)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123565025)(20161123563025)(20161123556025)(20161123559025)(20161123561025);SRVR:BY2PR0301MB0741;BCL:0;PCL:0;RULEID:(400006);SRVR:BY2PR0301MB0741; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB0741;4:TCjDAbXkMLFTxCNcwT18mZaV73fMYJKd5wwDp5yUZTITMKKgUwsEWauq9Yytb/8bOPsjBOLVewC2KSQJhVvwDXqGvMAHkDEIJLYKSdrMo5jge5gOpR8VbW97El89lJDMxApF4102xbq0B2K2YzzZuiaSvy2AqT4TUbWQr4YnvETu1oZPxMiVI7QrStSMm5UFW+enoBOi/GNq+hj84hAeSfP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?us-ascii?Q?TMOAxtLRKiA+WHzRxO1BeDtbH+3wRFXYEF+wWbrnWCtDdiMVFKhOY0io+Baw?= =?us-ascii?Q?1Wsai/NJgN7QnepWWvNQSQWZskmLsS3FIYZCm/SCAHultNdX4NWxa5w/oOpw?= =?us-ascii?Q?Z5DP1SygwgJJ2OFmhqYyha7g=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB0741;6:ujqYHhZDaz2qTWn2qPnjMUp/kTJgM6Z9kPPN0sXxBWcLBRL1/HEL7S1fLyk4OjhqIVmqPIwe6jnbeMqe+pC6ZpRFzBo8oblzcpPy/cMgDWOEs9ZASNOAA5zQAYYsJlgDmS2BQfVaZ2ymuufw1zInxTrUXSoWglOE+iidxDQlGs56++uPZAlT21tKHhVIHQzbFQNSRF3mgd7WiiZpgphOWKyvvDjyQmLOiYu43Xy/uT4WD5vCb6gHzFJcN9j0Ojf0U02//RsOLDCGnY9mW6tSsR7gJBPDfHKayMAf9QnNSV6R5zJboV0XIyssGo0RrNECEAayJsur1jKimTIa2tZKI0Men0GcIZomE3mVvBmzgWhF7/7Q+6U4UgcG2OWnJAhMrsgAaX3DXpjW5RyE8ZGDgwR8X93Gy4AzOJPK26C3xTPFuWqzAjfR2OLB0GJZDiZJ;5:suH6aYZ3AfDM4QNuW9rRJsB3NFF7sBoQYlrp2orXJTptiIqBvdnseC6wwtg5GCHr/GcnzcO8Ic7dT7+5s0CoV0yNXoTn1y2NdlqeQ+v/SrTbkjDLqE1S1R337ed4D1UWOT75UncukxpSI7RI+dXEZINKw9Ab4cbC84j7XSEohR986anseE87vZvIPWPSlHvU;24:HKHuh9CQVxaLjpz1gQ2rz9RKSOCA49+77YiQ24UqeAeupoUEyrQc+WshJ1oqZPei/NU1fWcFxl+OaPgV4Mwk51456F0udDU92hwOGAVQdmY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB0741;7:GYtF+F9DRmPtso81bOTI8li3sctY5IXpSVZIRHhJob6H+u+oG99WqJtSr0lOZqaU+IErM5MQkzMDSPTvEYHpvLzBFSo8QTvmBdj73l4OYgY4NLwUC1xpJAYMz24/r7ap9QyX6SSmND2M7FwCnSmPJf+I1nHz1ctVc2US/ncNBBGdHtgyZrAU00qVpwiG7343fMl7RH8CJAbkmy1Bg1TozjH/gkla15IuOAOH52LJgfmB3L9Pgw8EDZbuugAF7FBMJo79b1wD3aLcUiukIIyFLFhPzVqu8RtmePziTtgcF1sACmhivI/SUo4bKa7A+/CTSs06kr4KTVh5+blMs0NW16g153bvAe4jiGKZJONYs8qm9ojVm+QowOKERk/mcBxDe+QSaOzERayRIFFsATxmYmjjCecmwWIHfsj3XHOs86c1A/XyL63QePZo71dqeo+GKM3J6n2HO36nJ3H6h1MiCA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2016 16:38:55.0761 (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: BY2PR0301MB0741 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6355 Lines: 157 add document describing the dpio driver and it's role, components and major interfaces Signed-off-by: Stuart Yoder --- Notes: -v4 -updated copyright drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt | 135 ++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt new file mode 100644 index 0000000..0ba6771 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt @@ -0,0 +1,135 @@ +Copyright 2016 NXP + +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