xref: /openbmc/qemu/hw/misc/xlnx-cfi-if.c (revision afb81fe8)
1 /*
2  * Xilinx CFI interface
3  *
4  * Copyright (C) 2023, Advanced Micro Devices, Inc.
5  *
6  * Written by Francisco Iglesias <francisco.iglesias@amd.com>
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 #include "qemu/osdep.h"
11 #include "hw/misc/xlnx-cfi-if.h"
12 
13 void xlnx_cfi_transfer_packet(XlnxCfiIf *cfi_if, XlnxCfiPacket *pkt)
14 {
15     XlnxCfiIfClass *xcic = XLNX_CFI_IF_GET_CLASS(cfi_if);
16 
17     if (xcic->cfi_transfer_packet) {
18         xcic->cfi_transfer_packet(cfi_if, pkt);
19     }
20 }
21 
22 static const TypeInfo xlnx_cfi_if_info = {
23     .name          = TYPE_XLNX_CFI_IF,
24     .parent        = TYPE_INTERFACE,
25     .class_size = sizeof(XlnxCfiIfClass),
26 };
27 
28 static void xlnx_cfi_if_register_types(void)
29 {
30     type_register_static(&xlnx_cfi_if_info);
31 }
32 
33 type_init(xlnx_cfi_if_register_types)
34 
35