diff options
Diffstat (limited to 'hw/fdc.c')
-rw-r--r-- | hw/fdc.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -1871,14 +1871,14 @@ static void fdctrl_connect_drives(fdctrl_t *fdctrl, BlockDriverState **fds) } } -fdctrl_t *fdctrl_init_isa(int isairq, int dma_chann, - uint32_t io_base, - BlockDriverState **fds) +fdctrl_t *fdctrl_init_isa(BlockDriverState **fds) { fdctrl_t *fdctrl; ISADevice *dev; + int isairq = 6; + int dma_chann = 2; - dev = isa_create_simple("isa-fdc", io_base, 0, isairq, -1); + dev = isa_create_simple("isa-fdc", isairq, -1); fdctrl = &(DO_UPCAST(fdctrl_isabus_t, busdev, dev)->state); fdctrl->dma_chann = dma_chann; @@ -1968,14 +1968,15 @@ static int isabus_fdc_init1(ISADevice *dev) { fdctrl_isabus_t *isa = DO_UPCAST(fdctrl_isabus_t, busdev, dev); fdctrl_t *fdctrl = &isa->state; + int iobase = 0x3f0; - register_ioport_read(isa->busdev.iobase[0] + 0x01, 5, 1, + register_ioport_read(iobase + 0x01, 5, 1, &fdctrl_read_port, fdctrl); - register_ioport_read(isa->busdev.iobase[0] + 0x07, 1, 1, + register_ioport_read(iobase + 0x07, 1, 1, &fdctrl_read_port, fdctrl); - register_ioport_write(isa->busdev.iobase[0] + 0x01, 5, 1, + register_ioport_write(iobase + 0x01, 5, 1, &fdctrl_write_port, fdctrl); - register_ioport_write(isa->busdev.iobase[0] + 0x07, 1, 1, + register_ioport_write(iobase + 0x07, 1, 1, &fdctrl_write_port, fdctrl); isa_init_irq(&isa->busdev, &fdctrl->irq); |