 f0936cbc1d
			
		
	
	
		f0936cbc1d
		
	
	
	
	
		
			
			hw/hw.h only contains the prototype of hw_error() nowadays, so files that don't use this function don't need to include this header. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-ID: <20240701132649.58345-1-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			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
 | |
|  */
 | |
| #ifndef XLNX_CFI_IF_H
 | |
| #define XLNX_CFI_IF_H 1
 | |
| 
 | |
| #include "qemu/help-texts.h"
 | |
| #include "qom/object.h"
 | |
| 
 | |
| #define TYPE_XLNX_CFI_IF "xlnx-cfi-if"
 | |
| typedef struct XlnxCfiIfClass XlnxCfiIfClass;
 | |
| DECLARE_CLASS_CHECKERS(XlnxCfiIfClass, XLNX_CFI_IF, TYPE_XLNX_CFI_IF)
 | |
| 
 | |
| #define XLNX_CFI_IF(obj) \
 | |
|      INTERFACE_CHECK(XlnxCfiIf, (obj), TYPE_XLNX_CFI_IF)
 | |
| 
 | |
| typedef enum {
 | |
|     PACKET_TYPE_CFU = 0x52,
 | |
|     PACKET_TYPE_CFRAME = 0xA1,
 | |
| } xlnx_cfi_packet_type;
 | |
| 
 | |
| typedef enum {
 | |
|     CFRAME_FAR = 1,
 | |
|     CFRAME_SFR = 2,
 | |
|     CFRAME_FDRI = 4,
 | |
|     CFRAME_CMD = 6,
 | |
| } xlnx_cfi_reg_addr;
 | |
| 
 | |
| typedef struct XlnxCfiPacket {
 | |
|     uint8_t reg_addr;
 | |
|     uint32_t data[4];
 | |
| } XlnxCfiPacket;
 | |
| 
 | |
| typedef struct XlnxCfiIf {
 | |
|     Object Parent;
 | |
| } XlnxCfiIf;
 | |
| 
 | |
| typedef struct XlnxCfiIfClass {
 | |
|     InterfaceClass parent;
 | |
| 
 | |
|     void (*cfi_transfer_packet)(XlnxCfiIf *cfi_if, XlnxCfiPacket *pkt);
 | |
| } XlnxCfiIfClass;
 | |
| 
 | |
| /**
 | |
|  * Transfer a XlnxCfiPacket.
 | |
|  *
 | |
|  * @cfi_if: the object implementing this interface
 | |
|  * @XlnxCfiPacket: a pointer to the XlnxCfiPacket to transfer
 | |
|  */
 | |
| void xlnx_cfi_transfer_packet(XlnxCfiIf *cfi_if, XlnxCfiPacket *pkt);
 | |
| 
 | |
| #endif /* XLNX_CFI_IF_H */
 |