mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
xilinx_spips: Move FlashCMD, XilinxQSPIPS and XilinxSPIPSClass
Move the FlashCMD enum, XilinxQSPIPS and XilinxSPIPSClass structures to the header for consistency (struct XilinxSPIPS is found there). Also move out a define and remove two double included headers (while touching the code). Finally, add 4 byte address commands to the FlashCMD enum. Signed-off-by: Francisco Iglesias <frasse.iglesias@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 20171126231634.9531-6-frasse.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
53dc9c79d9
commit
5394dbcca8
2 changed files with 34 additions and 35 deletions
|
@ -32,6 +32,22 @@ typedef struct XilinxSPIPS XilinxSPIPS;
|
|||
|
||||
#define XLNX_SPIPS_R_MAX (0x100 / 4)
|
||||
|
||||
/* Bite off 4k chunks at a time */
|
||||
#define LQSPI_CACHE_SIZE 1024
|
||||
|
||||
typedef enum {
|
||||
READ = 0x3, READ_4 = 0x13,
|
||||
FAST_READ = 0xb, FAST_READ_4 = 0x0c,
|
||||
DOR = 0x3b, DOR_4 = 0x3c,
|
||||
QOR = 0x6b, QOR_4 = 0x6c,
|
||||
DIOR = 0xbb, DIOR_4 = 0xbc,
|
||||
QIOR = 0xeb, QIOR_4 = 0xec,
|
||||
|
||||
PP = 0x2, PP_4 = 0x12,
|
||||
DPP = 0xa2,
|
||||
QPP = 0x32, QPP_4 = 0x34,
|
||||
} FlashCMD;
|
||||
|
||||
struct XilinxSPIPS {
|
||||
SysBusDevice parent_obj;
|
||||
|
||||
|
@ -56,6 +72,24 @@ struct XilinxSPIPS {
|
|||
uint32_t regs[XLNX_SPIPS_R_MAX];
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
XilinxSPIPS parent_obj;
|
||||
|
||||
uint8_t lqspi_buf[LQSPI_CACHE_SIZE];
|
||||
hwaddr lqspi_cached_addr;
|
||||
Error *migration_blocker;
|
||||
bool mmio_execution_enabled;
|
||||
} XilinxQSPIPS;
|
||||
|
||||
typedef struct XilinxSPIPSClass {
|
||||
SysBusDeviceClass parent_class;
|
||||
|
||||
const MemoryRegionOps *reg_ops;
|
||||
|
||||
uint32_t rx_fifo_size;
|
||||
uint32_t tx_fifo_size;
|
||||
} XilinxSPIPSClass;
|
||||
|
||||
#define TYPE_XILINX_SPIPS "xlnx.ps7-spi"
|
||||
#define TYPE_XILINX_QSPIPS "xlnx.ps7-qspi"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue