public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 06/50] doc: driver-model: Convert fdt-fixup.txt to reST
Date: Thu, 18 Jul 2019 00:33:51 -0700	[thread overview]
Message-ID: <1563435275-22326-7-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/{fdt-fixup.txt => fdt-fixup.rst} | 56 +++++++++++------------
 doc/driver-model/index.rst                        |  1 +
 2 files changed, 29 insertions(+), 28 deletions(-)
 rename doc/driver-model/{fdt-fixup.txt => fdt-fixup.rst} (89%)

diff --git a/doc/driver-model/fdt-fixup.txt b/doc/driver-model/fdt-fixup.rst
similarity index 89%
rename from doc/driver-model/fdt-fixup.txt
rename to doc/driver-model/fdt-fixup.rst
index 70344bd..974c090 100644
--- a/doc/driver-model/fdt-fixup.txt
+++ b/doc/driver-model/fdt-fixup.rst
@@ -1,15 +1,11 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. 2017-01-06, Mario Six <mario.six@gdsys.cc>
+
 Pre-relocation device tree manipulation
 =======================================
 
-Contents:
-
-1. Purpose
-2. Implementation
-3. Example
-4. Work to be done
-
-1. Purpose
-----------
+Purpose
+-------
 
 In certain markets, it is beneficial for manufacturers of embedded devices to
 offer certain ranges of products, where the functionality of the devices within
@@ -61,14 +57,16 @@ we have the pre-relocation driver model at our disposal at this stage, which
 means that we can query the hardware for the existence and variety of the
 components easily.
 
-2. Implementation
------------------
+Implementation
+--------------
 
 To take advantage of the pre-relocation device tree manipulation mechanism,
 boards have to implement the function board_fix_fdt, which has the following
 signature:
 
-int board_fix_fdt (void *rw_fdt_blob)
+.. code-block:: c
+
+   int board_fix_fdt (void *rw_fdt_blob)
 
 The passed-in void pointer is a writeable pointer to the device tree, which can
 be used to manipulate the device tree using e.g. functions from
@@ -79,10 +77,10 @@ unrecoverably halt the boot process, as with any function from init_sequence_f
 (in common/board_f.c).
 
 Furthermore, the Kconfig option OF_BOARD_FIXUP has to be set for the function
-to be called:
+to be called::
 
-Device Tree Control
--> [*] Board-specific manipulation of Device Tree
+   Device Tree Control
+   -> [*] Board-specific manipulation of Device Tree
 
 +----------------------------------------------------------+
 | WARNING: The actual manipulation of the device tree has  |
@@ -97,23 +95,27 @@ Device Tree Control
 Hence, the recommended layout of the board_fixup_fdt call-back function is the
 following:
 
-int board_fix_fdt(void *rw_fdt_blob)
-{
-	/* Collect information about device's hardware and store them in e.g.
-	   local variables */
+.. code-block:: c
+
+	int board_fix_fdt(void *rw_fdt_blob)
+	{
+		/*
+		 * Collect information about device's hardware and store
+		 * them in e.g. local variables
+		 */
 
-	/* Do device tree manipulation using the values previously collected */
+		/* Do device tree manipulation using the values previously collected */
 
-	/* Return 0 on successful manipulation and non-zero otherwise */
-}
+		/* Return 0 on successful manipulation and non-zero otherwise */
+	}
 
 If this convention is kept, both an "additive" approach, meaning that nodes for
 detected components are added to the device tree, as well as a "subtractive"
 approach, meaning that nodes for absent components are removed from the tree,
 as well as a combination of both approaches should work.
 
-3. Example
-----------
+Example
+-------
 
 The controlcenterdc board (board/gdsys/a38x/controlcenterdc.c) features a
 board_fix_fdt function, in which six GPIO expanders (which might be present or
@@ -123,10 +125,8 @@ subsequently deactivated in the device tree if they are not present.
 Note that the dm_i2c_simple_probe function does not use the device tree, hence
 it is safe to call it after the tree has already been manipulated.
 
-4. Work to be done
-------------------
+Work to be done
+---------------
 
 * The application of device tree overlay should be possible in board_fixup_fdt,
   but has not been tested at this stage.
-
-2017-01-06, Mario Six <mario.six@gdsys.cc>
diff --git a/doc/driver-model/index.rst b/doc/driver-model/index.rst
index 663aa5d..71ad062 100644
--- a/doc/driver-model/index.rst
+++ b/doc/driver-model/index.rst
@@ -7,4 +7,5 @@ Driver Model
    :maxdepth: 2
 
    design
+   fdt-fixup
    migration
-- 
2.7.4

  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 ` Bin Meng [this message]
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 ` [U-Boot] [PATCH 13/50] doc: driver-model: Convert remoteproc-framework.txt " Bin Meng
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-7-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