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

#include <typedef.h>
#include "ucp_printf.h"
#include "dw_pcie_ep.h"
#include "pet_sm_mgt.h"
#include "ucp_pcie_mem.h"
#include "ucp_handshake.h"
#include "msg_transfer_host.h"
#include "msg_transfer_mem.h"

int32_t get_core_id(void)
{
	return PET_RFM_SPU0_CORE_ID;
}

void pet_rfm_spu0_drv_init(void)
{
	pcie_ep_mem_init();
    ucp_pcie_reset();
	pcie_ep_drv_init();
	return;
}

void pet_rfm_spu0_msg_transfer_init(void)
{
	pet_sm_alloc();
    msg_transfer_mem_alloc();
	msg_transfer_cfg();
	handshake_slave_with_master();

	return;
}


