mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -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
|
@ -32,6 +32,7 @@ static const hwaddr aspeed_soc_ast2400_memmap[] = {
|
|||
[ASPEED_VIC] = 0x1E6C0000,
|
||||
[ASPEED_SDMC] = 0x1E6E0000,
|
||||
[ASPEED_SCU] = 0x1E6E2000,
|
||||
[ASPEED_XDMA] = 0x1E6E7000,
|
||||
[ASPEED_ADC] = 0x1E6E9000,
|
||||
[ASPEED_SRAM] = 0x1E720000,
|
||||
[ASPEED_GPIO] = 0x1E780000,
|
||||
|
@ -58,6 +59,7 @@ static const hwaddr aspeed_soc_ast2500_memmap[] = {
|
|||
[ASPEED_VIC] = 0x1E6C0000,
|
||||
[ASPEED_SDMC] = 0x1E6E0000,
|
||||
[ASPEED_SCU] = 0x1E6E2000,
|
||||
[ASPEED_XDMA] = 0x1E6E7000,
|
||||
[ASPEED_ADC] = 0x1E6E9000,
|
||||
[ASPEED_SRAM] = 0x1E720000,
|
||||
[ASPEED_GPIO] = 0x1E780000,
|
||||
|
@ -104,6 +106,7 @@ static const int aspeed_soc_ast2400_irqmap[] = {
|
|||
[ASPEED_I2C] = 12,
|
||||
[ASPEED_ETH1] = 2,
|
||||
[ASPEED_ETH2] = 3,
|
||||
[ASPEED_XDMA] = 6,
|
||||
};
|
||||
|
||||
#define aspeed_soc_ast2500_irqmap aspeed_soc_ast2400_irqmap
|
||||
|
@ -238,6 +241,9 @@ static void aspeed_soc_init(Object *obj)
|
|||
sysbus_init_child_obj(obj, "ftgmac100[*]", OBJECT(&s->ftgmac100[i]),
|
||||
sizeof(s->ftgmac100[i]), TYPE_FTGMAC100);
|
||||
}
|
||||
|
||||
sysbus_init_child_obj(obj, "xdma", OBJECT(&s->xdma), sizeof(s->xdma),
|
||||
TYPE_ASPEED_XDMA);
|
||||
}
|
||||
|
||||
static void aspeed_soc_realize(DeviceState *dev, Error **errp)
|
||||
|
@ -406,6 +412,17 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp)
|
|||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->ftgmac100[i]), 0,
|
||||
aspeed_soc_get_irq(s, ASPEED_ETH1 + i));
|
||||
}
|
||||
|
||||
/* XDMA */
|
||||
object_property_set_bool(OBJECT(&s->xdma), true, "realized", &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
return;
|
||||
}
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(&s->xdma), 0,
|
||||
sc->info->memmap[ASPEED_XDMA]);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->xdma), 0,
|
||||
aspeed_soc_get_irq(s, ASPEED_XDMA));
|
||||
}
|
||||
static Property aspeed_soc_properties[] = {
|
||||
DEFINE_PROP_UINT32("num-cpus", AspeedSoCState, num_cpus, 0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue