mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
xilinx: Add AXIENET & DMA models
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
This commit is contained in:
@@ -272,6 +272,8 @@ obj-microblaze-y += xilinx_intc.o
|
||||
obj-microblaze-y += xilinx_timer.o
|
||||
obj-microblaze-y += xilinx_uartlite.o
|
||||
obj-microblaze-y += xilinx_ethlite.o
|
||||
obj-microblaze-y += xilinx_axidma.o
|
||||
obj-microblaze-y += xilinx_axienet.o
|
||||
|
||||
obj-microblaze-$(CONFIG_FDT) += device_tree.o
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
/* AXI DMA connection. Used until qdev provides a generic way. */
|
||||
typedef void (*DMAPushFn)(void *opaque,
|
||||
unsigned char *buf, size_t len, uint32_t *app);
|
||||
|
||||
struct XilinxDMAConnection {
|
||||
void *dma;
|
||||
void *client;
|
||||
|
||||
DMAPushFn to_dma;
|
||||
DMAPushFn to_client;
|
||||
};
|
||||
|
||||
static inline void xlx_dma_connect_client(struct XilinxDMAConnection *dmach,
|
||||
void *c, DMAPushFn f)
|
||||
{
|
||||
dmach->client = c;
|
||||
dmach->to_client = f;
|
||||
}
|
||||
|
||||
static inline void xlx_dma_connect_dma(struct XilinxDMAConnection *dmach,
|
||||
void *d, DMAPushFn f)
|
||||
{
|
||||
dmach->dma = d;
|
||||
dmach->to_dma = f;
|
||||
}
|
||||
|
||||
static inline
|
||||
void xlx_dma_push_to_dma(struct XilinxDMAConnection *dmach,
|
||||
uint8_t *buf, size_t len, uint32_t *app)
|
||||
{
|
||||
dmach->to_dma(dmach->dma, buf, len, app);
|
||||
}
|
||||
static inline
|
||||
void xlx_dma_push_to_client(struct XilinxDMAConnection *dmach,
|
||||
uint8_t *buf, size_t len, uint32_t *app)
|
||||
{
|
||||
dmach->to_client(dmach->client, buf, len, app);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user