Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2768017yba; Mon, 15 Apr 2019 20:02:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0/bRU2zFqSUgE1M4DW/YKNpaZWCrJ52wJfsDNllHXHvHC3Tt0Zord4j73rOGHa6R38G9t X-Received: by 2002:a17:902:9a4c:: with SMTP id x12mr32203240plv.90.1555383730173; Mon, 15 Apr 2019 20:02:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555383730; cv=none; d=google.com; s=arc-20160816; b=NXKCsr8KMzGvToGSgkXIv/5cfs5bBrWdEuEjeHB0HVG/mQZF2ocVjSv19NyDTctlmQ FyFFeD9E1YAhPJ42hMnmG4C0CaZrFsRROyYF0BrpMfoY5sRATgiYK9y2IFukGTGINkII zsw0VJdyo6QFV3AmDh3dUskNlO4/ZQM3KA5Graajy3JqgGJNrX6GPloZd4WeFYCxgZlh 8BXGNdAxYATSvH6Nv68lD6X+G/UwI7SU/Xzo1eiizyt6EenSEo2RLtV2odQWmmHs4tPo g3UCAZ0nEAJDqV1AnSTya5bXgPk3cQ0VGJDvOTWiMDv0az0NCXo+hS0sKaQq5QXviYCQ AmRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=X6PCPujLe0yi/spbjWVARx7ojWRO7h18ZRnSHidvirE=; b=JFsfgmtBHv9q31ZaRBprswBqzNFIiC7yd/Uz0hfIcpWZEHXOV6wXj+L8HRWeNynlsK AdR8FAvfrv4cF6LLTV7yr/2bCcRl7qPZbDtkkdF2GRBgwoSkK5Kjhay2Rh+Ox46uGN3s a0DG+Rw9VeSGomeke7YZMitpal/1BV7MHcvqblWjmFYwiqD6yWzxRoKlH+EDH0wxjS+C 7zdP/cRFmyObgdW4MVXlPy4cKMCwtVHrutqnolcNVn/P+a5zUoolaPr4mNhcg0PwEZQp uuRMFnNjH5NcW6tjGNmTV5mHjxfMqaKdIfA8gPIz2OBTt2oySaS21MGLAETBuQ9JPCF9 zv6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SR3H1Ti6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11si42761943pgo.563.2019.04.15.20.01.54; Mon, 15 Apr 2019 20:02:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SR3H1Ti6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728400AbfDPDBE (ORCPT + 99 others); Mon, 15 Apr 2019 23:01:04 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:44286 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726783AbfDPC4d (ORCPT ); Mon, 15 Apr 2019 22:56:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=X6PCPujLe0yi/spbjWVARx7ojWRO7h18ZRnSHidvirE=; b=SR3H1Ti6Q2RqQ9OEWS4zWABVnm pw3Prl0FHTVvbCZ0D1Ovz1ikMaqSKgY4lU/hLitySZaWmJp7VH054wz7KogCBxRANJw17RqwHRV5y R96fo0rBaK0A3a4GOemOCtr/i1LYeqbkjklRT0C3lG5rcg+BUsOZzXGuMBWQw/4yffrwkGrnNhDZk sixwsRc4JGfGv41R8B5nNzWli6w3VbKcNQZI2lDzoysGdTxJLyDQhygg/8s8QHkajW7a8oKq8Qbbg 6P+W5Lxo17gjOV+EfBrVmL2HWeE3DE/aX/TCHAdXLOfZNq8x/mPGutJ7f0IU2uCyEADBu+dcJbyJA z44KipsQ==; Received: from 177.205.118.176.dynamic.adsl.gvt.net.br ([177.205.118.176] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGEGu-0007aW-Cv; Tue, 16 Apr 2019 02:56:32 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1hGEGn-0001lz-8S; Mon, 15 Apr 2019 23:56:25 -0300 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , Alan Tull , Moritz Fischer , linux-fpga@vger.kernel.org Subject: [PATCH 14/57] docs: fpga: convert it to ReST Date: Mon, 15 Apr 2019 23:55:39 -0300 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dfl.txt file is almost there. It needs just a few adjustments to be properly parsed. Signed-off-by: Mauro Carvalho Chehab --- Documentation/fpga/dfl.txt | 58 +++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/Documentation/fpga/dfl.txt b/Documentation/fpga/dfl.txt index 6df4621c3f2a..2f125abd777f 100644 --- a/Documentation/fpga/dfl.txt +++ b/Documentation/fpga/dfl.txt @@ -1,9 +1,12 @@ -=============================================================================== - FPGA Device Feature List (DFL) Framework Overview -------------------------------------------------------------------------------- - Enno Luebbers - Xiao Guangrong - Wu Hao +================================================= +FPGA Device Feature List (DFL) Framework Overview +================================================= + +Authors: + +- Enno Luebbers +- Xiao Guangrong +- Wu Hao The Device Feature List (DFL) FPGA framework (and drivers according to this this framework) hides the very details of low layer hardwares and provides @@ -19,7 +22,7 @@ Device Feature List (DFL) defines a linked list of feature headers within the device MMIO space to provide an extensible way of adding features. Software can walk through these predefined data structures to enumerate FPGA features: FPGA Interface Unit (FIU), Accelerated Function Unit (AFU) and Private Features, -as illustrated below: +as illustrated below:: Header Header Header Header +----------+ +-->+----------+ +-->+----------+ +-->+----------+ @@ -81,9 +84,9 @@ and release it using close(). The following functions are exposed through ioctls: - Get driver API version (DFL_FPGA_GET_API_VERSION) - Check for extensions (DFL_FPGA_CHECK_EXTENSION) - Program bitstream (DFL_FPGA_FME_PORT_PR) +- Get driver API version (DFL_FPGA_GET_API_VERSION) +- Check for extensions (DFL_FPGA_CHECK_EXTENSION) +- Program bitstream (DFL_FPGA_FME_PORT_PR) More functions are exposed through sysfs (/sys/class/fpga_region/regionX/dfl-fme.n/): @@ -118,18 +121,19 @@ port by using open() on the port device node and release it using close(). The following functions are exposed through ioctls: - Get driver API version (DFL_FPGA_GET_API_VERSION) - Check for extensions (DFL_FPGA_CHECK_EXTENSION) - Get port info (DFL_FPGA_PORT_GET_INFO) - Get MMIO region info (DFL_FPGA_PORT_GET_REGION_INFO) - Map DMA buffer (DFL_FPGA_PORT_DMA_MAP) - Unmap DMA buffer (DFL_FPGA_PORT_DMA_UNMAP) - Reset AFU (*DFL_FPGA_PORT_RESET) +- Get driver API version (DFL_FPGA_GET_API_VERSION) +- Check for extensions (DFL_FPGA_CHECK_EXTENSION) +- Get port info (DFL_FPGA_PORT_GET_INFO) +- Get MMIO region info (DFL_FPGA_PORT_GET_REGION_INFO) +- Map DMA buffer (DFL_FPGA_PORT_DMA_MAP) +- Unmap DMA buffer (DFL_FPGA_PORT_DMA_UNMAP) +- Reset AFU (DFL_FPGA_PORT_RESET) -*DFL_FPGA_PORT_RESET: reset the FPGA Port and its AFU. Userspace can do Port -reset at any time, e.g. during DMA or Partial Reconfiguration. But it should -never cause any system level issue, only functional failure (e.g. DMA or PR -operation failure) and be recoverable from the failure. +DFL_FPGA_PORT_RESET: + reset the FPGA Port and its AFU. Userspace can do Port + reset at any time, e.g. during DMA or Partial Reconfiguration. But it should + never cause any system level issue, only functional failure (e.g. DMA or PR + operation failure) and be recoverable from the failure. User-space applications can also mmap() accelerator MMIO regions. @@ -143,6 +147,8 @@ More functions are exposed through sysfs: DFL Framework Overview ====================== +:: + +----------+ +--------+ +--------+ +--------+ | FME | | AFU | | AFU | | AFU | | Module | | Module | | Module | | Module | @@ -151,7 +157,7 @@ DFL Framework Overview | FPGA Container Device | Device Feature List | (FPGA Base Region) | Framework +-----------------------+ --------------------------------------------------------------------- + ------------------------------------------------------------------ +----------------------------+ | FPGA DFL Device Module | | (e.g. PCIE/Platform Device)| @@ -220,7 +226,7 @@ the sysfs hierarchy under /sys/class/fpga_region. In the example below, two DFL based FPGA devices are installed in the host. Each fpga device has one FME and two ports (AFUs). -FPGA regions are created under /sys/class/fpga_region/ +FPGA regions are created under /sys/class/fpga_region/:: /sys/class/fpga_region/region0 /sys/class/fpga_region/region1 @@ -231,7 +237,7 @@ Application needs to search each regionX folder, if feature device is found, (e.g. "dfl-port.n" or "dfl-fme.m" is found), then it's the base fpga region which represents the FPGA device. -Each base region has one FME and two ports (AFUs) as child devices: +Each base region has one FME and two ports (AFUs) as child devices:: /sys/class/fpga_region/region0/dfl-fme.0 /sys/class/fpga_region/region0/dfl-port.0 @@ -243,7 +249,7 @@ Each base region has one FME and two ports (AFUs) as child devices: /sys/class/fpga_region/region3/dfl-port.3 ... -In general, the FME/AFU sysfs interfaces are named as follows: +In general, the FME/AFU sysfs interfaces are named as follows:: /sys/class/fpga_region/// /sys/class/fpga_region/// @@ -251,7 +257,7 @@ In general, the FME/AFU sysfs interfaces are named as follows: with 'n' consecutively numbering all FMEs and 'm' consecutively numbering all ports. -The device nodes used for ioctl() or mmap() can be referenced through: +The device nodes used for ioctl() or mmap() can be referenced through:: /sys/class/fpga_region///dev /sys/class/fpga_region///dev -- 2.20.1