Revision 86c86157 hw/fdc.c

b/hw/fdc.c
1871 1871
    }
1872 1872
}
1873 1873

  
1874
fdctrl_t *fdctrl_init_isa(int isairq, int dma_chann,
1875
                          uint32_t io_base,
1876
                          BlockDriverState **fds)
1874
fdctrl_t *fdctrl_init_isa(BlockDriverState **fds)
1877 1875
{
1878 1876
    fdctrl_t *fdctrl;
1879 1877
    ISADevice *dev;
1878
    int isairq = 6;
1879
    int dma_chann = 2;
1880 1880

  
1881
    dev = isa_create_simple("isa-fdc", io_base, 0, isairq, -1);
1881
    dev = isa_create_simple("isa-fdc", isairq, -1);
1882 1882
    fdctrl = &(DO_UPCAST(fdctrl_isabus_t, busdev, dev)->state);
1883 1883

  
1884 1884
    fdctrl->dma_chann = dma_chann;
......
1968 1968
{
1969 1969
    fdctrl_isabus_t *isa = DO_UPCAST(fdctrl_isabus_t, busdev, dev);
1970 1970
    fdctrl_t *fdctrl = &isa->state;
1971
    int iobase = 0x3f0;
1971 1972

  
1972
    register_ioport_read(isa->busdev.iobase[0] + 0x01, 5, 1,
1973
    register_ioport_read(iobase + 0x01, 5, 1,
1973 1974
                         &fdctrl_read_port, fdctrl);
1974
    register_ioport_read(isa->busdev.iobase[0] + 0x07, 1, 1,
1975
    register_ioport_read(iobase + 0x07, 1, 1,
1975 1976
                         &fdctrl_read_port, fdctrl);
1976
    register_ioport_write(isa->busdev.iobase[0] + 0x01, 5, 1,
1977
    register_ioport_write(iobase + 0x01, 5, 1,
1977 1978
                          &fdctrl_write_port, fdctrl);
1978
    register_ioport_write(isa->busdev.iobase[0] + 0x07, 1, 1,
1979
    register_ioport_write(iobase + 0x07, 1, 1,
1979 1980
                          &fdctrl_write_port, fdctrl);
1980 1981
    isa_init_irq(&isa->busdev, &fdctrl->irq);
1981 1982

  

Also available in: Unified diff