qemu/hw/misc/xlnx-cfi-if.c
Francisco Iglesias 5a8559e2cc hw/misc: Introduce the Xilinx CFI interface
Introduce the Xilinx Configuration Frame Interface (CFI) for transmitting
CFI data packets between the Xilinx Configuration Frame Unit models
(CFU_APB, CFU_FDRO and CFU_SFR), the Xilinx CFRAME controller (CFRAME_REG)
and the Xilinx CFRAME broadcast controller (CFRAME_BCAST_REG) models (when
emulating bitstream programming and readback).

Signed-off-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Sai Pavan Boddu <sai.pavan.boddu@amd.com>
Acked-by: Edgar E. Iglesias <edgar@zeroasic.com>
Message-id: 20230831165701.2016397-2-francisco.iglesias@amd.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-09-08 16:41:34 +01:00

35 lines
780 B
C

/*
* Xilinx CFI interface
*
* Copyright (C) 2023, Advanced Micro Devices, Inc.
*
* Written by Francisco Iglesias <francisco.iglesias@amd.com>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "qemu/osdep.h"
#include "hw/misc/xlnx-cfi-if.h"
void xlnx_cfi_transfer_packet(XlnxCfiIf *cfi_if, XlnxCfiPacket *pkt)
{
XlnxCfiIfClass *xcic = XLNX_CFI_IF_GET_CLASS(cfi_if);
if (xcic->cfi_transfer_packet) {
xcic->cfi_transfer_packet(cfi_if, pkt);
}
}
static const TypeInfo xlnx_cfi_if_info = {
.name = TYPE_XLNX_CFI_IF,
.parent = TYPE_INTERFACE,
.class_size = sizeof(XlnxCfiIfClass),
};
static void xlnx_cfi_if_register_types(void)
{
type_register_static(&xlnx_cfi_if_info);
}
type_init(xlnx_cfi_if_register_types)