diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-09-10 11:43:26 +0200 |
---|---|---|
committer | malc <av1474@comtv.ru> | 2009-09-10 19:47:58 +0400 |
commit | 86c861578453b544fa67ad50d28c4460bee068c5 (patch) | |
tree | 639b1de76d4c0fdbd8ae2501da3288bc62ae28ce /hw/fdc.c | |
parent | 316940b06273c43ec8d58fcb0908267f7fa5d333 (diff) |
qdev: drop iobase properties from isa bus
Lot of ISA devices work at fixed addresses, so having iobase
as bus property doesn't make much sense. Devices which can
have different iobases will get a device property.
Also simply hard-code stuff which can't be configured anyway.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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); |