Skip to content

Commit

Permalink
core/opal: check ibm,opal exists
Browse files Browse the repository at this point in the history
The ibm,opal node is normally created by Skiboot either in the HDAT parser
or after the input FDT has been unflattened. However, in order to supply
the /ibm,opal/power-mgt/enabled-stop-states property FDT we to tolerate
/ibm,opal/ existing in the input tree.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
oohal authored and stewartsmith committed Feb 17, 2017
1 parent 53a08f1 commit eeba2d6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/opal.c
Expand Up @@ -149,11 +149,7 @@ void add_opal_node(void)
size = (CPU_STACKS_BASE +
(uint64_t)(cpu_max_pir + 1) * STACK_SIZE) - SKIBOOT_BASE;

if (!opal_node) {
opal_node = dt_new(dt_root, "ibm,opal");
assert(opal_node);
}

opal_node = dt_new_check(dt_root, "ibm,opal");
dt_add_property_cells(opal_node, "#address-cells", 0);
dt_add_property_cells(opal_node, "#size-cells", 0);

Expand Down

0 comments on commit eeba2d6

Please sign in to comment.