Skip to content

Commit

Permalink
core/ipmi-opal: Add interrupt-parent property for ipmi node on P9 and…
Browse files Browse the repository at this point in the history
… above.

dtc complains below warning with newer 4.2+ kernels.
dts: Warning
(interrupts_property): Missing interrupt-parent for /ibm,opal/ipmi

This fix adds interrupt-parent property under /ibm,opal/ipmi DT node on P9
and above, which allows ipmi-opal to properly use the OPAL irqchip.

Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
[stewart: fix indentation]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
pridhiviraj authored and stewartsmith committed Mar 2, 2018
1 parent 28a414b commit f69d2ac
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/ipmi-opal.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static int64_t opal_ipmi_recv(uint64_t interface,

void ipmi_opal_init(void)
{
struct dt_node *opal_ipmi;
struct dt_node *opal_ipmi, *opal_event = NULL;

opal_ipmi = dt_new(opal_node, "ipmi");
dt_add_property_strings(opal_ipmi, "compatible", "ibm,opal-ipmi");
Expand All @@ -136,6 +136,12 @@ void ipmi_opal_init(void)
dt_add_property_cells(opal_ipmi, "interrupts",
ilog2(ipmi_backend->opal_event_ipmi_recv));

if (proc_gen >= proc_gen_p9)
opal_event = dt_find_by_name(opal_node, "event");
if (opal_event)
dt_add_property_cells(opal_ipmi, "interrupt-parent",
opal_event->phandle);

opal_register(OPAL_IPMI_SEND, opal_ipmi_send, 3);
opal_register(OPAL_IPMI_RECV, opal_ipmi_recv, 3);
}

0 comments on commit f69d2ac

Please sign in to comment.