[Skiboot] [PATCH 2/4] core: Create event node to enable irqchip

Samuel Mendoza-Jonas sam at mendozajonas.com
Tue Jun 28 13:07:07 AEST 2016


This allows devices such as IPMI and serial consoles to use dynamic irq
numbers and have separate irq numbers in Linux.

Signed-off-by: Samuel Mendoza-Jonas <sam at mendozajonas.com>
Signed-off-by: Alistair Popple <alistair at popple.id.au>
---
 core/opal.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/core/opal.c b/core/opal.c
index a9d3c41..81b254f 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -129,6 +129,7 @@ void add_opal_node(void)
 {
 	uint64_t base, entry, size;
 	extern uint32_t opal_entry;
+	struct dt_node *opal_event;
 
 	/* XXX TODO: Reorg this. We should create the base OPAL
 	 * node early on, and have the various sub modules populate
@@ -158,6 +159,12 @@ void add_opal_node(void)
 	dt_add_property_u64(opal_node, "opal-entry-address", entry);
 	dt_add_property_u64(opal_node, "opal-runtime-size", size);
 
+	/* Add irqchip interrupt controller */
+	opal_event = dt_new(opal_node, "event");
+	dt_add_property_strings(opal_event, "compatible", "ibm,opal-event");
+	dt_add_property_cells(opal_event, "#interrupt-cells", 0x1);
+	dt_add_property(opal_event, "interrupt-controller", 0, 0);
+
 	add_opal_firmware_node();
 	add_associativity_ref_point();
 	memcons_add_properties();
-- 
2.9.0



More information about the Skiboot mailing list