From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 13/50] doc: driver-model: Convert remoteproc-framework.txt to reST
Date: Thu, 18 Jul 2019 00:33:58 -0700 [thread overview]
Message-ID: <1563435275-22326-14-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1563435275-22326-1-git-send-email-bmeng.cn@gmail.com>
Convert plain text documentation to reStructuredText format and add
it to Sphinx TOC tree. No essential content change.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---
doc/driver-model/index.rst | 1 +
...proc-framework.txt => remoteproc-framework.rst} | 181 +++++++++++----------
2 files changed, 92 insertions(+), 90 deletions(-)
rename doc/driver-model/{remoteproc-framework.txt => remoteproc-framework.rst} (50%)
diff --git a/doc/driver-model/index.rst b/doc/driver-model/index.rst
index fd33215..c6353dc 100644
--- a/doc/driver-model/index.rst
+++ b/doc/driver-model/index.rst
@@ -15,3 +15,4 @@ Driver Model
of-plat
pci-info
pmic-framework
+ remoteproc-framework
diff --git a/doc/driver-model/remoteproc-framework.txt b/doc/driver-model/remoteproc-framework.rst
similarity index 50%
rename from doc/driver-model/remoteproc-framework.txt
rename to doc/driver-model/remoteproc-framework.rst
index c6dc00d..f21de0a 100644
--- a/doc/driver-model/remoteproc-framework.txt
+++ b/doc/driver-model/remoteproc-framework.rst
@@ -1,19 +1,12 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2015
-# Texas Instruments Incorporated - http://www.ti.com/
-#
+.. SPDX-License-Identifier: GPL-2.0+
+.. (C) Copyright 2015
+.. Texas Instruments Incorporated - http://www.ti.com/
Remote Processor Framework
==========================
-TOC:
-1. Introduction
-2. How does it work - The driver
-3. Describing the device using platform data
-4. Describing the device using device tree
-1. Introduction
-===============
+Introduction
+------------
This is an introduction to driver-model for Remote Processors found
on various System on Chip(SoCs). The term remote processor is used to
@@ -24,43 +17,44 @@ the processor on which we are functional.
The simplified model depends on a single UCLASS - UCLASS_REMOTEPROC
UCLASS_REMOTEPROC:
-- drivers/remoteproc/rproc-uclass.c
-- include/remoteproc.h
+ - drivers/remoteproc/rproc-uclass.c
+ - include/remoteproc.h
Commands:
-- common/cmd_remoteproc.c
+ - common/cmd_remoteproc.c
Configuration:
-CONFIG_REMOTEPROC is selected by drivers as needed
-CONFIG_CMD_REMOTEPROC for the commands if required.
-
-2. How does it work - The driver
-=================================
-
-Overall, the driver statemachine transitions are typically as follows:
- (entry)
- +-------+
- +---+ init |
- | | | <---------------------+
- | +-------+ |
- | |
- | |
- | +--------+ |
-Load| | reset | |
- | | | <----------+ |
- | +--------+ | |
- | |Load | |
- | | | |
- | +----v----+ reset | |
- +-> | | (opt) | |
- | Loaded +-----------+ |
- | | |
- +----+----+ |
- | Start |
- +---v-----+ (opt) |
- +->| Running | Stop |
-Ping +- | +--------------------+
-(opt) +---------+
+ - CONFIG_REMOTEPROC is selected by drivers as needed
+ - CONFIG_CMD_REMOTEPROC for the commands if required.
+
+How does it work - The driver
+-----------------------------
+
+Overall, the driver statemachine transitions are typically as follows::
+
+ (entry)
+ +-------+
+ +---+ init |
+ | | | <---------------------+
+ | +-------+ |
+ | |
+ | |
+ | +--------+ |
+ Load| | reset | |
+ | | | <----------+ |
+ | +--------+ | |
+ | |Load | |
+ | | | |
+ | +----v----+ reset | |
+ +-> | | (opt) | |
+ | Loaded +-----------+ |
+ | | |
+ +----+----+ |
+ | Start |
+ +---v-----+ (opt) |
+ +->| Running | Stop |
+ Ping +- | +--------------------+
+ (opt) +---------+
(is_running does not change state)
opt: Optional state transition implemented by driver.
@@ -83,23 +77,25 @@ The driver follows a standard UCLASS DM.
in the bare minimum form:
-static const struct dm_rproc_ops sandbox_testproc_ops = {
- .load = sandbox_testproc_load,
- .start = sandbox_testproc_start,
-};
+.. code-block:: c
-static const struct udevice_id sandbox_ids[] = {
- {.compatible = "sandbox,test-processor"},
- {}
-};
+ static const struct dm_rproc_ops sandbox_testproc_ops = {
+ .load = sandbox_testproc_load,
+ .start = sandbox_testproc_start,
+ };
+
+ static const struct udevice_id sandbox_ids[] = {
+ {.compatible = "sandbox,test-processor"},
+ {}
+ };
-U_BOOT_DRIVER(sandbox_testproc) = {
- .name = "sandbox_test_proc",
- .of_match = sandbox_ids,
- .id = UCLASS_REMOTEPROC,
- .ops = &sandbox_testproc_ops,
- .probe = sandbox_testproc_probe,
-};
+ U_BOOT_DRIVER(sandbox_testproc) = {
+ .name = "sandbox_test_proc",
+ .of_match = sandbox_ids,
+ .id = UCLASS_REMOTEPROC,
+ .ops = &sandbox_testproc_ops,
+ .probe = sandbox_testproc_probe,
+ };
This allows for the device to be probed as part of the "init" command
or invocation of 'rproc_init()' function as the system dependencies define.
@@ -110,8 +106,8 @@ provide a load and start function. We assume here that the device
needs to be loaded and started, else, there is no real purpose of
using the remoteproc framework.
-3. Describing the device using platform data
-============================================
+Describing the device using platform data
+-----------------------------------------
*IMPORTANT* NOTE: THIS SUPPORT IS NOT MEANT FOR USE WITH NEWER PLATFORM
SUPPORT. THIS IS ONLY FOR LEGACY DEVICES. THIS MODE OF INITIALIZATION
@@ -121,16 +117,18 @@ TO DM/FDT.
Considering that many platforms are yet to move to device-tree model,
a simplified definition of a device is as follows:
-struct dm_rproc_uclass_pdata proc_3_test = {
- .name = "proc_3_legacy",
- .mem_type = RPROC_INTERNAL_MEMORY_MAPPED,
- .driver_plat_data = &mydriver_data;
-};
+.. code-block:: c
-U_BOOT_DEVICE(proc_3_demo) = {
- .name = "sandbox_test_proc",
- .platdata = &proc_3_test,
-};
+ struct dm_rproc_uclass_pdata proc_3_test = {
+ .name = "proc_3_legacy",
+ .mem_type = RPROC_INTERNAL_MEMORY_MAPPED,
+ .driver_plat_data = &mydriver_data;
+ };
+
+ U_BOOT_DEVICE(proc_3_demo) = {
+ .name = "sandbox_test_proc",
+ .platdata = &proc_3_test,
+ };
There can be additional data that may be desired depending on the
remoteproc driver specific needs (for example: SoC integration
@@ -138,30 +136,33 @@ details such as clock handle or something similar). See appropriate
documentation for specific remoteproc driver for further details.
These are passed via driver_plat_data.
-3. Describing the device using device tree
-==========================================
-/ {
- ...
- aliases {
+Describing the device using device tree
+---------------------------------------
+
+.. code-block: none
+
+ / {
...
- remoteproc0 = &rproc_1;
- remoteproc1 = &rproc_2;
+ aliases {
+ ...
+ remoteproc0 = &rproc_1;
+ remoteproc1 = &rproc_2;
- };
- ...
+ };
+ ...
- rproc_1: rproc at 1 {
- compatible = "sandbox,test-processor";
- remoteproc-name = "remoteproc-test-dev1";
- };
+ rproc_1: rproc at 1 {
+ compatible = "sandbox,test-processor";
+ remoteproc-name = "remoteproc-test-dev1";
+ };
- rproc_2: rproc at 2 {
- compatible = "sandbox,test-processor";
- internal-memory-mapped;
- remoteproc-name = "remoteproc-test-dev2";
+ rproc_2: rproc at 2 {
+ compatible = "sandbox,test-processor";
+ internal-memory-mapped;
+ remoteproc-name = "remoteproc-test-dev2";
+ };
+ ...
};
- ...
-};
aliases usage is optional, but it is usually recommended to ensure the
users have a consistent usage model for a platform.
--
2.7.4
next prev parent reply other threads:[~2019-07-18 7:33 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-18 7:33 [U-Boot] [PATCH 00/50] doc: Shape into useful HTML docs Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 01/50] doc: Move existing rst files into api sub-directory Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 02/50] doc: Add top-level description about U-Boot documentation Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 03/50] doc: Add driver-model to Sphinx TOC tree Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 04/50] doc: driver-model: Convert README.txt to reST Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 05/50] doc: driver-model: Convert MIGRATION.txt " Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 06/50] doc: driver-model: Convert fdt-fixup.txt " Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 07/50] doc: driver-model: Convert fs_firmware_loader.txt " Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 08/50] doc: driver-model: Convert i2c-howto.txt " Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 09/50] doc: driver-model: Convert livetree.txt " Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 10/50] doc: driver-model: Convert of-plat.txt " Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 11/50] doc: driver-model: Convert pci-info.txt " Bin Meng
2019-07-18 7:33 ` [U-Boot] [PATCH 12/50] doc: driver-model: Convert pmic-framework.txt " Bin Meng
2019-07-18 7:33 ` Bin Meng [this message]
2019-07-18 7:33 ` [U-Boot] [PATCH 14/50] doc: driver-model: Convert serial-howto.txt " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 15/50] doc: driver-model: Convert spi-howto.txt " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 16/50] doc: driver-model: Convert usb-info.txt " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 17/50] doc: Add architecture specific info to Sphinx TOC tree Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 18/50] doc: arch: Convert README.mips to reST Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 19/50] doc: Add board specific info to Sphinx TOC tree Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 20/50] doc: board: Add Intel Crown Bay board doc Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 21/50] doc: board: Add Intel Bay Trail based board docs Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 22/50] doc: board: Add Intel Cherry Hill board doc Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 23/50] doc: board: Add Intel Cougar Canyon 2 " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 24/50] doc: board: Add Intel Edison " Bin Meng
2019-07-18 18:27 ` Andy Shevchenko
2019-07-18 7:34 ` [U-Boot] [PATCH 25/50] doc: board: Add Intel Galileo " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 26/50] doc: board: Add Google Chromebook Link " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 27/50] doc: board: Add Google Chromebook Samus " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 28/50] doc: board: Add coreboot " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 29/50] doc: board: Add QEMU x86 " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 30/50] doc: board: Convert README.qemu-arm to reST Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 31/50] doc: board: Convert README.qemu-riscv " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 32/50] doc: board: Convert README.qemu-mips " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 33/50] doc: board: Add AndesTech ax25-ae350 board doc Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 34/50] doc: board: Convert README.ag101p to reST Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 35/50] doc: board: Convert README.sifive-fu540 " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 36/50] doc: board: Convert README.sh7752evb " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 37/50] doc: board: Convert README.sh7753evb " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 38/50] doc: board: Convert README.at91 " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 39/50] doc: board: Convert README.b4860qds " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 40/50] doc: board: Convert README.zynq " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 41/50] doc: arch: Convert README.x86 " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 42/50] doc: arch: Convert README.arm64 " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 43/50] doc: arch: Convert README.NDS32 " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 44/50] doc: arch: Convert README.nios2 " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 45/50] doc: arch: Convert README.ARC " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 46/50] doc: arch: Convert README.m68k " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 47/50] doc: arch: Convert README.sh " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 48/50] doc: arch: Convert README.sandbox " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 49/50] doc: arch: Convert README.xtensa " Bin Meng
2019-07-18 7:34 ` [U-Boot] [PATCH 50/50] doc: Remove README.blackfin Bin Meng
2019-07-23 6:20 ` [U-Boot] [PATCH 00/50] doc: Shape into useful HTML docs Bin Meng
2019-07-23 15:00 ` Wolfgang Denk
2019-07-23 15:29 ` Tom Rini
2019-07-24 4:59 ` Bin Meng
2019-07-24 4:53 ` Bin Meng
2019-07-24 7:08 ` Wolfgang Denk
2019-07-24 7:13 ` Bin Meng
2019-07-24 14:14 ` Tom Rini
2019-07-24 14:16 ` Bin Meng
2019-07-24 14:18 ` Tom Rini
2019-07-24 19:30 ` Heinrich Schuchardt
2019-07-24 20:05 ` Tom Rini
2019-07-25 18:31 ` Heinrich Schuchardt
2019-07-26 1:54 ` Bin Meng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1563435275-22326-14-git-send-email-bmeng.cn@gmail.com \
--to=bmeng.cn@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox