Merge branch 'dev_ck_v2.1_feature#1655#' into 'dev_ck_v2.1'
update New Feature#1655 to dev_ck_V2.1 See merge request ucp/driver/ucp4008_platform_spu!94
This commit is contained in:
commit
1134739ba4
@ -43,7 +43,7 @@ typedef struct tUcpHandshake{
|
|||||||
|
|
||||||
UcpHandshake_t* get_handshake_info(void);
|
UcpHandshake_t* get_handshake_info(void);
|
||||||
//void handshake_with_host(void);
|
//void handshake_with_host(void);
|
||||||
void handshake_master_with_slave(void);
|
void handshake_master_with_slave(uint32_t u32_core_mask);
|
||||||
void handshake_slave_with_master(void);
|
void handshake_slave_with_master(void);
|
||||||
int32_t get_host_core_id(void);
|
int32_t get_host_core_id(void);
|
||||||
void handshake_request_from_host(int32_t core_id);
|
void handshake_request_from_host(int32_t core_id);
|
||||||
|
@ -104,21 +104,21 @@ void handshake_with_host(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//master is the core which controlled the handshake flow
|
//master is the core which controlled the handshake flow
|
||||||
void handshake_master_with_slave(void)
|
void handshake_master_with_slave(uint32_t u32_core_mask)
|
||||||
{
|
{
|
||||||
volatile uint32_t request = 0;
|
volatile uint32_t request = 0;
|
||||||
uint32_t response;
|
uint32_t response;
|
||||||
uint32_t core_id,coreReadyBitMap,coreMask;
|
uint32_t core_id,coreReadyBitMap,coreMask;
|
||||||
UcpHandshake_t* pHandshake = (UcpHandshake_t *)get_handshake_info();
|
UcpHandshake_t* pHandshake = (UcpHandshake_t *)get_handshake_info();
|
||||||
uint32_t ape_core_mask = APE_CORE_MASK & 0xff;
|
uint32_t ape_core_mask = u32_core_mask;
|
||||||
uint32_t handshake_coremask = HANDSHKAE_MASK | ape_core_mask;
|
uint32_t handshake_coremask = HANDSHKAE_MASK | ape_core_mask;
|
||||||
|
|
||||||
core_id = get_core_id();
|
core_id = get_core_id();
|
||||||
coreReadyBitMap = 1 << core_id;
|
coreReadyBitMap = 1 << core_id;
|
||||||
debug_write(DBG_DDR_COMMON_IDX(core_id,90), handshake_coremask);
|
debug_write(DBG_DDR_COMMON_IDX(core_id,90), handshake_coremask);
|
||||||
|
|
||||||
//msgagent need to run before other cores.
|
//msgagent need to run before other cores.
|
||||||
handshake_response_to_msgagent(PET_RFM_SPU1_CORE_ID);
|
handshake_response_to_msgagent(PET_RFM_SPU1_CORE_ID);
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
for(uint32_t i = 0; i < MAX_NUM_SPU; i++) {
|
for(uint32_t i = 0; i < MAX_NUM_SPU; i++) {
|
||||||
|
@ -29,19 +29,21 @@
|
|||||||
|
|
||||||
void phy_init(void);
|
void phy_init(void);
|
||||||
|
|
||||||
|
uint32_t get_core_mask_by_phy(void);
|
||||||
|
|
||||||
ALWAYS_INLINE int32_t get_core_id(void)
|
ALWAYS_INLINE int32_t get_core_id(void)
|
||||||
{
|
{
|
||||||
return ECS_RFM_SPU1_CORE_ID;
|
return ECS_RFM_SPU1_CORE_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ecs_rfm_spu1_drv_init(void)
|
void ecs_rfm_spu1_drv_init(void)
|
||||||
{
|
{
|
||||||
ecs_rfm_dm_alloc();
|
ecs_rfm_dm_alloc();
|
||||||
ecs_rfm1_dm_init();
|
ecs_rfm1_dm_init();
|
||||||
|
|
||||||
pet_sm_alloc();
|
pet_sm_alloc();
|
||||||
|
|
||||||
ucp_spinlock_init();
|
ucp_spinlock_init();
|
||||||
|
|
||||||
ecs_rfm1_drv_init();
|
ecs_rfm1_drv_init();
|
||||||
UCP_PRINT_EMPTY("ECS: rfm drv init finished.\r\n");
|
UCP_PRINT_EMPTY("ECS: rfm drv init finished.\r\n");
|
||||||
@ -59,7 +61,9 @@ void ecs_rfm_spu1_msg_transfer_init(void)
|
|||||||
|
|
||||||
msg_transfer_queue_init();//initialized local queuecfg from common queuecfg
|
msg_transfer_queue_init();//initialized local queuecfg from common queuecfg
|
||||||
|
|
||||||
handshake_master_with_slave();
|
uint32_t u32_core_mask = get_core_mask_by_phy();
|
||||||
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 3), u32_core_mask);
|
||||||
|
handshake_master_with_slave(u32_core_mask);
|
||||||
|
|
||||||
handshake_response_to_host(core_id);
|
handshake_response_to_host(core_id);
|
||||||
|
|
||||||
|
@ -350,3 +350,9 @@ void Mem_Init(void)
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t get_core_mask_by_phy(void)
|
||||||
|
{
|
||||||
|
return APE_CORE_MASK & 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user