qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCHv3 03/14] Keep track of ISA ports ISA device is u


From: Gerd Hoffmann
Subject: [Qemu-devel] Re: [PATCHv3 03/14] Keep track of ISA ports ISA device is using in qdev.
Date: Thu, 11 Nov 2010 11:14:42 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100827 Red Hat/3.1.3-1.el6 Thunderbird/3.1.3

  Hi,

      register_ioport_write (s->port, 1, 1, gus_writeb, s);
      register_ioport_write (s->port, 1, 2, gus_writew, s);
+    isa_init_ioport_range(dev, s->port, 2);

      register_ioport_read ((s->port + 0x100)&  0xf00, 1, 1, gus_readb, s);
      register_ioport_read ((s->port + 0x100)&  0xf00, 1, 2, gus_readw, s);
+    isa_init_ioport_range(dev, (s->port + 0x100)&  0xf00, 2);

      register_ioport_write (s->port + 6, 10, 1, gus_writeb, s);
      register_ioport_write (s->port + 6, 10, 2, gus_writew, s);
      register_ioport_read (s->port + 6, 10, 1, gus_readb, s);
      register_ioport_read (s->port + 6, 10, 2, gus_readw, s);
+    isa_init_ioport_range(dev, s->port + 6, 10);


      register_ioport_write (s->port + 0x100, 8, 1, gus_writeb, s);
      register_ioport_write (s->port + 0x100, 8, 2, gus_writew, s);
      register_ioport_read (s->port + 0x100, 8, 1, gus_readb, s);
      register_ioport_read (s->port + 0x100, 8, 2, gus_readw, s);
+    isa_init_ioport_range(dev, s->port + 0x100, 8);

Seeing all the duplication here and elsewhere ...

How about moving the register_ioport_{read,write} calls into isa_init_ioport_range() ?

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]