qemu/include/hw/dma/bcm2835_dma.h
<<
>>
Prefs
   1/*
   2 * Raspberry Pi emulation (c) 2012 Gregory Estrade
   3 * This code is licensed under the GNU GPLv2 and later.
   4 */
   5
   6#ifndef BCM2835_DMA_H
   7#define BCM2835_DMA_H
   8
   9#include "qemu-common.h"
  10#include "exec/address-spaces.h"
  11#include "hw/sysbus.h"
  12
  13typedef struct {
  14    uint32_t cs;
  15    uint32_t conblk_ad;
  16    uint32_t ti;
  17    uint32_t source_ad;
  18    uint32_t dest_ad;
  19    uint32_t txfr_len;
  20    uint32_t stride;
  21    uint32_t nextconbk;
  22    uint32_t debug;
  23
  24    qemu_irq irq;
  25} BCM2835DMAChan;
  26
  27#define TYPE_BCM2835_DMA "bcm2835-dma"
  28#define BCM2835_DMA(obj) \
  29        OBJECT_CHECK(BCM2835DMAState, (obj), TYPE_BCM2835_DMA)
  30
  31#define BCM2835_DMA_NCHANS 16
  32
  33typedef struct {
  34    /*< private >*/
  35    SysBusDevice busdev;
  36    /*< public >*/
  37
  38    MemoryRegion iomem0, iomem15;
  39    MemoryRegion *dma_mr;
  40    AddressSpace dma_as;
  41
  42    BCM2835DMAChan chan[BCM2835_DMA_NCHANS];
  43    uint32_t int_status;
  44    uint32_t enable;
  45} BCM2835DMAState;
  46
  47#endif
  48