diff options
Diffstat (limited to 'module/cmn600')
-rw-r--r-- | module/cmn600/include/internal/cmn600_ccix.h | 10 | ||||
-rw-r--r-- | module/cmn600/include/mod_cmn600.h | 8 | ||||
-rw-r--r-- | module/cmn600/src/cmn600_ccix.c | 16 | ||||
-rw-r--r-- | module/cmn600/src/mod_cmn600.c | 2 |
4 files changed, 36 insertions, 0 deletions
diff --git a/module/cmn600/include/internal/cmn600_ccix.h b/module/cmn600/include/internal/cmn600_ccix.h index e0fdc9a5..0a243cbb 100644 --- a/module/cmn600/include/internal/cmn600_ccix.h +++ b/module/cmn600/include/internal/cmn600_ccix.h @@ -37,6 +37,10 @@ int ccix_enter_system_coherency(struct cmn600_ctx *ctx, uint8_t link_id); */ int ccix_enter_dvm_domain(struct cmn600_ctx *ctx, uint8_t link_id); +/* + * CMN600 CCIX get Capabilities Function + */ +void ccix_capabilities_get(struct cmn600_ctx *ctx); /* * CCIX Gateway (CXG) protocol link control & status registers @@ -171,6 +175,8 @@ struct cxg_wait_condition_data { #define CXG_RA_RND_RAID_VALID_REG_OFFSET 0xF38 #define CXG_RA_AGENTID_TO_LINKID_OFFSET 0xE60 #define CXG_RA_AGENTID_TO_LINKID_VAL_OFFSET 0xF20 +#define CXG_RA_REQUEST_TRACKER_DEPTH_MASK UINT64_C(0x0000000001FF0000) +#define CXG_RA_REQUEST_TRACKER_DEPTH_VAL 16 /* CCIX Gateway (CXG) Home Agent (HA) defines */ @@ -180,6 +186,10 @@ struct cxg_wait_condition_data { #define CXG_HA_RAID_TO_LDID_VALID_OFFSET (0xD08) #define CXG_HA_RAID_TO_LDID_RNF_MASK (0x80) #define CXG_HA_LDID_TO_RAID_OFFSET 0xC00 +#define CXG_HA_SNOOP_TRACKER_DEPTH_MASK UINT64_C(0x00001FF000000000) +#define CXG_HA_SNOOP_TRACKER_DEPTH_VAL 36 +#define CXG_HA_WDB_DEPTH_MASK UINT64_C(0x0000000007FC0000) +#define CXG_HA_WDB_DEPTH_VAL 18 /* CCIX Gateway (CXG) Link Agent (LA) defines */ diff --git a/module/cmn600/include/mod_cmn600.h b/module/cmn600/include/mod_cmn600.h index 70d69f57..bba7f010 100644 --- a/module/cmn600/include/mod_cmn600.h +++ b/module/cmn600/include/mod_cmn600.h @@ -224,6 +224,14 @@ struct mod_cmn600_ccix_host_node_config { /*! CCIX HA memory map table for endpoints */ struct mod_cmn600_ccix_ha_mmap ccix_host_mmap[MAX_HA_MMAP_ENTRIES]; + /*! CCIX Maximum Memory Request send credits from Host */ + uint16_t ccix_request_credits; + + /*! CCIX Maximum Snoop send credits from Host */ + uint16_t ccix_snoop_credits; + + /*! CCIX Maximum Data send credits from Host */ + uint16_t ccix_data_credits; }; /*! diff --git a/module/cmn600/src/cmn600_ccix.c b/module/cmn600/src/cmn600_ccix.c index cd8213bc..b652aa46 100644 --- a/module/cmn600/src/cmn600_ccix.c +++ b/module/cmn600/src/cmn600_ccix.c @@ -601,3 +601,19 @@ int ccix_enter_dvm_domain(struct cmn600_ctx *ctx, uint8_t link_id) ctx->log_api->log(MOD_LOG_GROUP_DEBUG, "Done\n"); return FWK_SUCCESS; } + +void ccix_capabilities_get(struct cmn600_ctx *ctx) +{ + /* Populate maximum credit send capability */ + ctx->ccix_host_info.ccix_request_credits = + (ctx->cxg_ra_reg->CXG_RA_UNIT_INFO & CXG_RA_REQUEST_TRACKER_DEPTH_MASK) + >> CXG_RA_REQUEST_TRACKER_DEPTH_VAL; + + ctx->ccix_host_info.ccix_snoop_credits = + (ctx->cxg_ha_reg->CXG_HA_UNIT_INFO & CXG_HA_SNOOP_TRACKER_DEPTH_MASK) >> + CXG_HA_SNOOP_TRACKER_DEPTH_VAL; + + ctx->ccix_host_info.ccix_data_credits = + (ctx->cxg_ha_reg->CXG_HA_UNIT_INFO & CXG_HA_WDB_DEPTH_MASK) >> + CXG_HA_WDB_DEPTH_VAL; +} diff --git a/module/cmn600/src/mod_cmn600.c b/module/cmn600/src/mod_cmn600.c index 03eccc9a..c98efa65 100644 --- a/module/cmn600/src/mod_cmn600.c +++ b/module/cmn600/src/mod_cmn600.c @@ -535,6 +535,8 @@ static int cmn600_ccix_config_get( ctx->internal_rnsam_count + ctx->external_rnsam_count - 1; ctx->ccix_host_info.host_sa_count = ctx->config->sa_count; + ccix_capabilities_get(ctx); + memcpy((void *)config, (void *)&ctx->ccix_host_info, sizeof(struct mod_cmn600_ccix_host_node_config)); return FWK_SUCCESS; |