ccn: for RN-I, used node id instead of node postion
authorPankaj Gupta <pankaj.gupta@nxp.com>
Fri, 7 Dec 2018 07:35:36 +0000 (13:05 +0530)
committerPankaj Gupta <pankaj.gupta@nxp.com>
Wed, 12 Dec 2018 03:48:27 +0000 (09:18 +0530)
For RN-I, node id is used instead of node postion in the bitmap
to calculate the region id.

Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
drivers/arm/ccn/ccn.c

index 59a7576cfe29a295840592cc74f89bf6f9076d6e..d46e02089168ecda6c3231d9a3234566f0d870b3 100644 (file)
@@ -553,7 +553,14 @@ static unsigned int get_region_id_for_node(node_types_t node_type,
                return REGION_ID_LIMIT;
        }
 
-       region_id += node_pos_in_map;
+       /*
+        * According to section 3.1.1 in CCN specification, region offset for
+        * the RN-I components is calculated as (128 + NodeID of RN-I).
+        */
+       if (node_type == NODE_TYPE_RNI)
+               region_id += node_id;
+       else
+               region_id += node_pos_in_map;
 
        return region_id;
 }