From: Stewart Smith <stewart-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Stewart Smith
<stewart-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Subject: [PATCH 2/2] Syntax highlight C and DTS
Date: Fri, 28 Oct 2016 17:12:53 +1100 [thread overview]
Message-ID: <1477635173-9292-3-git-send-email-stewart@linux.vnet.ibm.com> (raw)
In-Reply-To: <1477635173-9292-1-git-send-email-stewart-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Signed-off-by: Stewart Smith <stewart-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
source/devicenodes.rst | 18 +++++++++---------
source/devicetree-basics.rst | 14 ++++++++------
source/flattened-format.rst | 6 +++---
3 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/source/devicenodes.rst b/source/devicenodes.rst
index e12aa95..78b5bdb 100644
--- a/source/devicenodes.rst
+++ b/source/devicenodes.rst
@@ -91,12 +91,12 @@ considering a string as a device path, shall detect and use the alias.
**Example**
-::
+.. code-block:: dts
aliases {
serial0 = "/simple-bus@fe000000/serial@llc500";
ethernet0 = "/simple-bus@fe000000/ethernet@31c000";
- }
+ };
Given the alias serial0, a client program can look at the aliases node
and determine the alias refers to the device path
@@ -168,7 +168,7 @@ and ``#size-cells = <2>``.
**Example #1**
-::
+.. code-block:: dts
memory@0 {
device_type = "memory";
@@ -178,7 +178,7 @@ and ``#size-cells = <2>``.
**Example #2**
-::
+.. code-block:: dts
memory@0 {
device_type = "memory";
@@ -234,7 +234,7 @@ time. It shall be a child of the root node.
**Example**
-::
+.. code-block:: dts
chosen {
bootargs = "root=/dev/nfs rw nfsroot=192.168.1.1 console=ttyS0,115200";
@@ -618,7 +618,7 @@ Example
Here is an example of a ``/cpus`` node with one child cpu node:
-::
+.. code-block:: dts
cpus {
#address-cells = <1>;
@@ -680,7 +680,7 @@ Example
See the following example of a devicetree representation of two CPUs,
each with their own on-chip L2 and a shared L3.
-::
+.. code-block:: dts
cpus {
#address-cells = <1>;
@@ -709,7 +709,7 @@ each with their own on-chip L2 and a shared L3.
cache-unified;
cache-size = <0x40000>; // 256 KB
cache-sets = <0x400>; // 1024
- cache-block-size =
+ cache-block-size = <32>;
cache-level = <3>;
};
};
@@ -730,7 +730,7 @@ each with their own on-chip L2 and a shared L3.
cache-unified;
cache-size = <0x40000>; // 256 KB
cache-sets = <0x400>; // 1024
- cache-line-size = <32> // 32 bytes
+ cache-line-size = <32>; // 32 bytes
next-level-cache = <&L3>; // phandle to L3
};
};
diff --git a/source/devicetree-basics.rst b/source/devicetree-basics.rst
index ba5281c..be80af3 100644
--- a/source/devicetree-basics.rst
+++ b/source/devicetree-basics.rst
@@ -463,7 +463,7 @@ Example:
See the following devicetree excerpt:
- ::
+ .. code-block:: dts
pic@10000000 {
phandle = <1>;
@@ -473,9 +473,11 @@ Example:
A *phandle* value of 1 is defined. Another device node could reference
the pic node with a phandle value of 1:
- ::
+ .. code-block:: dts
- interrupt-parent = <1>;
+ another-device-node {
+ interrupt-parent = <1>;
+ };
.. note:: Older versions of devicetrees may be encountered that contain a
deprecated form of this property called ``linux,phandle``. For
@@ -557,7 +559,7 @@ Example:
See the following devicetree excerpt:
- ::
+ .. code-block:: dts
soc {
#address-cells = <1>;
@@ -671,7 +673,7 @@ Description:
Address Translation Example:
- ::
+ .. code-block:: dts
soc {
compatible = "simple-bus";
@@ -1084,7 +1086,7 @@ interrupt controller.
.. _example-interrupt-mapping:
-::
+.. code-block:: dts
soc {
compatible = "simple-bus";
diff --git a/source/flattened-format.rst b/source/flattened-format.rst
index ba68f8a..ccac933 100644
--- a/source/flattened-format.rst
+++ b/source/flattened-format.rst
@@ -70,7 +70,7 @@ big-endian format.
**Flattened Devicetree Header Fields**
-::
+.. code-block:: c
struct fdt_header {
uint32_t magic;
@@ -208,7 +208,7 @@ The memory reservation block consists of a list of pairs of 64-bit
big-endian integers, each pair being represented by the following C
structure.
-::
+.. code-block:: c
struct fdt_reserve_entry {
uint64_t address;
@@ -273,7 +273,7 @@ The five token types are as follows:
describing the property. This data consists first of the property’s
length and name represented as the following C structure:
- ::
+ .. code-block:: c
struct {
uint32_t len;
--
2.7.4
next prev parent reply other threads:[~2016-10-28 6:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 6:12 [PATCH 0/2] Syntax highlighting Stewart Smith
[not found] ` <1477635173-9292-1-git-send-email-stewart-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-10-28 6:12 ` [PATCH 1/2] Enable syntax highlighting of device tree source Stewart Smith
2016-10-28 6:12 ` Stewart Smith [this message]
2016-11-15 23:04 ` [PATCH 0/2] Syntax highlighting Rob Herring
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=1477635173-9292-3-git-send-email-stewart@linux.vnet.ibm.com \
--to=stewart-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
--cc=devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).