root / hw / fdc.h @ 43f20196
History | View | Annotate | Download (740 Bytes)
1 | 845773ab | Isaku Yamahata | #ifndef HW_FDC_H
|
---|---|---|---|
2 | 845773ab | Isaku Yamahata | #define HW_FDC_H
|
3 | 845773ab | Isaku Yamahata | |
4 | 63ffb564 | Blue Swirl | #include "isa.h" |
5 | d288c7ba | Blue Swirl | #include "blockdev.h" |
6 | d288c7ba | Blue Swirl | |
7 | 87ecb68b | pbrook | /* fdc.c */
|
8 | 87ecb68b | pbrook | #define MAX_FD 2 |
9 | 87ecb68b | pbrook | |
10 | 63ffb564 | Blue Swirl | static inline void fdctrl_init_isa(DriveInfo **fds) |
11 | 63ffb564 | Blue Swirl | { |
12 | 63ffb564 | Blue Swirl | ISADevice *dev; |
13 | 87ecb68b | pbrook | |
14 | 17801c78 | Blue Swirl | dev = isa_try_create("isa-fdc");
|
15 | 17801c78 | Blue Swirl | if (!dev) {
|
16 | 17801c78 | Blue Swirl | return;
|
17 | 17801c78 | Blue Swirl | } |
18 | 63ffb564 | Blue Swirl | if (fds[0]) { |
19 | 63ffb564 | Blue Swirl | qdev_prop_set_drive_nofail(&dev->qdev, "driveA", fds[0]->bdrv); |
20 | 63ffb564 | Blue Swirl | } |
21 | 63ffb564 | Blue Swirl | if (fds[1]) { |
22 | 63ffb564 | Blue Swirl | qdev_prop_set_drive_nofail(&dev->qdev, "driveB", fds[1]->bdrv); |
23 | 63ffb564 | Blue Swirl | } |
24 | 63ffb564 | Blue Swirl | qdev_init_nofail(&dev->qdev); |
25 | 63ffb564 | Blue Swirl | } |
26 | 845773ab | Isaku Yamahata | |
27 | 63ffb564 | Blue Swirl | void fdctrl_init_sysbus(qemu_irq irq, int dma_chann, |
28 | 63ffb564 | Blue Swirl | target_phys_addr_t mmio_base, DriveInfo **fds); |
29 | 63ffb564 | Blue Swirl | void sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
|
30 | 63ffb564 | Blue Swirl | DriveInfo **fds, qemu_irq *fdc_tc); |
31 | 845773ab | Isaku Yamahata | #endif |