2007-11-17 20:14:51 +03:00
|
|
|
#ifndef SPARC32_DMA_H
|
|
|
|
#define SPARC32_DMA_H
|
|
|
|
|
2017-10-14 15:22:21 +03:00
|
|
|
#include "hw/sysbus.h"
|
2017-10-14 15:22:22 +03:00
|
|
|
#include "hw/scsi/esp.h"
|
2017-10-14 15:22:22 +03:00
|
|
|
#include "hw/net/lance.h"
|
2020-09-03 23:43:22 +03:00
|
|
|
#include "qom/object.h"
|
2017-10-14 15:22:21 +03:00
|
|
|
|
|
|
|
#define DMA_REGS 4
|
|
|
|
|
|
|
|
#define TYPE_SPARC32_DMA_DEVICE "sparc32-dma-device"
|
2020-09-16 21:25:19 +03:00
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(DMADeviceState, SPARC32_DMA_DEVICE)
|
2017-10-14 15:22:21 +03:00
|
|
|
|
|
|
|
|
|
|
|
struct DMADeviceState {
|
|
|
|
SysBusDevice parent_obj;
|
|
|
|
|
|
|
|
MemoryRegion iomem;
|
|
|
|
uint32_t dmaregs[DMA_REGS];
|
|
|
|
qemu_irq irq;
|
|
|
|
void *iommu;
|
|
|
|
qemu_irq gpio[2];
|
|
|
|
};
|
|
|
|
|
|
|
|
#define TYPE_SPARC32_ESPDMA_DEVICE "sparc32-espdma"
|
2020-09-16 21:25:19 +03:00
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(ESPDMADeviceState, SPARC32_ESPDMA_DEVICE)
|
2017-10-14 15:22:21 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct ESPDMADeviceState {
|
2017-10-14 15:22:21 +03:00
|
|
|
DMADeviceState parent_obj;
|
2017-10-14 15:22:22 +03:00
|
|
|
|
2020-09-26 17:02:13 +03:00
|
|
|
SysBusESPState esp;
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2017-10-14 15:22:21 +03:00
|
|
|
|
|
|
|
#define TYPE_SPARC32_LEDMA_DEVICE "sparc32-ledma"
|
2020-09-16 21:25:19 +03:00
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(LEDMADeviceState, SPARC32_LEDMA_DEVICE)
|
2017-10-14 15:22:21 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct LEDMADeviceState {
|
2017-10-14 15:22:21 +03:00
|
|
|
DMADeviceState parent_obj;
|
2017-10-14 15:22:22 +03:00
|
|
|
|
2020-09-26 17:02:12 +03:00
|
|
|
SysBusPCNetState lance;
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2017-10-14 15:22:21 +03:00
|
|
|
|
2017-10-14 15:22:22 +03:00
|
|
|
#define TYPE_SPARC32_DMA "sparc32-dma"
|
2020-09-16 21:25:19 +03:00
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(SPARC32DMAState, SPARC32_DMA)
|
2017-10-14 15:22:22 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct SPARC32DMAState {
|
2017-10-14 15:22:22 +03:00
|
|
|
SysBusDevice parent_obj;
|
|
|
|
|
|
|
|
MemoryRegion dmamem;
|
2017-10-14 15:22:22 +03:00
|
|
|
MemoryRegion ledma_alias;
|
2020-09-26 17:02:11 +03:00
|
|
|
ESPDMADeviceState espdma;
|
|
|
|
LEDMADeviceState ledma;
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2017-10-14 15:22:22 +03:00
|
|
|
|
2007-11-17 20:14:51 +03:00
|
|
|
/* sparc32_dma.c */
|
2012-10-23 14:30:10 +04:00
|
|
|
void ledma_memory_read(void *opaque, hwaddr addr,
|
2007-11-17 20:14:51 +03:00
|
|
|
uint8_t *buf, int len, int do_bswap);
|
2012-10-23 14:30:10 +04:00
|
|
|
void ledma_memory_write(void *opaque, hwaddr addr,
|
2007-11-17 20:14:51 +03:00
|
|
|
uint8_t *buf, int len, int do_bswap);
|
|
|
|
void espdma_memory_read(void *opaque, uint8_t *buf, int len);
|
|
|
|
void espdma_memory_write(void *opaque, uint8_t *buf, int len);
|
|
|
|
|
|
|
|
#endif
|