qemu/include/hw/misc/mps2-fpgaio.h
<<
>>
Prefs
   1/*
   2 * ARM MPS2 FPGAIO emulation
   3 *
   4 * Copyright (c) 2018 Linaro Limited
   5 * Written by Peter Maydell
   6 *
   7 *  This program is free software; you can redistribute it and/or modify
   8 *  it under the terms of the GNU General Public License version 2 or
   9 *  (at your option) any later version.
  10 */
  11
  12/* This is a model of the FPGAIO register block in the AN505
  13 * FPGA image for the MPS2 dev board; it is documented in the
  14 * application note:
  15 * http://infocenter.arm.com/help/topic/com.arm.doc.dai0505b/index.html
  16 *
  17 * QEMU interface:
  18 *  + sysbus MMIO region 0: the register bank
  19 */
  20
  21#ifndef MPS2_FPGAIO_H
  22#define MPS2_FPGAIO_H
  23
  24#include "hw/sysbus.h"
  25
  26#define TYPE_MPS2_FPGAIO "mps2-fpgaio"
  27#define MPS2_FPGAIO(obj) OBJECT_CHECK(MPS2FPGAIO, (obj), TYPE_MPS2_FPGAIO)
  28
  29typedef struct {
  30    /*< private >*/
  31    SysBusDevice parent_obj;
  32
  33    /*< public >*/
  34    MemoryRegion iomem;
  35
  36    uint32_t led0;
  37    uint32_t prescale;
  38    uint32_t misc;
  39
  40    uint32_t prescale_clk;
  41} MPS2FPGAIO;
  42
  43#endif
  44