<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/dm/ofnode.h, branch v2020.04</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>dm: core: Add ofnode_get_chosen_prop()</title>
<updated>2020-02-06T02:33:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-01-27T15:49:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bd933bfd834364bca6cc6f3a62e4255090a5bec1'/>
<id>bd933bfd834364bca6cc6f3a62e4255090a5bec1</id>
<content type='text'>
Add a function to read a property from the chosen node, providing access
to its length. Update ofnode_get_chosen_string() to make use of it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a function to read a property from the chosen node, providing access
to its length. Update ofnode_get_chosen_string() to make use of it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Add ofnode_read_prop()</title>
<updated>2020-02-06T02:33:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-01-27T15:49:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a8167d8ee2305f688d970f7ea4c38d7ca9b205ca'/>
<id>a8167d8ee2305f688d970f7ea4c38d7ca9b205ca</id>
<content type='text'>
Add a new function to read a property that supports reading the length as
well.

Reimplement ofnode_read_string() using it and fix its comment.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new function to read a property that supports reading the length as
well.

Reimplement ofnode_read_string() using it and fix its comment.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Rename ofnode_get_chosen_prop()</title>
<updated>2020-02-06T02:33:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-01-27T15:49:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=14ca9f7f5abf7b94d71cfd466fb339bf64f58bda'/>
<id>14ca9f7f5abf7b94d71cfd466fb339bf64f58bda</id>
<content type='text'>
This function is actually intended to read a string rather than a
property. All of its current callers use it that way. Also there is no way
to return the length of the property from this function.

Rename it to better indicate its purpose, using ofnode_read as the prefix
since this matches most other functions.

Also add some tests which are missing for these functions.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function is actually intended to read a string rather than a
property. All of its current callers use it that way. Also there is no way
to return the length of the property from this function.

Rename it to better indicate its purpose, using ofnode_read as the prefix
since this matches most other functions.

Also add some tests which are missing for these functions.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Update comment for ofnode_get_chosen_node()</title>
<updated>2020-02-06T02:33:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-01-27T15:49:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=74d594a20e035a2dfce232093774c50d986cb9ff'/>
<id>74d594a20e035a2dfce232093774c50d986cb9ff</id>
<content type='text'>
The current comment is a big vague and misleading. Rewrite it to state
precisely what the function does.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current comment is a big vague and misleading. Rewrite it to state
precisely what the function does.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Fix offset_to_ofnode() with invalid offset</title>
<updated>2019-12-15T00:52:29+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-12-07T04:41:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b14c53398683952723540f82027fb0cbfba4f7de'/>
<id>b14c53398683952723540f82027fb0cbfba4f7de</id>
<content type='text'>
If the offset is -1 this function correctly sets up a null ofnode. But if
the offset is any other negative number (e.g. -FDT_ERR_BADPATH) then it
does the wrong thing.

An offset of -1 in ofnode indicates that the ofnode is not valid. Any
other negative value is not handled by ofnode_valid(). We could of course
change that function, but it seems much better to always use the same
value for an invalid node.

Fix it by setting the offset to -1 if it is invalid for any reason.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the offset is -1 this function correctly sets up a null ofnode. But if
the offset is any other negative number (e.g. -FDT_ERR_BADPATH) then it
does the wrong thing.

An offset of -1 in ofnode indicates that the ofnode is not valid. Any
other negative value is not handled by ofnode_valid(). We could of course
change that function, but it seems much better to always use the same
value for an invalid node.

Fix it by setting the offset to -1 if it is invalid for any reason.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Add functions to read 64-bit dt properties</title>
<updated>2019-09-06T02:39:15+00:00</updated>
<author>
<name>T Karthik Reddy</name>
<email>t.karthik.reddy@xilinx.com</email>
</author>
<published>2019-09-02T14:34:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3f3d77158b8452a16dca4a6966217b344f77f9b7'/>
<id>3f3d77158b8452a16dca4a6966217b344f77f9b7</id>
<content type='text'>
This patch adds functions dev_read_u64_default &amp; dev_read_u64
to read unsigned 64-bit values from devicetree.

Signed-off-by: T Karthik Reddy &lt;t.karthik.reddy@xilinx.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds functions dev_read_u64_default &amp; dev_read_u64
to read unsigned 64-bit values from devicetree.

Signed-off-by: T Karthik Reddy &lt;t.karthik.reddy@xilinx.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Introduce xxx_translate_dma_address()</title>
<updated>2019-07-22T07:21:28+00:00</updated>
<author>
<name>Fabien Dessenne</name>
<email>fabien.dessenne@st.com</email>
</author>
<published>2019-05-31T13:11:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=641067fb0c64dec8b6da962eb1d9fc49a6c7b499'/>
<id>641067fb0c64dec8b6da962eb1d9fc49a6c7b499</id>
<content type='text'>
Add the following functions to translate DMA address to CPU address:
- dev_translate_dma_address()
- ofnode_translate_dma_address()
- of_translate_dma_address()
- fdt_translate_dma_address()
These functions work the same way as xxx_translate_address(), with the
difference that the translation relies on the "dma-ranges" property
instead of the "ranges" property.

Add related test. Test report:
=&gt; ut dm fdt_translation
Test: dm_test_fdt_translation: test-fdt.c
Test: dm_test_fdt_translation: test-fdt.c (flat tree)
Failures: 0

Signed-off-by: Fabien Dessenne &lt;fabien.dessenne@st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the following functions to translate DMA address to CPU address:
- dev_translate_dma_address()
- ofnode_translate_dma_address()
- of_translate_dma_address()
- fdt_translate_dma_address()
These functions work the same way as xxx_translate_address(), with the
difference that the translation relies on the "dma-ranges" property
instead of the "ranges" property.

Add related test. Test report:
=&gt; ut dm fdt_translation
Test: dm_test_fdt_translation: test-fdt.c
Test: dm_test_fdt_translation: test-fdt.c (flat tree)
Failures: 0

Signed-off-by: Fabien Dessenne &lt;fabien.dessenne@st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: doc: add documentation for pre-reloc properties in SPL and TPL</title>
<updated>2019-07-10T22:52:58+00:00</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@st.com</email>
</author>
<published>2019-05-21T17:19:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=54e1223aa4ca5d65fe3c6497e92bee4453aeddac'/>
<id>54e1223aa4ca5d65fe3c6497e92bee4453aeddac</id>
<content type='text'>
Add documentation for the pre-reloc property in SPL and TPL device-tree:
- u-boot,dm-pre-proper
- u-boot,dm-pre-reloc
- u-boot,dm-spl
- u-boot,dm-tpl

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add documentation for the pre-reloc property in SPL and TPL device-tree:
- u-boot,dm-pre-proper
- u-boot,dm-pre-reloc
- u-boot,dm-spl
- u-boot,dm-tpl

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: ofnode: Have ofnode_read_u32_default return a u32</title>
<updated>2019-05-21T23:33:23+00:00</updated>
<author>
<name>Trent Piepho</name>
<email>tpiepho@impinj.com</email>
</author>
<published>2019-05-10T17:48:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b061ef39c350c288542536b09dc01d9e984a12ac'/>
<id>b061ef39c350c288542536b09dc01d9e984a12ac</id>
<content type='text'>
It was returning an int, which doesn't work if the u32 it is reading,
or the default value, will overflow a signed int.

While it could be made to work, when using a C standard/compiler where
casting negative signed values to unsigned has a defined behavior,
combined with careful casting, it seems obvious one is meant to use
ofnode_read_s32_default() with signed values.

Cc: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Trent Piepho &lt;tpiepho@impinj.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was returning an int, which doesn't work if the u32 it is reading,
or the default value, will overflow a signed int.

While it could be made to work, when using a C standard/compiler where
casting negative signed values to unsigned has a defined behavior,
combined with careful casting, it seems obvious one is meant to use
ofnode_read_s32_default() with signed values.

Cc: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Trent Piepho &lt;tpiepho@impinj.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: ofnode: Add ofnode_get_addr_size_index</title>
<updated>2019-05-21T23:33:23+00:00</updated>
<author>
<name>Keerthy</name>
<email>j-keerthy@ti.com</email>
</author>
<published>2019-04-24T11:49:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e679d03b08fbde6145fdef150f4b240e6d14448e'/>
<id>e679d03b08fbde6145fdef150f4b240e6d14448e</id>
<content type='text'>
Add ofnode_get_addr_size_index function to fetch the address
and size of the reg space based on index.

Signed-off-by: Keerthy &lt;j-keerthy@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add ofnode_get_addr_size_index function to fetch the address
and size of the reg space based on index.

Signed-off-by: Keerthy &lt;j-keerthy@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
