summaryrefslogtreecommitdiff
path: root/vgasrc
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-09-18 21:41:48 -0400
committerKevin O'Connor <kevin@koconnor.net>2013-09-28 22:10:31 -0400
commit4ade523a9db32b2a0e3cdeec3413c52e463542c8 (patch)
tree83da55d3236672934dc003765578d52e48b737bb /vgasrc
parent7b9f29736aecd3ac35021a8fc24ee15fc01d2c5a (diff)
downloadqemu-seabios-4ade523a9db32b2a0e3cdeec3413c52e463542c8.tar.gz
Remove ioport.h; disperse its contents to other header files.
Move the inb(), insb(), etc. code from ioport.h to x86.h. Move the PORT_* definitions to their appropriate hardware files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc')
-rw-r--r--vgasrc/bochsvga.c12
-rw-r--r--vgasrc/bochsvga.h12
-rw-r--r--vgasrc/stdvga.c8
-rw-r--r--vgasrc/stdvgaio.c4
4 files changed, 18 insertions, 18 deletions
diff --git a/vgasrc/bochsvga.c b/vgasrc/bochsvga.c
index 750624a..9425a82 100644
--- a/vgasrc/bochsvga.c
+++ b/vgasrc/bochsvga.c
@@ -15,6 +15,7 @@
#include "std/vbe.h" // VBE_CAPABILITY_8BIT_DAC
#include "stdvga.h" // VGAREG_SEQU_ADDRESS
#include "vgabios.h" // struct vbe_modeinfo
+#include "x86.h" // outw
/****************************************************************
@@ -130,6 +131,17 @@ bochsvga_list_modes(u16 seg, u16 *dest, u16 *last)
* Helper functions
****************************************************************/
+static inline u16 dispi_read(u16 reg)
+{
+ outw(reg, VBE_DISPI_IOPORT_INDEX);
+ return inw(VBE_DISPI_IOPORT_DATA);
+}
+static inline void dispi_write(u16 reg, u16 val)
+{
+ outw(reg, VBE_DISPI_IOPORT_INDEX);
+ outw(val, VBE_DISPI_IOPORT_DATA);
+}
+
int
bochsvga_get_window(struct vgamode_s *vmode_g, int window)
{
diff --git a/vgasrc/bochsvga.h b/vgasrc/bochsvga.h
index 87fb6ea..78b27c8 100644
--- a/vgasrc/bochsvga.h
+++ b/vgasrc/bochsvga.h
@@ -2,7 +2,6 @@
#define __BOCHSVGA_H
#include "types.h" // u8
-#include "ioport.h" // outw
#define VBE_DISPI_BANK_ADDRESS 0xA0000
#define VBE_DISPI_BANK_SIZE_KB 64
@@ -41,17 +40,6 @@
#define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xE0000000
-static inline u16 dispi_read(u16 reg)
-{
- outw(reg, VBE_DISPI_IOPORT_INDEX);
- return inw(VBE_DISPI_IOPORT_DATA);
-}
-static inline void dispi_write(u16 reg, u16 val)
-{
- outw(reg, VBE_DISPI_IOPORT_INDEX);
- outw(val, VBE_DISPI_IOPORT_DATA);
-}
-
struct vgamode_s *bochsvga_find_mode(int mode);
void bochsvga_list_modes(u16 seg, u16 *dest, u16 *last);
int bochsvga_get_window(struct vgamode_s *vmode_g, int window);
diff --git a/vgasrc/stdvga.c b/vgasrc/stdvga.c
index baf8135..e0661f1 100644
--- a/vgasrc/stdvga.c
+++ b/vgasrc/stdvga.c
@@ -5,12 +5,12 @@
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "vgabios.h" // struct vgamode_s
-#include "stdvga.h" // stdvga_setup
-#include "ioport.h" // outb
-#include "farptr.h" // SET_FARVAR
#include "biosvar.h" // GET_GLOBAL
+#include "farptr.h" // SET_FARVAR
+#include "stdvga.h" // stdvga_setup
#include "string.h" // memset_far
+#include "vgabios.h" // struct vgamode_s
+#include "x86.h" // outb
/****************************************************************
diff --git a/vgasrc/stdvgaio.c b/vgasrc/stdvgaio.c
index b370d1a..d6138c2 100644
--- a/vgasrc/stdvgaio.c
+++ b/vgasrc/stdvgaio.c
@@ -4,9 +4,9 @@
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "stdvga.h" // stdvga_pelmask_read
#include "farptr.h" // GET_FARVAR
-#include "ioport.h" // inb
+#include "stdvga.h" // stdvga_pelmask_read
+#include "x86.h" // inb
u8
stdvga_pelmask_read(void)