move public API to "hw/display/vga.h" and private registers to "hw/display/vga_int_regs.h"
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/display/vga_int.h | 3 ++- hw/display/{vga.h => vga_int_regs.h} | 0 include/hw/display/vga.h | 25 +++++++++++++++++++++++++ include/hw/i386/pc.h | 12 ------------ hw/display/vga-isa-mm.c | 4 +--- hw/display/vga-isa.c | 2 +- hw/display/vga.c | 4 ++-- hw/mips/mips_jazz.c | 1 + vl.c | 2 +- MAINTAINERS | 1 + 10 files changed, 34 insertions(+), 20 deletions(-) rename hw/display/{vga.h => vga_int_regs.h} (100%) create mode 100644 include/hw/display/vga.h diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index ad34a1f048..fe23b81442 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -25,8 +25,9 @@ #ifndef HW_VGA_INT_H #define HW_VGA_INT_H -#include "hw/hw.h" +#include "exec/ioport.h" #include "exec/memory.h" +#include "ui/console.h" #define ST01_V_RETRACE 0x08 #define ST01_DISP_ENABLE 0x01 diff --git a/hw/display/vga.h b/hw/display/vga_int_regs.h similarity index 100% rename from hw/display/vga.h rename to hw/display/vga_int_regs.h diff --git a/include/hw/display/vga.h b/include/hw/display/vga.h new file mode 100644 index 0000000000..0401a3a292 --- /dev/null +++ b/include/hw/display/vga.h @@ -0,0 +1,25 @@ +/* + * QEMU VGA Emulator. + * + * Copyright (c) 2003 Fabrice Bellard + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#ifndef QEMU_HW_DISPLAY_VGA_H +#define QEMU_HW_DISPLAY_VGA_H + +#include "exec/memory.h" + +enum vga_retrace_method { + VGA_RETRACE_DUMB, + VGA_RETRACE_PRECISE +}; + +extern enum vga_retrace_method vga_retrace_method; + +int isa_vga_mm_init(hwaddr vram_base, + hwaddr ctrl_base, int it_shift, + MemoryRegion *address_space); + +#endif diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index b1b4c918af..25ba378bd8 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -302,18 +302,6 @@ PCIBus *find_i440fx(void); extern PCIDevice *piix4_dev; int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn); -/* vga.c */ -enum vga_retrace_method { - VGA_RETRACE_DUMB, - VGA_RETRACE_PRECISE -}; - -extern enum vga_retrace_method vga_retrace_method; - -int isa_vga_mm_init(hwaddr vram_base, - hwaddr ctrl_base, int it_shift, - MemoryRegion *address_space); - /* ne2000.c */ static inline bool isa_ne2000_init(ISABus *bus, int base, int irq, NICInfo *nd) { diff --git a/hw/display/vga-isa-mm.c b/hw/display/vga-isa-mm.c index 51ccbccc41..e887b45651 100644 --- a/hw/display/vga-isa-mm.c +++ b/hw/display/vga-isa-mm.c @@ -23,11 +23,9 @@ */ #include "qemu/osdep.h" #include "hw/hw.h" -#include "ui/console.h" -#include "hw/i386/pc.h" +#include "hw/display/vga.h" #include "vga_int.h" #include "ui/pixel_ops.h" -#include "qemu/timer.h" #define VGA_RAM_SIZE (8192 * 1024) diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c index 1af95562f2..9af43abee8 100644 --- a/hw/display/vga-isa.c +++ b/hw/display/vga-isa.c @@ -26,7 +26,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "ui/console.h" -#include "hw/i386/pc.h" +#include "hw/isa/isa.h" #include "vga_int.h" #include "ui/pixel_ops.h" #include "qemu/timer.h" diff --git a/hw/display/vga.c b/hw/display/vga.c index ed24ef7076..0da4942a09 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -24,9 +24,9 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/hw.h" -#include "vga.h" +#include "hw/display/vga.h" #include "ui/console.h" -#include "hw/i386/pc.h" +#include "vga_int_regs.h" #include "hw/pci/pci.h" #include "vga_int.h" #include "ui/pixel_ops.h" diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index 5f37852499..25f0294236 100644 --- a/hw/mips/mips_jazz.c +++ b/hw/mips/mips_jazz.c @@ -39,6 +39,7 @@ #include "hw/loader.h" #include "hw/timer/mc146818rtc.h" #include "hw/timer/i8254.h" +#include "hw/display/vga.h" #include "hw/audio/pcspk.h" #include "sysemu/block-backend.h" #include "hw/sysbus.h" diff --git a/vl.c b/vl.c index 0d1f612629..f0b7106feb 100644 --- a/vl.c +++ b/vl.c @@ -57,9 +57,9 @@ int main(int argc, char **argv) #include "hw/boards.h" #include "sysemu/accel.h" #include "hw/usb.h" -#include "hw/i386/pc.h" #include "hw/isa/isa.h" #include "hw/scsi/scsi.h" +#include "hw/display/vga.h" #include "hw/bt.h" #include "sysemu/watchdog.h" #include "hw/smbios/smbios.h" diff --git a/MAINTAINERS b/MAINTAINERS index ddaba2702c..9907b3dae2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -860,6 +860,7 @@ F: hw/timer/hpet* F: hw/timer/i8254* F: hw/timer/mc146818rtc* F: hw/watchdog/wdt_ib700.c +F: include/hw/display/vga.h F: include/hw/dma/i8257_dma.h F: include/hw/i2c/pm_smbus.h F: include/hw/timer/hpet.h -- 2.15.0.rc0