move gic to new devtree interface
[lunaix-os.git] / lunaix-os / hal / devtree / dt.c
index a4265512c5e7effc6d39f7a30821189e33239c4b..ee68cf63d8a9405361903809b1cc9a2b5e39c389 100644 (file)
@@ -759,11 +759,21 @@ dtpx_compile_proplet(struct dtprop_def* proplet)
 {
     int i;
     unsigned int acc = 0;
+    struct dtprop_def* pl;
     
     for (i = 0; proplet[i].type && i < 10; ++i)
     {
-        proplet[i].acc_sz = acc;
-        acc += proplet[i].cell;
+        pl = &proplet[i];
+
+        if (pl->type == DTP_COMPX) {
+            if (pl->cell == 1) 
+                pl->type = DTP_U32;
+            else if (pl->cell == 2)
+                pl->type = DTP_U64;
+        }
+
+        pl->acc_sz = acc;
+        acc += pl->cell;
     }
 
     if (proplet[i - 1].type && i == 10) {
@@ -856,7 +866,9 @@ dtpx_extract_at(struct dtpropx* propx,
         } break;
 
         case DTP_COMPX:
-            val->composite = enc;
+            {
+                val->composite = enc;
+            }
             break;
         
         default: