Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754421AbdCMTC1 (ORCPT ); Mon, 13 Mar 2017 15:02:27 -0400 Received: from mail-bl2nam02on0082.outbound.protection.outlook.com ([104.47.38.82]:11753 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750961AbdCMTCQ (ORCPT ); Mon, 13 Mar 2017 15:02:16 -0400 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; From: Roy Pledge To: , , , , , CC: , , , , , , Stuart Yoder , Roy Pledge Subject: [RESEND PATCH v6 1/8] bus: fsl-mc: dpio: add DPIO driver overview document Date: Mon, 13 Mar 2017 15:01:57 -0400 Message-ID: <20170313190204.28190-2-roy.pledge@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170313190204.28190-1-roy.pledge@nxp.com> References: <20170313190204.28190-1-roy.pledge@nxp.com> Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131339053344264270;(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)(39400400002)(39380400002)(39450400003)(39850400002)(39840400002)(39860400002)(39410400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(47776003)(39060400002)(305945005)(36756003)(38730400002)(7416002)(4326008)(5003940100001)(86362001)(2906002)(3450700001)(2201001)(85426001)(31430400001)(1076002)(48376002)(106466001)(105606002)(5660300001)(50466002)(81166006)(6666003)(2950100002)(43066003)(50986999)(8936002)(104016004)(76176999)(50226002)(33646002)(53936002)(8676002)(54906002)(189998001)(356003)(8656002)(77096006)(2101003)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR03MB181;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD014;1:Uc72DFXZAEXzFB2QeRcjauqw2lPX+v/lwLBfVko9rIX7cmOwdjifdRtG1Lxm36fjD4qo3pe8RgCPgFU32S+RWKm8mP8F7yuL4HKFXEdXWIRjBxMfiTNhPiehfVIHzKMdD1NyvSeuTvAumFTopqRmg8Pj+3DvhNoHbWKIJEeCCfri4lmmqU9+EI3epzU7EQmiIatJTA35zjOyaOqkemTJcarrhN4qMOmbcjWXlo+tFtgG9hNKgRDVTzPZW694PcM6zBShXPZqT29zkny8ihl1qzcAOlxH02/auhgfsT5WQ2qpbShiU5+7YQgdKs1k+rlJNpw4H6gKpfqTMi3qC44srRPr9AbBf9yPO2WRTHBmUbxmZhs6lY/39R1qIbmIXNKbKXZ3YtXNHV+LUJq+MLZDb/kB7SYZamzH7lv+pVHf5De5cZnIwA1oo8QAgQ5FgUGR6iVPQwTiB807JFjcYWU5LMxuNiyiJkpdUd5UC7cSVDnSW6cDmUZ2QjSSaK7vPd7EXYc6jGu47CwKU7vW6UibNLrwGfh23MkwZOIC78Vz67xlhhc23k32XIVxIszUewFo9rVdbWVqZaEVJFymjF+z74/u73AkO9i2syQn4lTqkoiZwx91R0jbByzcSVxydT/1tqokVcrV1h7SWeR6VGcDXrm9xjBX4HLsmm+49iCSFZMhFzGTyXtTVK/qFDFdT00w5tPfrTPj/IeIGfTARVKCMg== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 87ff2fc1-c8df-4f9e-2eed-08d46a43762d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BLUPR03MB181; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB181;3:nq7r2jeGovHiNTGKbrgig5PLadi37QaE9/97TIICIkjHE+sH9Uhaco2FqgLAisiJtvQL4lizY0nTwRXPpwrtoij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QddWzdtyW8Gj+CXHV/3Xde4CdpDS60= 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)(13024025)(13023025)(13018025)(13015025)(8121501046)(5005006)(13017025)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123565025)(20161123559025)(20161123563025)(20161123556025);SRVR:BLUPR03MB181;BCL:0;PCL:0;RULEID:(400006);SRVR:BLUPR03MB181; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB181;4:37BG1xsnAW6p8IkHyYvu33uqmyumiuMZYMPeDTXiQxsT1nhFj6diT+BAmYHRquh58+D3DwAIThAn1ghczFyl3x3bTrdqh2pO0etFgmHlGMIKhBzpfvbNZwlCWBzH3d9MufAdRsL+sWHKxEkZu24HQ9KP2xR9TB8d3eHNv11y+uW1KX0gNINl97IiP42CPqmfaKt6zbz6IPMUa/Moa/yciy/1HX5+IuLxYojwf4nuZG9juU5M7FdG756axKu+2iaN26fzzigbUoAltqe7OSMIjlNhy60O0tccyCCu++j+BCJl9fsz/jSQo9McjlXKoBZ7PfLIUZK5AF6FughhRTfc9dVQclgopY+YBXN3BNukQQ0ZOO3gCOEcDLvlntaSUDJfteLOkOFs+r5DPkJ1a3EGYa6ioYEthm9MROeM2z89W6aWWe712T2rQQn4ugUCysxnN96zGLdH2Ccw/RaB483P/crpZWoFEZTLT1fvKla6HSygraDtyHmITQZ8AqdBPW9DkbA2Qln5X3jPR7+Fx5yPiEeL6V17NX9aOrQQ5/j5D+MaV57PNOMlyANzNfQ6mX3G+JH/sj3mqzRNWfoVyuADtk3vgqVuDdweosWz4iD8SOwPTNMeueJTJ5I7OFKZn1jhmlMGYUa+K9TPrDu2cTW3q5rngUuoyJL89C8uhz0jogoCuE120TDaxrkvF4u0mxCBbX3GE4qZnG6mZB5YdEZ0/7WyursIH88uJ125TEo1mRXUJYnk34pTqqPTqd2mI5VO4R5YLukvYRFglKovedk5YYtY5/4Tv3gKXrunspjCDwW0nyK97W9axHkoXvUuNM6o X-Forefront-PRVS: 0245702D7B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR03MB181;23:fFyhMH5AeoDkz6RveqGC1n4DmpZlGLMzuEbvOtctlB?= =?us-ascii?Q?MlnIxeqTQaq0qK6M91/Y0gV/dWbdLuAuoMVxJitTos5ijmXULu8RG2G7ufaI?= =?us-ascii?Q?VsMmVoqGbb9zURZLiDxNMZjtVBS0SwduSit7NYQ6emset61LXXSgbquY+NuG?= =?us-ascii?Q?HsALxxBAHHqdnKw9aSHgJZJd+3MO4DAFYOlBHw2ZG4wfFRd71WcxNT9lGLXM?= =?us-ascii?Q?eDZdU+dJVMc3ni/goFtoXAFhl7GlNwI/4m6CqL+K4Er92JT7OC1Ah1rffSp3?= =?us-ascii?Q?UV5OQSHKTtrl+kanSpPD+9QVJoJ+BFroUMj5zFX919MtU38RveZVhcHi1Rfx?= =?us-ascii?Q?Bh8t38vNuHMb++UGBa7dkRO9cErLgCIxz+d/Y6h/DmBVx/VPb+p+QVDmNLJK?= =?us-ascii?Q?RmUoQVy+sb8OGOz9sl0yEFN8FPoAzNBA15DdMNqX8/outqZhC6c3yQnBxYye?= =?us-ascii?Q?PNG7h9EeZUGiR69Y6FAFRY8J7K7hd7Gzbkck+uzGzc9NcyviW/G2hCxu8yax?= =?us-ascii?Q?e335fh5MQ9j+yl/cm/5wFI7x/7cfpunI2WVM7sgiIvNANq2Qi7eAULYzPj9n?= =?us-ascii?Q?v7Z7PpnGKySJ+aivjOA+BoqZENUYqksdxtCvWcBW69yAcIFp+g/mcV8Hj13q?= =?us-ascii?Q?VBaVp/q7EwaoK8IICGtlNczgeSx/Sts4Pxa7kX7iJEypcdRqUyVxsceHhDOH?= =?us-ascii?Q?we7OGe5DWvEFxeGR/ivNh/spXLiPiygQxsuQZmqynkW02hFPYUNax69ULaeB?= =?us-ascii?Q?5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OyBMOom0JJOgns33PdyLa2Mt20AFk/LJxUKZy81dYuulsXwSUsnp766x1eqRBi02CM39VUmnctHhqK7dosnO6tL9/ha7jga/izQ05Ok0WWSkDThft/ti4ltKZSGmS9xBCSRf29/ALBAw=;5:FZUkz46QQgfDJSzz5gS/FMI1yS7wpCM8G75SnFtdf+f+PCo7znms349+0MaE/ftWM6F0KsLhUarNEOYOdyfispPnxVs3li24iF/3CCvFxFWBnut3fxfJ0MIQiYeRZR/UbvI3S2LrcbRqtxXd3TDxqSOqO0ELrRtlEiKR7JVYVr8n7+9sL4jXLsRnayLCNWMf;24:qOpz58aciqxYxM/DUv8v0T2gzZdP3MLfGPnGn+j38gXseJkRRNL9qVtq5v7A1uKcMIQKE4/IORAkIl+3MEijxnmsYaHdfdizadITEvGPO9Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB181;7:THvIXThZzKM1uny6etsYMGzKGGMjE07LyQA2jzwAhgxKfAHPeirMQcnb6CW1G+qrhoNVNpbv2WPK5Jmjsa2tab+0HkzTLX/vRqWboFN4CDHuIDc6U/wVY7hk4n/fuMzxJqXnPwY+ZYFyzwV1VfC3gidgVWBW2wpuZ6wi4CyyWUy98xyErLTtcwnSB1I6q1PU9GaTrzjrq3NxJ0rNFcyBJkx9Rab65+IhetpLvSE4OY8nMv5yaIM7C58j+myDk5dz/rb5YuIOQTDowzAOtrIwyLNB1Nw725fHjsVaITns99THs7yB9aBUiQ5zDFOnhqwnWetotfWq8hY48DXT5gs89w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2017 19:02:14.1144 (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: BLUPR03MB181 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6453 Lines: 160 From: Stuart Yoder add document describing the dpio driver and it's role, components and major interfaces Signed-off-by: Stuart Yoder Signed-off-by: Roy Pledge --- 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. -- 2.9.3