add ability to do intr-binding based on given device tree node
[lunaix-os.git] / lunaix-os / arch / aarch64 / includes / asm / soc / gic.h
index 35b9dc5e55aeed92d8997af6c018b1cdd0bd0ec5..f7c50684366c70b912448b4b0e4d7942923fe1e8 100644 (file)
@@ -4,6 +4,9 @@
 #include <lunaix/types.h>
 #include <lunaix/ds/bitmap.h>
 #include <lunaix/ds/hashtable.h>
+
+#include <hal/devtree.h>
+
 #include <asm/aa64_gic.h>
 #include <asm-generic/isrm.h>
 
@@ -63,6 +66,7 @@ struct gic_int_param
     enum gic_tri_type trigger;
     enum gic_grp_type group;
     unsigned int priority;
+    unsigned int rel_intid;
     int cpu_id;
     bool as_nmi;
     bool ext_range;
@@ -182,10 +186,8 @@ struct arm_gic
     } mmrs;
 
     struct {
-        union {
-            ptr_t prop;
-            lpi_entry_t* property;
-        };
+        ptr_t prop_pa;
+        lpi_entry_t* prop_table;
         
         ptr_t pend;
         BITMAP(gic_bmp) pendings;
@@ -201,4 +203,11 @@ struct arm_gic
     } idomain;
 };
 
+void
+gic_create_from_dt(struct arm_gic* gic);
+
+unsigned int;
+gic_dtprop_interpret(struct gic_int_param* param, 
+                     struct dt_prop_val* val, int width);
+
 #endif /* __LUNAIX_GIC_H */