aboutsummaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>2017-06-22 17:45:18 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-27 15:31:52 +1000
commit41444879ebb26a7242ec6a0ccb484279dff43977 (patch)
tree144b593eedb38e7c19edd77c6cafdb5d3b9b8b36 /libc
parent3ae55cca0ea3609bd90f2208b492cda37abb1cfe (diff)
downloadskiboot-41444879ebb26a7242ec6a0ccb484279dff43977.zip
skiboot-41444879ebb26a7242ec6a0ccb484279dff43977.tar.gz
skiboot-41444879ebb26a7242ec6a0ccb484279dff43977.tar.bz2
dt: Add phandle fixup helpers
When there is a new device tree that needs to be added to the main dt of the opal (ex, IMC catalog dtb loaded from pnor partition), we need to check for the phandle values in the new incoming device tree before attaching it. Reason is that, incoming device tree could already have phandle values initialized for its nodes. Now, if we attach this new device tree to the main opal DT, we could potentially hit phandle duplicate error (since the phandles value usually start with 1). To avoid this, a new helper function dt_adjust_subtree_phandle() is added to scan the incoming device tree and update node "phandle" accordingly based on the opal "last_phandle" value. Add to this, helper function also supports updates of "properties" with in a node which may refer the "phandle" value in the incoming device tree. Helper function will also fix the "properties" field accordingly. Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libc')
0 files changed, 0 insertions, 0 deletions