qemu/hw/fdc.h
<<
>>
Prefs
   1#ifndef HW_FDC_H
   2#define HW_FDC_H
   3
   4#include "isa.h"
   5#include "blockdev.h"
   6
   7/* fdc.c */
   8#define MAX_FD 2
   9
  10static inline ISADevice *fdctrl_init_isa(ISABus *bus, DriveInfo **fds)
  11{
  12    ISADevice *dev;
  13
  14    dev = isa_try_create(bus, "isa-fdc");
  15    if (!dev) {
  16        return NULL;
  17    }
  18
  19    if (fds[0]) {
  20        qdev_prop_set_drive_nofail(&dev->qdev, "driveA", fds[0]->bdrv);
  21    }
  22    if (fds[1]) {
  23        qdev_prop_set_drive_nofail(&dev->qdev, "driveB", fds[1]->bdrv);
  24    }
  25    qdev_init_nofail(&dev->qdev);
  26
  27    return dev;
  28}
  29
  30void fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
  31                        target_phys_addr_t mmio_base, DriveInfo **fds);
  32void sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
  33                       DriveInfo **fds, qemu_irq *fdc_tc);
  34void fdc_get_bs(BlockDriverState *bs[], ISADevice *dev);
  35
  36#endif
  37