diff mbox series

[021/110] doc: prettify OPAL_GET_DEVICE_TREE

Message ID 20190531061351.22973-22-stewart@linux.ibm.com
State Accepted
Headers show
Series Big documentation cleanup/expansion | expand

Commit Message

Stewart Smith May 31, 2019, 6:12 a.m. UTC
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 doc/opal-api/opal-get-device-tree-118.rst | 37 +++++++++++++----------
 1 file changed, 21 insertions(+), 16 deletions(-)
diff mbox series

Patch

diff --git a/doc/opal-api/opal-get-device-tree-118.rst b/doc/opal-api/opal-get-device-tree-118.rst
index af3fdf7044e1..df00205af310 100644
--- a/doc/opal-api/opal-get-device-tree-118.rst
+++ b/doc/opal-api/opal-get-device-tree-118.rst
@@ -1,36 +1,41 @@ 
+.. _OPAL_GET_DEVICE_TREE:
+
 OPAL_GET_DEVICE_TREE
 ====================
 
-Get device sub-tree.
+.. code-block:: c
+
+   #define OPAL_GET_DEVICE_TREE			118
 
-Parameters: ::
+   int64_t opal_get_device_tree(uint32_t phandle, uint64_t buf, uint64_t len);
+
+Get device sub-tree.
 
-	uint32_t phandle: root device node phandle of the device sub-tree
-	uint64_t buf: FDT blob buffer or NULL
-	uint64_t len: length of the FDT blob buffer
+``uint32_t phandle``
+  root device node phandle of the device sub-tree
+``uint64_t buf``
+  FDT blob buffer or NULL
+``uint64_t len``
+  length of the FDT blob buffer
 
-Calling:
 
 Retrieve device sub-tree. The root node's phandle is identified by @phandle.
 The typical use is for the kernel to update its device tree following a change
 in hardware (e.g. PCI hotplug).
 
-Return Codes:
+Return Codes
+^^^^^^^^^^^^
 
 FDT blob size
   returned FDT blob buffer size when ``buf`` is NULL
 
-OPAL_SUCCESS
+:ref:`OPAL_SUCCESS`
   FDT blob is created successfully
-
-OPAL_PARAMETER
+:ref:`OPAL_PARAMETER`
   invalid argument @phandle or @len
-
-OPAL_INTERNAL_ERROR
+:ref:`OPAL_INTERNAL_ERROR`
   failure creating FDT blob when calculating its size
-
-OPAL_NO_MEM
+:ref:`OPAL_NO_MEM`
   not enough room in buffer for device sub-tree
-
-OPAL_EMPTY
+:ref:`OPAL_EMPTY`
   failure creating FDT blob