Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934191AbcJUOJq (ORCPT ); Fri, 21 Oct 2016 10:09:46 -0400 Received: from mail-co1nam03on0085.outbound.protection.outlook.com ([104.47.40.85]:27181 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933190AbcJUOID (ORCPT ); Fri, 21 Oct 2016 10:08:03 -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;nxp.com; dkim=none (message not signed) header.d=none; From: Stuart Yoder To: CC: , , , , , , Stuart Yoder Subject: [PATCH 2/9] bus: fsl-mc: dpio: add DPIO driver overview document Date: Fri, 21 Oct 2016 09:01:42 -0500 Message-ID: <1477058509-12547-3-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1477058509-12547-1-git-send-email-stuart.yoder@nxp.com> References: <1477058509-12547-1-git-send-email-stuart.yoder@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131215324793006106;(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)(7916002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(19580395003)(33646002)(92566002)(5660300001)(106466001)(19580405001)(105606002)(104016004)(4326007)(81166006)(626004)(97736004)(8676002)(81156014)(2351001)(189998001)(2906002)(229853001)(110136003)(76176999)(36756003)(6666003)(50986999)(48376002)(85426001)(50226002)(86362001)(31430400001)(68736007)(77096005)(5003940100001)(69596002)(47776003)(7846002)(586003)(2950100002)(8936002)(305945005)(8666005)(356003)(50466002)(6916009)(87936001)(11100500001)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR03MB2373;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD045;1:yFDKUp1oTsjZ9sOTIvV8B3Dlu/gwEEUruWUkjPjMM0JbRPg7AliN/B8KOii3MeINjR/KVu7/bC3ltzSH99hPF7iDvDOCO4e1SU3aQU8QzqIp16FmAd7sS7S/WjpGHgLRmS573YDWEIiMaVje3nluobDUxQPpEFcMMKweISVCGUX6Bbe02i+zw5CcAeuJewvvwRmOrVZ4JR04h3erQWUCp5xo+lE9KbnIRk+RE3ns2yDUHqinbKLaOJrG08mo7MPopdiCICUrGrzt/e0/6SxaKMNjeIW3DRK0eDFIti5bJPR2x88dPn4OryrUvU1oQWw2ehQiewU6EcDx8zqM1SdW2y54ixA6fllRDKd8JJxiC3ih5mBxX9PCzo41dMXpyJK0MJRfK6cRLuc3HpRS/qTgUobLMP7WBcYdjyP5UKeVqEod/Qy4KJSvnQ2fsBUCrPrQnITdIjNXu8p8PIetz0ZqMf1BOjl1RVi0cMboe80yuvAp3v2U0Jb0el/RgAZbJH7/UuwXHqQIyQkfHcEA4Qjk+7dEUJ7MrPHNgcV3AghmcW1TtiFkqid74sGrpyfOAqiX5II4uFGia/DfADpUVU+kLlnyM8M3IVUnfsP6MQd1N5TaUxGfBUM8xAF9x6GYgfcJwhdPooLyt+9Rg5/PNvM1pa1gzJKBp2YvTPBhV0HGWxU+FD0BJQPg4weUkBW6C5rkEetbppLZzk0xfhuPrlwEVfMx5SIVbg98/N0EKdusp1c= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 7f9cffed-ea66-46e4-86bb-08d3f9bba9d4 X-Microsoft-Exchange-Diagnostics: 1;CO2PR03MB2373;2:Imm2YcrG8KMBM3behwo8HTJMVvjRZoG753m1YYdZQAcDGE2oSw+yKfZ5ijTth0yNFCfRVPXGLNFdnHs82N1UTivvSyJ8wSBXY3FFx0OWLed/TE96/vhKDCS8HuJaaly/im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63LSp3751PBiNID2D0bZ4Ygb57ExW8mX9luD67mWMuexXBEVeFSi6lPd3J3mZYD5546+uw4NvP+epeJGKvyD5Kown5xVCL2x X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(13024025)(5005006)(8121501046)(13023025)(13018025)(13017025)(13015025)(10201501046)(3002001)(6055026);SRVR:CO2PR03MB2373;BCL:0;PCL:0;RULEID:(400006);SRVR:CO2PR03MB2373; X-Forefront-PRVS: 01026E1310 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO2PR03MB2373;23:z+/XUTVkVIgxetS3gawDZ4ZAH/DuhHMTtMp9my/cD?= =?us-ascii?Q?3663vaZNakBy9j5jJm/zHf37WgKybJyeJp/i7H4ngkQbc7JMGrnnNpiaMHRv?= =?us-ascii?Q?uZ6NUULW53paAZxhpi2ZiCSi3K//y56/tw6GgOHOXxAjhHeNhao+mh9uHP/1?= =?us-ascii?Q?Cw7Jc4E3pPalxUwUU2R38dXNl/YF5dvUz2h3luNomc6Qan9BNAKRq8PKMCOp?= =?us-ascii?Q?gqxNaRqwJtMEOWmlo4rNZRShLlWUyHruyNGIbuHInNryPGBEUpvpCMicko+O?= =?us-ascii?Q?GDASEjsGdWF1UNXkdnKwAKJ75e5wgjn40ivgCYu8AGka+JbO+22h6R5+/AiE?= =?us-ascii?Q?6Dkthr0ajBmNzGw4onEVw8YmQfUfd8sBC1u1khPGM6TwWrKlkaC2ojvvq9Ew?= =?us-ascii?Q?E1z77xZjfiEqUFt9pyXXnOJ27sZlU7D3oVKzwzVDRwDR6b1lXWXYYLnpkIGl?= =?us-ascii?Q?K6ByUGAADxHzUrZUqP0p5srMeQAFnl7xzXbC7whoE3c29ffQ4mijo/Rpow6z?= =?us-ascii?Q?iQG9IW4PuJKd+dcXCWRil2q2bw7MuZ6ilpIp6fY7j2B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tCyEANV/to3svdsPO4UIGqD2qkXsP4CVe5LmmKqOOUY8y13hEi2lCPTfhvLlWcRb55kgsuFGJButj70XGtUeg3UOUhHNz3geIt51kGLDQ2Yly9Z0Ymnr9iEfi92kwtbPiFhswUkZXpQGBhTMcLdPhlJ+9e3tJR1fcFNwOckM;5:uj8xAEC3604uDaLNk38e5jKzNXmD+51YomZMvqkj1FjK2ymORbMoOvJvD9F2nUaR9ZUv9zCXUAZrG8XOGe9Xp3henbk4HKTAoxCznPOUEvxYsDKseaaCMbD4Jw42nVvGm4+w6UnB2RvfTucE1kVxbJ+qolulUQk+OItlW2DW6u66es/a+Sm2lu52QPUH1o8j;24:o6Z58g0AInIhk1YgyTNQ1PICEBLn7wxbUupDKWabBZtVUZwwO+KsLQt61KBuGwAd3ExsOohjs6pp/TI7Pljw0luURBaAay34YbJ/SaQMt8k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CO2PR03MB2373;7:PV5lFbIeoKeMpchvq9Mcdb0rz9WhIZJshS+sCOBRMpwkfWxPw0DbM34l4iqldHRAhwxGjWOp10C43f3kTuICD+ufNfUv4oVmYuoffQiPKU/WLd0wostS1+SKbRq8a54SEQOLLQAkS5dfIwppmo3iUYuOSXWj1NAVjYhhve0RLqZEPZZkh1bFQHcaNPz5h4iGScJZVn4Fx7bQfR7eGNx0gCzobzyemmcOKlHg4L2JpuyPkDy/glPW8J0oiMfxml7u2B53SwsX3e353bZ86nkITxtl3XF7t3W63usmFT6aBkC4kKV3/02vhIVBQqqTcZy55uDPfpZ6LsjxQI1xEjatJmE4MzjarShA2ryuRfc8TEI= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2016 14:07:59.0510 (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: CO2PR03MB2373 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