History log of /arch/powerpc/boot/devtree.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
49e6e3f1aec2d46f5865d3ada38fe9a5d660ef5d 19-Dec-2008 Scott Wood <scottwood@freescale.com> powerpc/bootwrapper: Use the child-bus #address-cells to decide which range entry to use

The correct #address-cells was still used for the actual translation,
so the impact is only a possibility of choosing the wrong range entry
or failing to find any match. Most common cases were not affected.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c
da0a5f0c65913e4ec0a70a5019ce0a7bcaab21c9 10-Apr-2008 Laurent Pinchart <laurentp@cse-semaphore.com> [POWERPC] Add bootwrapper function to get virtual reg from the device tree.

This patch adds a new generic device tree processing function that retrieves
virtual reg addresses from the device tree to the bootwrapper code. It also
updates the bootwrapper code to use the new function.

dt_get_virtual_reg() retrieves the virtual reg addresses from the
"virtual-reg" property. If the property can't be found, it uses the "reg"
property and walks the tree to translate it to absolute addresses.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
/arch/powerpc/boot/devtree.c
ad160681c8caa0a73e6abd3ac606cd857608f94a 15-Jan-2008 Kumar Gala <galak@kernel.crashing.org> [POWERPC] bootwrapper: Add find_node_by_alias and dt_fixup_mac_address_by_alias

Add the ability to set the mac address given the alias for the device.
Removes the need for having a linux,network-index property.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
/arch/powerpc/boot/devtree.c
27ff35d9026b5d41d66ed95b65d7819db4cf5fb1 24-Sep-2007 Scott Wood <scottwood@freescale.com> [POWERPC] bootwrapper: Factor out dt_set_mac_address()

This allows callers to set addresses one at a time when that would be more
convenient.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c
96ebc3bfb6ddedd5a400d5653b50551d5a3de439 05-Sep-2007 Scott Wood <scottwood@freescale.com> [POWERPC] bootwrapper: Only print MAC addresses when the node is actually present

Some firmwares (such as PlanetCore) only provide a base MAC address, and
expect the kernel to set certain bits to generate the addresses for the
other ports. As such, MAC addresses are generated that may not correspond
to actual hardware.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c
e5d8d54db25790524da34b0143f4e0176fb7677b 20-Aug-2007 Scott Wood <scottwood@freescale.com> [POWERPC] bootwrapper: Add PowerQUICC II (82xx with CPM) cuboot support

This allows booting on legacy, non-device-tree aware versions of U-boot.

It also fixes up the hardware to match the PCI and chipselect information
in the device tree, as u-boot is inconsistent in setting these up
correctly (or at all).

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c
a73ac50c4787b1b28d5c94bb18c60352f5dd7d6f 20-Aug-2007 Scott Wood <scottwood@freescale.com> [POWERPC] bootwrapper: Add dt_is_compatible()

This can be used rather than doing a simple strcmp, which will fail to
handle multiple compatible entries.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c
0602801c22ea1767cd0298b11da140bd5cb764d2 20-Aug-2007 Scott Wood <scottwood@freescale.com> [POWERPC] bootwrapper: dt_xlate_range() bugfixes

1. The check whether ranges fits in the buffer was using elements rather
than bytes.
2. Empty ranges were not properly treated as transparent, and missing
ranges were treated as transparent.
3. The loop terminated when translating from the root rather than to. Once
bug #2 was fixed, it failed due to a missing ranges in the root node.
4. In decoding the ranges property, the #size-cells used was that of
the parent, not the child.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c
643d3c139b0a5289d7f0ba19fdcb24be6d7e768f 20-Aug-2007 Scott Wood <scottwood@freescale.com> [POWERPC] bootwrapper: Set timebase_period_ns from dt_fixup_cpu_clocks

This lets udelay() work properly on platforms which use dt_fixup_cpu_clocks.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c
8895ea483e144f8acca16adfff7c60a993e77b7d 27-Apr-2007 Mark A. Greer <mgreer@mvista.com> [POWERPC] Add dt_xlate_addr() to bootwrapper

dt_xlate_reg() looks up the 'reg' property in the specified node
to get the address and size to translate. Add dt_xlate_addr()
which is passed in the address and size to translate.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c
e4bb688d9f11d7fee927312cc97d443472c7c212 26-Apr-2007 Scott Wood <scottwood@freescale.com> [POWERPC] bootwrapper: Fix array handling in dt_xlate_reg().

This fixes a few bugs in how dt_xlate_reg() handles address arrays:

1. copy_val() was copying into the wrong end of the array, resulting
in random stack garbage at the other end.
2. dt_xlate_reg() was getting the result from the wrong end of the array.
3. add_reg() and sub_reg() were treating the arrays as
little-endian rather than big-endian.
4. add_reg() only returned an error on a carry out of the entire
array, rather than out of the naddr portion.
5. The requested reg resource was checked to see if it exceeded
the size of the reg property, but not to see if it exceeded the
size of the buffer.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c
6e1af384f1c1742ae6d86bbf779d4fa020c509bc 26-Mar-2007 Scott Wood <scottwood@freescale.com> [POWERPC] bootwrapper: Add dt_xlate_reg(), and use it to find serial registers.

dt_xlate_reg() uses the ranges properties of a node's parentage to find
the absolute physical address of the node's registers.

The ns16550 driver uses this when no virtual-reg property is found.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c
27fbaa9702e548e74dffd21855769f6cedad42bd 22-Mar-2007 David Gibson <david@gibson.dropbear.id.au> [POWERPC] Add device tree utility functions to zImage

This patch adds a library of useful device tree manipulation functions
to the zImage library, for use by platform code. These functions are
based on the hooks already in dt_ops, so they're not dependent on a
particular device tree implementation. This patch also slightly
streamlines the code in main.c using these new functions.

This is a consolidation of my work in this area with Scott Wood's
patches to a very similar end.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/arch/powerpc/boot/devtree.c