From: Pankaj Gupta Date: Fri, 7 Dec 2018 07:35:36 +0000 (+0530) Subject: ccn: for RN-I, used node id instead of node postion X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2f2b9ec8228ecd0b140d3fd5b3b3e1909ed12281;p=project%2Fbcm63xx%2Fatf.git ccn: for RN-I, used node id instead of node postion For RN-I, node id is used instead of node postion in the bitmap to calculate the region id. Signed-off-by: Pankaj Gupta --- diff --git a/drivers/arm/ccn/ccn.c b/drivers/arm/ccn/ccn.c index 59a7576c..d46e0208 100644 --- a/drivers/arm/ccn/ccn.c +++ b/drivers/arm/ccn/ccn.c @@ -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; }