// +FHDR------------------------------------------------------------
//                 Copyright (c) 2022 SmartLogic.
//                       ALL RIGHTS RESERVED
// -----------------------------------------------------------------
// Filename      : ecs_rfm_spu0.c
// Author        : xianfeng.du
// Created On    : 2022-06-25
// Last Modified :
// -----------------------------------------------------------------
// Description:
//
//
// -FHDR------------------------------------------------------------

#include "ucp_port.h"
#include "ucp_handshake.h"
#include "ucp_utility.h"
#include "pet_sm_mgt.h"
#include "ecs_rfm_dm_mgt.h"
#include "msg_transfer_mem.h"
#include "rfm0_drv.h"
#include "spu_hw_queue.h"

ALWAYS_INLINE int32_t get_core_id(void)
{
	return ECS_RFM_SPU0_CORE_ID;
}

void ecs_rfm_spu0_drv_init(void)
{
    ecs_rfm_dm_alloc();

    //ecs_sm_alloc();

	pet_sm_alloc();

    ecs_rfm0_drv_init();

    //ucp_spinlock_init();

    return;
}

void ecs_rfm_spu0_msg_transfer_init(void)
{
    msg_transfer_mem_alloc();

    handshake_slave_with_master();

    msg_transfer_queue_init();

    return;
}

