diff options
author | danh-arm <dan.handley@arm.com> | 2016-05-27 11:07:20 +0100 |
---|---|---|
committer | danh-arm <dan.handley@arm.com> | 2016-05-27 11:07:20 +0100 |
commit | 8c94f82c678312fcdfc3eee8b819ca1c0da723fb (patch) | |
tree | 003037879d9305b08452f220af2a286485f91175 /drivers/arm/ccn/ccn.c | |
parent | e141aa0357fd4977ba874f4f86874e2cadc73498 (diff) | |
parent | 7123787616e21871319909508e80594c7f24f6b8 (diff) |
Merge pull request #627 from soby-mathew/sm/fvp_ccn502_sup_1
Add CCN support to FVP
Diffstat (limited to 'drivers/arm/ccn/ccn.c')
-rw-r--r-- | drivers/arm/ccn/ccn.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/arm/ccn/ccn.c b/drivers/arm/ccn/ccn.c index 28d27098..060acdd2 100644 --- a/drivers/arm/ccn/ccn.c +++ b/drivers/arm/ccn/ccn.c @@ -254,6 +254,7 @@ static unsigned long long ccn_master_to_rn_id_map(unsigned long long master_map) assert(ccn_plat_desc); FOR_EACH_PRESENT_MASTER_INTERFACE(iface_id, master_map) { + assert(iface_id < ccn_plat_desc->num_masters); /* Convert the master ID into the node ID */ node_id = ccn_plat_desc->master_to_rn_id_map[iface_id]; @@ -501,3 +502,15 @@ void ccn_program_sys_addrmap(unsigned int sn0_id, } } + +/******************************************************************************* + * This function returns the part0 id from the peripheralID 0 register + * in CCN. This id can be used to distinguish the CCN variant present in the + * system. + ******************************************************************************/ +int ccn_get_part0_id(uintptr_t periphbase) +{ + assert(periphbase); + return (int)(mmio_read_64(periphbase + + MN_PERIPH_ID_0_1_OFFSET) & 0xFF); +} |