aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/boot/devtree.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner1-5/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2008-12-21powerpc/bootwrapper: Use the child-bus #address-cells to decide which range ↵Scott Wood1-1/+1
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2008-04-17[POWERPC] Add bootwrapper function to get virtual reg from the device tree.Laurent Pinchart1-0/+20
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 <[email protected]> Acked-by: Scott Wood <[email protected]> Signed-off-by: Kumar Gala <[email protected]>
2008-01-23[POWERPC] bootwrapper: Add find_node_by_alias and dt_fixup_mac_address_by_aliasKumar Gala1-0/+14
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 <[email protected]>
2007-10-03[POWERPC] bootwrapper: Factor out dt_set_mac_address()Scott Wood1-14/+17
This allows callers to set addresses one at a time when that would be more convenient. Signed-off-by: Scott Wood <[email protected]> Acked-by: David Gibson <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2007-09-14[POWERPC] bootwrapper: Only print MAC addresses when the node is actually ↵Scott Wood1-4/+6
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 <[email protected]> Acked-by: David Gibson <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2007-08-22[POWERPC] bootwrapper: Add PowerQUICC II (82xx with CPM) cuboot supportScott Wood1-3/+3
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 <[email protected]> Acked-by: David Gibson <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2007-08-22[POWERPC] bootwrapper: Add dt_is_compatible()Scott Wood1-15/+33
This can be used rather than doing a simple strcmp, which will fail to handle multiple compatible entries. Signed-off-by: Scott Wood <[email protected]> Acked-by: David Gibson <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2007-08-22[POWERPC] bootwrapper: dt_xlate_range() bugfixesScott Wood1-7/+13
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 <[email protected]> Acked-by: David Gibson <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2007-08-22[POWERPC] bootwrapper: Set timebase_period_ns from dt_fixup_cpu_clocksScott Wood1-0/+2
This lets udelay() work properly on platforms which use dt_fixup_cpu_clocks. Signed-off-by: Scott Wood <[email protected]> Acked-by: David Gibson <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2007-04-30[POWERPC] Add dt_xlate_addr() to bootwrapperMark A. Greer1-14/+33
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2007-04-27[POWERPC] bootwrapper: Fix array handling in dt_xlate_reg().Scott Wood1-12/+11
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2007-04-13[POWERPC] bootwrapper: Add dt_xlate_reg(), and use it to find serial registers.Scott Wood1-0/+178
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2007-04-13[POWERPC] Add device tree utility functions to zImageDavid Gibson1-0/+111
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>