<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/fdt_support.c, branch v2020.01</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>common: fdt_support: add support for setting usable memory</title>
<updated>2019-12-06T11:09:25+00:00</updated>
<author>
<name>Igor Opaniuk</name>
<email>igor.opaniuk@toradex.com</email>
</author>
<published>2019-12-03T12:04:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=949b5a969d107613b61a1e5eaf9e43c75a97f42c'/>
<id>949b5a969d107613b61a1e5eaf9e43c75a97f42c</id>
<content type='text'>
Add support for setting linux,usable-memory property in the memory
node of device tree for the kernel [1].

This property holds a base address and size, describing a
limited region in which memory may be considered available for use by
the kernel. Memory outside of this range is not available for use.

[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/chosen.txt

Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Signed-off-by: Sanchayan Maity &lt;maitysanchayan@gmail.com&gt;
Signed-off-by: Stefan Agner &lt;stefan.agner@toradex.com&gt;
Reviewed-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for setting linux,usable-memory property in the memory
node of device tree for the kernel [1].

This property holds a base address and size, describing a
limited region in which memory may be considered available for use by
the kernel. Memory outside of this range is not available for use.

[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/chosen.txt

Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Signed-off-by: Sanchayan Maity &lt;maitysanchayan@gmail.com&gt;
Signed-off-by: Stefan Agner &lt;stefan.agner@toradex.com&gt;
Reviewed-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: Fix alignment issue when reading 64-bits properties from fdt</title>
<updated>2019-10-27T19:01:53+00:00</updated>
<author>
<name>Jean-Jacques Hiblot</name>
<email>jjhiblot@ti.com</email>
</author>
<published>2019-10-22T08:05:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d60ae4c59df55c08dc96202ff58fed21ab3afb7d'/>
<id>d60ae4c59df55c08dc96202ff58fed21ab3afb7d</id>
<content type='text'>
The FDT specification [0] gives a requirement of aligning properties on
32-bits. Make sure that the compiler is aware of this constraint when
accessing 64-bits properties.

[0]: https://github.com/devicetree-org/devicetree-specification/blob/master/source/flattened-format.rst

Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@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>
The FDT specification [0] gives a requirement of aligning properties on
32-bits. Make sure that the compiler is aware of this constraint when
accessing 64-bits properties.

[0]: https://github.com/devicetree-org/devicetree-specification/blob/master/source/flattened-format.rst

Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Move env_get() to env.h</title>
<updated>2019-08-11T20:43:41+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-08-01T15:46:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7b51b576d6db714e8668a98de67e93651e18123c'/>
<id>7b51b576d6db714e8668a98de67e93651e18123c</id>
<content type='text'>
Move env_get() over to the new header file.

Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move env_get() over to the new header file.

Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: fdt_support: Add missing cpu_to_fdt32() to fdt_pci_dma_ranges()</title>
<updated>2019-07-24T19:54:08+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut@gmail.com</email>
</author>
<published>2019-07-09T00:49:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=867aaf6806d9518366141b332ec42af8bcf95fff'/>
<id>867aaf6806d9518366141b332ec42af8bcf95fff</id>
<content type='text'>
The fdt_pci_dma_ranges() cannot work on e.g. ARM, since the DT entries
endianness is not adjusted at all. Fix this.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@gmail.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fdt_pci_dma_ranges() cannot work on e.g. ARM, since the DT entries
endianness is not adjusted at all. Fix this.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@gmail.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: make fdt_get_base_address() return OF_BAD_ADDR when "reg" not found</title>
<updated>2019-07-24T19:54:08+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2019-06-27T07:39:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e3665ba9d7c82f75c4dbd2057276a6990929be40'/>
<id>e3665ba9d7c82f75c4dbd2057276a6990929be40</id>
<content type='text'>
Currently, fdt_get_base_address() returns 0 if the "reg" property is
missing. Since 0 is a valid value, it is not suitable for the error
handling. Return OF_BAD_ADDR instead.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.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>
Currently, fdt_get_base_address() returns 0 if the "reg" property is
missing. Since 0 is a valid value, it is not suitable for the error
handling. Return OF_BAD_ADDR instead.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.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>common: fdt_support: Check mtdparts cell size</title>
<updated>2019-05-21T23:33:23+00:00</updated>
<author>
<name>Stefan Mavrodiev</name>
<email>stefan@olimex.com</email>
</author>
<published>2019-04-24T05:31:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3a9a62a18e57b1ed3adbe3a3d00b9793ec55c08f'/>
<id>3a9a62a18e57b1ed3adbe3a3d00b9793ec55c08f</id>
<content type='text'>
When using fdt_fixup_mtdparts() offset and length cell sizes
are limited to 4 bytes (1 cell). However if the mtd device is
bigger then 4GiB, then #address-cells and #size-cells are
8 bytes (2 cells) [1].

This patch read #size-cells and uses either fdt32_t or
fdt64_t cell size. The default is fdt32_t.

[1] Documentation/devicetree/bindings/mtd/partition.txt

Signed-off-by: Stefan Mavrodiev &lt;stefan@olimex.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using fdt_fixup_mtdparts() offset and length cell sizes
are limited to 4 bytes (1 cell). However if the mtd device is
bigger then 4GiB, then #address-cells and #size-cells are
8 bytes (2 cells) [1].

This patch read #size-cells and uses either fdt32_t or
fdt64_t cell size. The default is fdt32_t.

[1] Documentation/devicetree/bindings/mtd/partition.txt

Signed-off-by: Stefan Mavrodiev &lt;stefan@olimex.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt_shrink_to_minimum: do not mark fdt space reserved unconditionally</title>
<updated>2019-05-09T23:52:55+00:00</updated>
<author>
<name>Simon Goldschmidt</name>
<email>simon.k.r.goldschmidt@gmail.com</email>
</author>
<published>2019-05-03T19:19:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=59bd796801cf6bf3fb4c27d8c2309c9b603838e3'/>
<id>59bd796801cf6bf3fb4c27d8c2309c9b603838e3</id>
<content type='text'>
This function merely relocates the fdt blob, so don't let it alter
it by adding reservations that didn't exist before.

Instead, if the memory used for the fdt blob has been reserved
before calling this function, ensure the relocated memory is
marked as reserved instead.

Reported-by: Keerthy &lt;j-keerthy@ti.com&gt;
Reported-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Reviewed-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function merely relocates the fdt blob, so don't let it alter
it by adding reservations that didn't exist before.

Instead, if the memory used for the fdt blob has been reserved
before calling this function, ensure the relocated memory is
marked as reserved instead.

Reported-by: Keerthy &lt;j-keerthy@ti.com&gt;
Reported-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Reviewed-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: Remove duplicate code</title>
<updated>2019-04-12T02:10:05+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>treding@nvidia.com</email>
</author>
<published>2019-03-01T18:20:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1ceb10b4d872b29ba251bc49665f1b8812d70acf'/>
<id>1ceb10b4d872b29ba251bc49665f1b8812d70acf</id>
<content type='text'>
Commit 6d29cc7dcf2d ("fdt: Fixup only valid memory banks") ended up
being merged twice, first as:

	commit 6d29cc7dcf2d35966aa0b6119fd1cbca0d21d5e6
	Author:     Thierry Reding &lt;treding@nvidia.com&gt;
	AuthorDate: Tue Jan 30 11:34:17 2018 +0100
	Commit:     Simon Glass &lt;sjg@chromium.org&gt;
	CommitDate: Sun Feb 18 12:53:38 2018 -0700

	    fdt: Fixup only valid memory banks

	    Memory banks with address 0 and size 0 are empty and should not be
	    passed to the OS via device tree.

	    Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
	    Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;

and later again, though this time it was v2:

	commit ed5af03f9bb8905f1e94d68ab49f22d7f061d75f
	Author:     Thierry Reding &lt;treding@nvidia.com&gt;
	AuthorDate: Thu Feb 15 19:05:59 2018 +0100
	Commit:     Tom Rini &lt;trini@konsulko.com&gt;
	CommitDate: Fri Feb 23 10:40:50 2018 -0500

	    fdt: Fixup only valid memory banks

	    Memory banks with address 0 and size 0 are empty and should not be
	    passed to the OS via device tree.

	    Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;
	    Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;

The second version was slightly different, so the main hunk of the patch
was applied twice. This isn't harmful because the code is idempotent,
but it's wasteful to run the same code twice.

Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 6d29cc7dcf2d ("fdt: Fixup only valid memory banks") ended up
being merged twice, first as:

	commit 6d29cc7dcf2d35966aa0b6119fd1cbca0d21d5e6
	Author:     Thierry Reding &lt;treding@nvidia.com&gt;
	AuthorDate: Tue Jan 30 11:34:17 2018 +0100
	Commit:     Simon Glass &lt;sjg@chromium.org&gt;
	CommitDate: Sun Feb 18 12:53:38 2018 -0700

	    fdt: Fixup only valid memory banks

	    Memory banks with address 0 and size 0 are empty and should not be
	    passed to the OS via device tree.

	    Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
	    Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;

and later again, though this time it was v2:

	commit ed5af03f9bb8905f1e94d68ab49f22d7f061d75f
	Author:     Thierry Reding &lt;treding@nvidia.com&gt;
	AuthorDate: Thu Feb 15 19:05:59 2018 +0100
	Commit:     Tom Rini &lt;trini@konsulko.com&gt;
	CommitDate: Fri Feb 23 10:40:50 2018 -0500

	    fdt: Fixup only valid memory banks

	    Memory banks with address 0 and size 0 are empty and should not be
	    passed to the OS via device tree.

	    Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;
	    Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;

The second version was slightly different, so the main hunk of the patch
was applied twice. This isn't harmful because the code is idempotent,
but it's wasteful to run the same code twice.

Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: fdt_support: print hexadecimal numbers in debug</title>
<updated>2019-01-15T00:47:13+00:00</updated>
<author>
<name>Sekhar Nori</name>
<email>nsekhar@ti.com</email>
</author>
<published>2018-12-06T09:50:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d8e9cf4d473fc223c272301351becb29bd18ed2a'/>
<id>d8e9cf4d473fc223c272301351becb29bd18ed2a</id>
<content type='text'>
We usually deal with hexadecimal addresses and sizes in
device-tree. Its much easier if debug logs print hexadecimal
values too.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Reviewed-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We usually deal with hexadecimal addresses and sizes in
device-tree. Its much easier if debug logs print hexadecimal
values too.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Reviewed-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
