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 void fdctrl_init_isa(DriveInfo **fds)
  11{
  12    ISADevice *dev;
  13
  14    dev = isa_try_create("isa-fdc");
  15    if (!dev) {
  16        return;
  17    }
  18    if (fds[0]) {
  19        qdev_prop_set_drive_nofail(&dev->qdev, "driveA", fds[0]->bdrv);
  20    }
  21    if (fds[1]) {
  22        qdev_prop_set_drive_nofail(&dev->qdev, "driveB", fds[1]->bdrv);
  23    }
  24    qdev_init_nofail(&dev->qdev);
  25}
  26
  27void fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
  28                        target_phys_addr_t mmio_base, DriveInfo **fds);
  29void sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
  30                       DriveInfo **fds, qemu_irq *fdc_tc);
  31#endif
  32