<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/fdt_support.c, branch v2010.09</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>ppc4xx/fdt/flash: Change fdt_fixup_nor_flash_node() to not rely on cs size</title>
<updated>2010-09-23T06:49:49+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2010-09-16T12:01:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8a805df13615667ebdcc9f3a3a6fbf6c7778a992'/>
<id>8a805df13615667ebdcc9f3a3a6fbf6c7778a992</id>
<content type='text'>
This patch changes the behaviour of the fdt_fixup_nor_flash_node()
function. Now it doesn't patch the size of the "reg" property with the
chip-select size, but with the size returned from the new function
flash_get_bank_size(). This function will return per weak default the
flash size of the bank (bank = chip-select numer) detected by the flash
driver. If this does not fit your needs, this function may be overridden
by a board specific one.

For this the parameters needed to be changed. So I intentionally squashed
the PPC4xx stuff using this routine into this patch. Otherwise it would
not be git-bisectable anymore.

The board specific function for the AMCC/APM Ebony eval board is now
included in this patch version.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Tested-by: Detlev Zundel &lt;dzu@denx.de&gt;
Cc: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes the behaviour of the fdt_fixup_nor_flash_node()
function. Now it doesn't patch the size of the "reg" property with the
chip-select size, but with the size returned from the new function
flash_get_bank_size(). This function will return per weak default the
flash size of the bank (bank = chip-select numer) detected by the flash
driver. If this does not fit your needs, this function may be overridden
by a board specific one.

For this the parameters needed to be changed. So I intentionally squashed
the PPC4xx stuff using this routine into this patch. Otherwise it would
not be git-bisectable anymore.

The board specific function for the AMCC/APM Ebony eval board is now
included in this patch version.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Tested-by: Detlev Zundel &lt;dzu@denx.de&gt;
Cc: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: call fdt_parent_offset fewer times while translating addresses</title>
<updated>2010-08-20T02:21:41+00:00</updated>
<author>
<name>Scott Wood</name>
<email>scottwood@freescale.com</email>
</author>
<published>2010-08-12T23:37:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6395f318e9ddf26817a01f0b3877af0e3e47d056'/>
<id>6395f318e9ddf26817a01f0b3877af0e3e47d056</id>
<content type='text'>
fdt_parent_offset() is an expensive operation, so we'd like to reduce
unnecessary calls to it.

Further, the practice of iterating up to the root if address/size cells
aren't found was apparently done for Linux for compatibility with certain
buggy Open Firmware implementations, and U-Boot inherited the code.  The
compliant behavior is to treat a missing #address-cells as 2, and a missing
#size-cells as 1 -- never looking anywhere but the immediate parent of the
node of interest.

Signed-off-by: Scott Wood &lt;scottwood@freescale.com&gt;
Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fdt_parent_offset() is an expensive operation, so we'd like to reduce
unnecessary calls to it.

Further, the practice of iterating up to the root if address/size cells
aren't found was apparently done for Linux for compatibility with certain
buggy Open Firmware implementations, and U-Boot inherited the code.  The
compliant behavior is to treat a missing #address-cells as 2, and a missing
#size-cells as 1 -- never looking anywhere but the immediate parent of the
node of interest.

Signed-off-by: Scott Wood &lt;scottwood@freescale.com&gt;
Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: Fix bug in size calculation in fdt_resize() with initrd use</title>
<updated>2010-08-08T23:10:30+00:00</updated>
<author>
<name>Feng Wang</name>
<email>fwang02@harris.com</email>
</author>
<published>2010-08-03T14:22:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3840ebfaf8f3af46d1046ce63dbebc22f2b39349'/>
<id>3840ebfaf8f3af46d1046ce63dbebc22f2b39349</id>
<content type='text'>
Original bug description from Feng (fdt_resize() bug caused "WARNING:
could not set linux, initrd-start FDT_ERR_NOSPACE."):

What I got is an error: "WARNING: could not set linux,initrd-start
FDT_ERR_NOSPACE." after loading Device Tree blob. This in turn caused
linux to miss init part.

After some digging, I found out the reason for this error, it is caused
by fdt_resize().

FDT blob got resized after filling in all board specific information of
PowerPC. (in boot_body_linux()). It reduced blob size with only extra
space for two fdt_reserve_entry, one for fdt itself, and one for initrd.
Then it's aligned to a 0x1000 page boundary. However, later in
fdt_initrd(), it could add two more properties, initrd-start AND
initrd-end, each one needs at least two fdt_reserve_entry sizes done by
_fdt_add_property() (name and value). Thus, the two fdt_reserve_entry
extra space is not sufficient.

So for some specific fdt size which is just under the page boundary
after resizing, this will cause an error of FDT_ERR_NOSPACE in
fdt_initrd() when setting those two properties, and failed to pass
initrd information to linux.

My fix is in fdt_resize(), leave at least 4 fdt_reserve_entry for
initrd. So instead of 2*sizeof(struct fdt_reserve_entry) for
actual_totalsize, use 5*sizeof(struc fdt_reserve_entry).

Stefan: I got this same error on katmai, when trying to boot with
initrd (run flash_self). This patch fixes this issue.

Signed-off-by: Feng Wang &lt;fwang02@harris.com&gt;
Tested-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Jerry Van Baren &lt;gvb.uboot@gmail.com&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Original bug description from Feng (fdt_resize() bug caused "WARNING:
could not set linux, initrd-start FDT_ERR_NOSPACE."):

What I got is an error: "WARNING: could not set linux,initrd-start
FDT_ERR_NOSPACE." after loading Device Tree blob. This in turn caused
linux to miss init part.

After some digging, I found out the reason for this error, it is caused
by fdt_resize().

FDT blob got resized after filling in all board specific information of
PowerPC. (in boot_body_linux()). It reduced blob size with only extra
space for two fdt_reserve_entry, one for fdt itself, and one for initrd.
Then it's aligned to a 0x1000 page boundary. However, later in
fdt_initrd(), it could add two more properties, initrd-start AND
initrd-end, each one needs at least two fdt_reserve_entry sizes done by
_fdt_add_property() (name and value). Thus, the two fdt_reserve_entry
extra space is not sufficient.

So for some specific fdt size which is just under the page boundary
after resizing, this will cause an error of FDT_ERR_NOSPACE in
fdt_initrd() when setting those two properties, and failed to pass
initrd information to linux.

My fix is in fdt_resize(), leave at least 4 fdt_reserve_entry for
initrd. So instead of 2*sizeof(struct fdt_reserve_entry) for
actual_totalsize, use 5*sizeof(struc fdt_reserve_entry).

Stefan: I got this same error on katmai, when trying to boot with
initrd (run flash_self). This patch fixes this issue.

Signed-off-by: Feng Wang &lt;fwang02@harris.com&gt;
Tested-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Jerry Van Baren &lt;gvb.uboot@gmail.com&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: Add function to alloc phandle values</title>
<updated>2010-07-26T18:07:56+00:00</updated>
<author>
<name>Kumar Gala</name>
<email>galak@kernel.crashing.org</email>
</author>
<published>2010-07-09T21:18:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b4b847e95169802b08ea5df6d7dd87fbb2d468aa'/>
<id>b4b847e95169802b08ea5df6d7dd87fbb2d468aa</id>
<content type='text'>
If we are creating reference (handles) to nodes in a device tree we need
to first create a new phandle in node and this needs a new phandle
value.  So we search through the whole dtb to find the max phandle value
and return the next greater value for a new phandle allocation.

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we are creating reference (handles) to nodes in a device tree we need
to first create a new phandle in node and this needs a new phandle
value.  So we search through the whole dtb to find the max phandle value
and return the next greater value for a new phandle allocation.

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: Add fdt_node_offset_by_compat_reg helper</title>
<updated>2010-07-20T09:40:06+00:00</updated>
<author>
<name>Kumar Gala</name>
<email>galak@kernel.crashing.org</email>
</author>
<published>2010-07-04T17:48:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=75e73afd5784c0df6a5e35c5a5b2e2fce0296bc0'/>
<id>75e73afd5784c0df6a5e35c5a5b2e2fce0296bc0</id>
<content type='text'>
Given a compatible string and physical address try and find a node that
matches.  This is useful when we want to find a specific device node to
update (for example if we have multiple PCI nodes we can use the
physical address to distinguish them when trying to update the device
tree).

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Given a compatible string and physical address try and find a node that
matches.  This is useful when we want to find a specific device node to
update (for example if we have multiple PCI nodes we can use the
physical address to distinguish them when trying to update the device
tree).

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: Add fdt_translate_address to convert reg node to cpu phys addr</title>
<updated>2010-07-20T09:40:00+00:00</updated>
<author>
<name>Kumar Gala</name>
<email>galak@kernel.crashing.org</email>
</author>
<published>2010-06-16T19:27:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a0342c0804251c84a7ec1a2c78ea3bb30b5b5058'/>
<id>a0342c0804251c84a7ec1a2c78ea3bb30b5b5058</id>
<content type='text'>
This code is extracted out of the Linux Kernel code from
arch/powerpc/kernel/prom_parse.c.

We maintain some of the same structure to support multiple bus types even
though we only have one in the current code.  In the future we might want
to translate across a PCI bus and thus it will be easier to add that
functionality back in.

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This code is extracted out of the Linux Kernel code from
arch/powerpc/kernel/prom_parse.c.

We maintain some of the same structure to support multiple bus types even
though we only have one in the current code.  In the future we might want
to translate across a PCI bus and thus it will be easier to add that
functionality back in.

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: move fsl specific code from common fdt area to mpc8xxx/fdt.c</title>
<updated>2010-07-16T15:55:07+00:00</updated>
<author>
<name>Kim Phillips</name>
<email>kim.phillips@freescale.com</email>
</author>
<published>2010-05-28T08:00:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5d0c3b57b2c6dc58c4626b036b1cc767619b19f4'/>
<id>5d0c3b57b2c6dc58c4626b036b1cc767619b19f4</id>
<content type='text'>
Signed-off-by: Kim Phillips &lt;kim.phillips@freescale.com&gt;
Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Kim Phillips &lt;kim.phillips@freescale.com&gt;
Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt_support: add entry for sec3.1 and fix sec3.3</title>
<updated>2010-05-30T16:14:37+00:00</updated>
<author>
<name>Kim Phillips</name>
<email>kim.phillips@freescale.com</email>
</author>
<published>2010-04-23T17:20:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3057c6be5efda781a72ca04432e0a4ed6e670030'/>
<id>3057c6be5efda781a72ca04432e0a4ed6e670030</id>
<content type='text'>
Add sec3.1 h/w geometry for fdt node fixups.

Also, technically, whilst SEC v3.3 h/w honours the tls_ssl_stream descriptor
type, it lacks the ARC4 algorithm execution unit required to be able
to execute anything meaningful with it.  Change the node to agree with
the documentation that declares that the sec3.3 really doesn't have such
a descriptor type.

Reported-by: Haiying Wang &lt;Haiying.Wang@freescale.com&gt;
Signed-off-by: Kim Phillips &lt;kim.phillips@freescale.com&gt;
Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add sec3.1 h/w geometry for fdt node fixups.

Also, technically, whilst SEC v3.3 h/w honours the tls_ssl_stream descriptor
type, it lacks the ARC4 algorithm execution unit required to be able
to execute anything meaningful with it.  Change the node to agree with
the documentation that declares that the sec3.3 really doesn't have such
a descriptor type.

Reported-by: Haiying Wang &lt;Haiying.Wang@freescale.com&gt;
Signed-off-by: Kim Phillips &lt;kim.phillips@freescale.com&gt;
Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: Add fdt_del_node_and_alias helper</title>
<updated>2010-04-07T05:08:18+00:00</updated>
<author>
<name>Kumar Gala</name>
<email>galak@kernel.crashing.org</email>
</author>
<published>2010-03-30T15:19:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=49b97d9c8ea7b11c4fc9e457cc2cd9fd6ebf0c21'/>
<id>49b97d9c8ea7b11c4fc9e457cc2cd9fd6ebf0c21</id>
<content type='text'>
Add a helper function that given an alias will delete both the node
the alias points to and the alias itself

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a helper function that given an alias will delete both the node
the alias points to and the alias itself

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt_support: add partitions fixup in mtd node</title>
<updated>2010-03-21T21:44:59+00:00</updated>
<author>
<name>Anatolij Gustschin</name>
<email>agust@denx.de</email>
</author>
<published>2010-03-16T16:10:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3c950e2ebfde083084cc926b020e3a22a536bf85'/>
<id>3c950e2ebfde083084cc926b020e3a22a536bf85</id>
<content type='text'>
Allow overwriting defined partitions in the device tree blob
using partition info defined in the 'mtdparts' environment
variable.

Signed-off-by: Anatolij Gustschin &lt;agust@denx.de&gt;
Cc: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow overwriting defined partitions in the device tree blob
using partition info defined in the 'mtdparts' environment
variable.

Signed-off-by: Anatolij Gustschin &lt;agust@denx.de&gt;
Cc: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
