diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2011-12-31 19:42:21 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2011-12-31 19:45:14 -0500 |
commit | 161d201affa5dd23a39a0de9a0743b857448c4b6 (patch) | |
tree | ca0a53497dcb2abf3aae97432d8c04e27b700d09 /vgasrc/vgahw.h | |
parent | 5108c69c47e18244206593c0c7918711311d8ef3 (diff) | |
download | seabios-161d201affa5dd23a39a0de9a0743b857448c4b6.tar.gz |
vgabios: Unify X_init() functions.
Use the same function signature for cirrus, bochsvga, geodelx, and
stdvga init code.
Have each hardware type explicitly call stdvga_init when needed.
To unify bochsvga_init() signature, store the device BDF passed into
the optionrom init code in a global variable (VgaBDF).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/vgahw.h')
-rw-r--r-- | vgasrc/vgahw.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vgasrc/vgahw.h b/vgasrc/vgahw.h index 57e41c3b..d34b0e75 100644 --- a/vgasrc/vgahw.h +++ b/vgasrc/vgahw.h @@ -7,6 +7,7 @@ #include "clext.h" // clext_set_mode #include "bochsvga.h" // bochsvga_set_mode #include "stdvga.h" // stdvga_set_mode +#include "geodelx.h" // geodelx_init static inline int vgahw_set_mode(int mode, int flags) { if (CONFIG_VGA_CIRRUS) @@ -16,4 +17,14 @@ static inline int vgahw_set_mode(int mode, int flags) { return stdvga_set_mode(mode, flags); } +static inline int vgahw_init(void) { + if (CONFIG_VGA_CIRRUS) + return clext_init(); + if (CONFIG_VGA_BOCHS) + return bochsvga_init(); + if (CONFIG_VGA_GEODELX) + return geodelx_init(); + return stdvga_init(); +} + #endif // vgahw.h |