Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932624AbcLPAEU (ORCPT ); Thu, 15 Dec 2016 19:04:20 -0500 Received: from mail-bl2nam02on0069.outbound.protection.outlook.com ([104.47.38.69]:19136 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932243AbcLPAEQ (ORCPT ); Thu, 15 Dec 2016 19:04:16 -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:933;Count:10 From: Stuart Yoder To: CC: , , , , , , , , , , Stuart Yoder Subject: [PATCH v4 1/8] bus: fsl-mc: dpio: add DPIO driver overview document Date: Thu, 15 Dec 2016 17:56:19 -0600 Message-ID: <1481846186-7783-2-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1481846186-7783-1-git-send-email-stuart.yoder@nxp.com> References: <1481846186-7783-1-git-send-email-stuart.yoder@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131263202546249784;(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)(39410400002)(39860400002)(39850400002)(39400400002)(39380400002)(39840400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(5660300001)(47776003)(8936002)(5003940100001)(81156014)(8676002)(106466001)(105606002)(626004)(85426001)(6916009)(7416002)(4326007)(97736004)(2950100002)(33646002)(2351001)(110136003)(81166006)(31430400001)(50986999)(50466002)(86362001)(189998001)(36756003)(8666005)(38730400001)(50226002)(92566002)(104016004)(356003)(76176999)(77096006)(305945005)(68736007)(2906002)(48376002)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR03MB2475;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD025;1:EX6pY0H9koY6Vs4+Xmt34H4w1/E1YdBdxxYNNKRGn0qmolg6S1gDDam1voVFNeAbrFjgwhQQ0H+du7KIQrtjzeh0aVy7WAprjPHCrt+026AYu8eq2e/aBFTOmd88RgNgNQZaHNhbxft8q6pzuSkmPvm2Gi1Ti6Wj2zVNSc94YQxN1cqVa/M0qAhknSljx3LVygl19CfXHBryLTo9hmg+fPJv9+ram9Ir4GqcqvmHu+uzVNG5PYtrH0zCWxqNzh1L4X3RyW8504g9GtD2kO0h7eXmqomSMzHr5c2TzusiGC2TV+5DUjsjILsACUjTHfFj1erSFBX5iVJBmT1COGN5iZmRlKJt/T3wpRVUy/8sanDI1flFqDzgTy+SoHwPl6zHVJVXBCaukTR+p26cog5DO/2f+E0FBoeJ/98vyp1IELOq1QEw9AVnUI2EkXmKS59Z4+MKNqSy5wm6NOMnElg4raKlaPXvOgtmGHbftzphRRlNZBkTOvuNlfQHWGHrCg57/tppdsJZ69sIe9ZWzOJoiaA211+aAhhzd5mw2OU8Yz52PvLmGfI7h2EX8sezeeibi2eLa7EGhXv7c5Km4v2jMt1AMPvqfEtQqqYOKUHXvqkZCA1RGs4debXWwyU6jZIW9OyNeWa7M9kUEoIOabrQzclUvLimL8ihdiSOXUD5dO0Xug3ADXXA6ZqyVuaIMUYRCLyzJNnUNQt6g9V/FJPnec4DzcpBLpbmXueRakY9krM= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: d33920bd-fed9-4b7e-6540-08d42547123d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR03MB2475; X-Microsoft-Exchange-Diagnostics: 1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iAS+NUYcwcT7a4VJvYlu7isJuyhP4HajVG7lamsVog31w+Ha4je6OJ7b4B7SX8LVRX3TMMMgVzFUFlYcrk5X5I9j/MShB2hEFJILhD35YHVRRoFCnd9Q== 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)(5005006)(8121501046)(13017025)(13018025)(13023025)(13024025)(13015025)(10201501046)(3002001)(6055026)(6096035)(20161123563025)(20161123561025)(20161123565025)(20161123556025)(20161123559025);SRVR:DM5PR03MB2475;BCL:0;PCL:0;RULEID:(400006);SRVR:DM5PR03MB2475; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2475;4:cMdCSMQHo9d4Gt9I+xeYfzKnAYZmNGxFWhX7uiV9v3LCBMsnk5/jD9z5uFx+4Pi/pm/Zlvz4Fe4fZus0hyiRszuB/0oru4jVJ+jVaXc7dt4hVDtLOqaHl2alAnXZjIIkUi8HCiA1vHhIRU8Tj0KJ5517RfEwwXQZzw07zWemLKiCJQCEgrB9HRfdOn38hn4zssBZt1UZf4KoHSnMfof7aw9z7RTmOWoWRlkrfwKz3KYVI5FbCV2FumNxGr8ltUEam3L5J1Ly5y5FOGGn/QKPKNI5cso7Aoplb/6AXh6PMrDDNKrpUWcnmc0X1li3TFUDq5aG71/UyXzWYc4GNVAQFjWLjEYIKplo8LidhIuSCii1NuzuSB715G6+u4FZmLsyc0SMu7e9zA3TvhvATodWSdMbsQCBLQrhQ8YnqHJ3sjcDtAfUy7D9bneP2mNWW5oXbKjOpWcvcXKcPDZIMhg+X/DHzrS7Rmte62DdcsPsXQCZO0rMPQEKrNKualmu3wkUhZgEcyp9OGgyZ9mMFlVA1+H1zDmb8erP0GmfMS4UKvwcacHC2mWS9G5KZFtDYyuj/vbdxir/p6jbHakMTM0xAcmyt4x/B9W82IS15CKoqaRLOMwnQsvh/SejmXg60sD9T5Pul5rsVltMG10DPQvyNv6orDt/u0qvTeouH/xM2n4fUHmTEOMePe0x76eTB5ftenuRnE7wvaaXkwdxzaCSJnVeS1gMHCrd/K3qf6nZR2AfY15bMjq5vsjERDTzuNfmyFqL9l6O6y4LZUPWaZZggnbaRsZd5p6MBPjW4KzaDH9+BG48AcfANFPT5EhxOhvn X-Forefront-PRVS: 01583E185C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR03MB2475;23:doOfRZhglc99oMPFABbz+YaYpz0BG/XbfcLkbOua7?= =?us-ascii?Q?1Gme1nrbn92jMD7LRQO5X/G9TKjnSBOVsRv+2fYOlS/9XlTKvGuiiR4oxG+z?= =?us-ascii?Q?VhiiJwEW/BMszv0NKc8VBM1hikCUq1LLt9lOl5Nw1wkRIHejyBkrz4/twc7W?= =?us-ascii?Q?feay8r5xLc0ze3+qcOBYOGRokyLnZijsZGeKtO66l919RgDBHbCcFZj4fcY4?= =?us-ascii?Q?l7ls2HByq+GQcBCG9O8Mee2nLZPdYhJCDtHQCzKXOz7qFmN6bysWhZgkRK1/?= =?us-ascii?Q?7qwcRs19jzUybJnsZJPcTqFdT/YSBblXP4UKXCavKw5BVfQndtduyhUum6a9?= =?us-ascii?Q?I6XfzpFgaCZyu7OsF/y3iNeALzSbID9NUETYLfc4QaiVVskkhJNPLnzqpNUN?= =?us-ascii?Q?d7KttVMLsUCUNh6pdS0qMoBMtDXu0+8ZDjSdFyLKeU7/BMWBwf+QhROUwhyK?= =?us-ascii?Q?p8AdtaJnY++RIAp8a5oMbCC4bjih8rg8ox/YzAc62wupg/5t7/oNIyHm/wvL?= =?us-ascii?Q?fElfG7Ekd55JWbhqZ0DPXkQa2aWNhrOKs+WfB+7e4BcRHtIuPWura8IsLorU?= =?us-ascii?Q?l/WUkIdqT3VIBguq31Lu44i6bY/SlXbBoO28K79p4oEau3SNfsRNK1mAvmBc?= =?us-ascii?Q?ztJTiCPkKDh9kdGhap8inASEk5LlfAThcWqZXRyvMJJewrRZpVle+/a1unYz?= =?us-ascii?Q?BIwe1t81RAGxd65KPIN8is3g4fmgk8K+7U5c+8sGybFRrGatxzjIxHcUlTON?= =?us-ascii?Q?+v1OiKBbDSgt4fdTTn+WJg8ueeE58BjiLox2N++jNbFEWcmOSGDjVQ/df2Ue?= =?us-ascii?Q?vRYtusIjjw+GxfILDOukxaOtF6GOS2/ifsV2Ssk2hkGk3CoQ8BOOVULSzKFv?= =?us-ascii?Q?uUceeUD9qBWgBvdevR5d6yHOCx+doKJWhZpFN26psBE0trI+1bSt3xo+qwRW?= =?us-ascii?Q?L4mUzc9Ux8NiblrbTqK0GMjUnisOY0SlTHRDiVRVpuSZC8sRn5p9tgxdOgDt?= =?us-ascii?Q?6gSuw9B2fr8sdA4gu4qXurwcs0dVjLyM0wHsDr7ZN2MsFYIlETkWs6e1B0V/?= =?us-ascii?Q?81GsGxbNAneSabepJXbt73iF6RziNfu8HXqUMDgfWGMrSPc4gPEVNz161gM/?= =?us-ascii?Q?b95Z0aboYYivfrjyWkzO8nUznqN9p612qWOpX/59mWKZLUojgRBd5/CdVUB/?= =?us-ascii?Q?qUVzclEgVJEtL1tEAuZgeQPlHz6nF0Xlx9FTO7UwlnndHpwQkdZkal0UHeaF?= =?us-ascii?Q?uo1javqFgT2WjFF0U+WCZG8qXHbWGNbGj5cHgj9SnRzuQdTh1YXZSs4Ug+7D?= =?us-ascii?Q?DuWedxfIC/bGMjQiNr/bek=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2475;6:uyr0AbBbeLNl60PFiMyBkNfMsGJGqYV+jP3jDzjXTzixpGiOFFlksx8jg44xueWXBUWzgqxdhUuvvWxRhenwc+NI4r5xuGyAyngGo+KYLw385VE3unwrMpXuwdZHp12mnvsxRTziHOcSYzOa/U9OED7/RA+Ry7KztR+JVBwCdqkFKbiBcaZHGeKYA23Y8Joq+rBgmtzc14v7v24kbTNUS+pKDQuDsH1pX0pggjeYM4LtWfLvt5L0h6IJJPvet2xY/F+724V4xsArwSyYLR1CoYH3P+359VmxgB2wTTsavccwJGJrmUWaoGhCi6jBtcnDpxjUrUN0X7QMBGVCuJmeq/kqZ2DpnkLrxRrbBC+WEk+FMCKO6PrAbiPNmra0IkqsgWiPkyLvdWU8sby7ahEsLkZG0slUYsbEeNOEJugC5wW/drZyUnaUH8mIU3z1eNRE;5:JGvEFb4fTMltf+aholev0+Yzb3hKitwVUCT7tomx+DexcIq2zgB5M3aAFHPSH5QNVMKSbbZm/UP2afRPNQfDw6d+/9ZOAUY1e3uGMkKJoPplhnkalbU/owTzc8Nu+eUred62/NQCY2HcLi2cDeM9gGnKkEETIfoTWOA3B67RQUSMqpRme5Ogobv2ULiKhe9l;24:3A7VCzprsKo4E5l3mdA7XJ4I6fDBFhc+F3+2WzGzGZVh7i7JifhLE5LDvV3Aq55KMkEhkdsU1mOOdqUG54iaohhFeeo4X3fiQipEf0sXSQE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2475;7:b7DWjctHmx91lnFscyYYSXv9EEKea+ul3blY6gLm+MFVwCL9OX2kxB3IjZYJ28+wEliSkDfUWfI5hgyf48yMrnvCs68JQKKd/tazUzVNVyEbcnrIoQ2weeHwEPQNhxX48gLaG0XV0QVFM7QrlpCOxkq+yV5a6g6Ku9oJUVBjnZ3gijOypiM4dYJrCekR8X0OQ1s7BouQ4hqF5uVLTO68IR2mnxnWos8CE0NSMnwvmj/Uz7J/nS3w99eO6EwDd0AwL44iOFqbcgzqPM+v//3Da3fCCEGV1B4sgOjPGIiD3noq0kDc3f4r3vrWkSRnqGz/5N45ECV0kWsTyiAhAfvbBpbmg09FpWKr8bD7/okLi9pdxDw4zEa1QNuljdY2P968VWnT9q3NNDSPWx2lIOCDMLHBezu30Rwq4o22tOrFf2bUMSI41x7tYiIEV45jO9blIsL91uvSg6xTkAg76853Mg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2016 00:04:14.2817 (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: DM5PR03MB2475 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