mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-03-17 16:25:34 -06:00
hw/ssi/pnv_spi: Replace PnvXferBuffer with Fifo8 structure
In PnvXferBuffer dynamically allocating and freeing is a process overhead. Hence used an existing Fifo8 buffer with capacity of 16 bytes. Signed-off-by: Chalapathi V <chalapathi.v@linux.ibm.com> Message-ID: <20250303141328.23991-2-chalapathi.v@linux.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
This commit is contained in:
parent
ffc2cabeb5
commit
17befecda8
2 changed files with 108 additions and 159 deletions
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "hw/ssi/ssi.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "qemu/fifo8.h"
|
||||
|
||||
#define TYPE_PNV_SPI "pnv-spi"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(PnvSpi, PNV_SPI)
|
||||
|
|
@ -37,6 +38,8 @@ typedef struct PnvSpi {
|
|||
SSIBus *ssi_bus;
|
||||
qemu_irq *cs_line;
|
||||
MemoryRegion xscom_spic_regs;
|
||||
Fifo8 tx_fifo;
|
||||
Fifo8 rx_fifo;
|
||||
/* SPI object number */
|
||||
uint32_t spic_num;
|
||||
uint8_t transfer_len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue