mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/misc/aspeed_xdma: New device
The XDMA engine embedded in the Aspeed SOCs performs PCI DMA operations between the SOC (acting as a BMC) and a host processor in a server. The XDMA engine exists on the AST2400, AST2500, and AST2600 SOCs, so enable it for all of those. Add trace events on the important register writes in the XDMA engine. Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-id: 20190618165311.27066-21-clg@kaod.org [clg: - changed title ] Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
aae7a18d47
commit
118c82e7ff
6 changed files with 219 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
#include "hw/intc/aspeed_vic.h"
|
||||
#include "hw/misc/aspeed_scu.h"
|
||||
#include "hw/misc/aspeed_sdmc.h"
|
||||
#include "hw/misc/aspeed_xdma.h"
|
||||
#include "hw/timer/aspeed_timer.h"
|
||||
#include "hw/timer/aspeed_rtc.h"
|
||||
#include "hw/i2c/aspeed_i2c.h"
|
||||
|
@ -40,6 +41,7 @@ typedef struct AspeedSoCState {
|
|||
AspeedTimerCtrlState timerctrl;
|
||||
AspeedI2CState i2c;
|
||||
AspeedSCUState scu;
|
||||
AspeedXDMAState xdma;
|
||||
AspeedSMCState fmc;
|
||||
AspeedSMCState spi[ASPEED_SPIS_NUM];
|
||||
AspeedSDMCState sdmc;
|
||||
|
@ -108,6 +110,7 @@ enum {
|
|||
ASPEED_ETH1,
|
||||
ASPEED_ETH2,
|
||||
ASPEED_SDRAM,
|
||||
ASPEED_XDMA,
|
||||
};
|
||||
|
||||
#endif /* ASPEED_SOC_H */
|
||||
|
|
30
include/hw/misc/aspeed_xdma.h
Normal file
30
include/hw/misc/aspeed_xdma.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* ASPEED XDMA Controller
|
||||
* Eddie James <eajames@linux.ibm.com>
|
||||
*
|
||||
* Copyright (C) 2019 IBM Corp.
|
||||
* SPDX-License-Identifer: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef ASPEED_XDMA_H
|
||||
#define ASPEED_XDMA_H
|
||||
|
||||
#include "hw/sysbus.h"
|
||||
|
||||
#define TYPE_ASPEED_XDMA "aspeed.xdma"
|
||||
#define ASPEED_XDMA(obj) OBJECT_CHECK(AspeedXDMAState, (obj), TYPE_ASPEED_XDMA)
|
||||
|
||||
#define ASPEED_XDMA_NUM_REGS (ASPEED_XDMA_REG_SIZE / sizeof(uint32_t))
|
||||
#define ASPEED_XDMA_REG_SIZE 0x7C
|
||||
|
||||
typedef struct AspeedXDMAState {
|
||||
SysBusDevice parent;
|
||||
|
||||
MemoryRegion iomem;
|
||||
qemu_irq irq;
|
||||
|
||||
char bmc_cmdq_readp_set;
|
||||
uint32_t regs[ASPEED_XDMA_NUM_REGS];
|
||||
} AspeedXDMAState;
|
||||
|
||||
#endif /* ASPEED_XDMA_H */
|
Loading…
Add table
Add a link
Reference in a new issue