Skip to content
Commit fe140423 authored by Stephen Neuendorffer's avatar Stephen Neuendorffer Committed by Grant Likely
Browse files

of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree



unflatten_device_tree has two dependencies on things that happen
during boot time.  Firstly, it references the initial device tree
directly. Secondly, it allocates memory using the early boot
allocator.  This patch factors out these dependencies and uses
the new __unflatten_device_tree function to implement a driver-visible
fdt_unflatten_tree function, which can be used to unflatten a
blob after boot time.

V2:
- remove extra __va() call
- make dt_alloc functions return void *.  This doesn't fix the general
  strangeness in this code that constantly casts back and forth between
  unsigned long and __be32 *

Signed-off-by: default avatarStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 57d00ecf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment