4 * Copyright (C) 2023, Advanced Micro Devices, Inc.
6 * Written by Francisco Iglesias <francisco.iglesias@amd.com>
8 * SPDX-License-Identifier: GPL-2.0-or-later
11 #define XLNX_CFI_IF_H 1
13 #include "qemu/help-texts.h"
14 #include "qom/object.h"
16 #define TYPE_XLNX_CFI_IF "xlnx-cfi-if"
17 typedef struct XlnxCfiIfClass XlnxCfiIfClass
;
18 DECLARE_CLASS_CHECKERS(XlnxCfiIfClass
, XLNX_CFI_IF
, TYPE_XLNX_CFI_IF
)
20 #define XLNX_CFI_IF(obj) \
21 INTERFACE_CHECK(XlnxCfiIf, (obj), TYPE_XLNX_CFI_IF)
24 PACKET_TYPE_CFU
= 0x52,
25 PACKET_TYPE_CFRAME
= 0xA1,
26 } xlnx_cfi_packet_type
;
35 typedef struct XlnxCfiPacket
{
40 typedef struct XlnxCfiIf
{
44 typedef struct XlnxCfiIfClass
{
45 InterfaceClass parent
;
47 void (*cfi_transfer_packet
)(XlnxCfiIf
*cfi_if
, XlnxCfiPacket
*pkt
);
51 * Transfer a XlnxCfiPacket.
53 * @cfi_if: the object implementing this interface
54 * @XlnxCfiPacket: a pointer to the XlnxCfiPacket to transfer
56 void xlnx_cfi_transfer_packet(XlnxCfiIf
*cfi_if
, XlnxCfiPacket
*pkt
);
58 #endif /* XLNX_CFI_IF_H */