diff mbox

[03/23] vga: export vga_ioport_{read,write}

Message ID 3897829bb10663007cf9f1fa30baaeadeeb8f5c2.1251725415.git.quintela@redhat.com
State Superseded
Headers show

Commit Message

Juan Quintela Aug. 31, 2009, 2:07 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/vga.c     |    8 ++++----
 hw/vga_int.h |    2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/hw/vga.c b/hw/vga.c
index 7bfd8e9..d1de04e 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -285,9 +285,9 @@  static uint8_t vga_dumb_retrace(VGAState *s)
     return s->st01 ^ (ST01_V_RETRACE | ST01_DISP_ENABLE);
 }

-static uint32_t vga_ioport_read(void *opaque, uint32_t addr)
+uint32_t vga_ioport_read(void *opaque, uint32_t addr)
 {
-    VGAState *s = opaque;
+    VGACommonState *s = opaque;
     int val, index;

     /* check port range access depending on color/monochrome mode */
@@ -378,9 +378,9 @@  static uint32_t vga_ioport_read(void *opaque, uint32_t addr)
     return val;
 }

-static void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
+void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
 {
-    VGAState *s = opaque;
+    VGACommonState *s = opaque;
     int index;

     /* check port range access depending on color/monochrome mode */
diff --git a/hw/vga_int.h b/hw/vga_int.h
index eb837ff..b44790d 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -194,6 +194,8 @@  void vga_common_reset(VGACommonState *s);

 void vga_dirty_log_start(VGACommonState *s);

+uint32_t vga_ioport_read(void *opaque, uint32_t addr);
+void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val);
 uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr);
 void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val);
 void vga_invalidate_scanlines(VGACommonState *s, int y1, int y2);