[SeaBIOS] [PATCH 02/15] Remove all dc_ functions as they are not needed anymore

Christian Gmeiner christian.gmeiner at gmail.com
Sat Sep 1 17:12:53 CEST 2012


As we access teh DC registers via memory we do not need all
the DC-VGA-mapping functions anymore.

Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
 vgasrc/geodevga.c | 65 -------------------------------------------------------
 1 file changed, 65 deletions(-)

diff --git a/vgasrc/geodevga.c b/vgasrc/geodevga.c
index 8ce9ed1..2cf11a0 100644
--- a/vgasrc/geodevga.c
+++ b/vgasrc/geodevga.c
@@ -137,71 +137,6 @@ static void crtce_write(u8 reg, u8 val)
 }
 
 /****************************************************************
-* Display Controller Functions
-****************************************************************/
-static u32 dc_read(u16 seg, u32 reg)
-{
-    u32 val, *dest_far = (void*)reg;
-    val = GET_FARVAR(seg,*dest_far);
-    return val;
-}
-
-static void dc_write(u16 seg, u32 reg, u32 val)
-{
-    u32 *dest_far = (void*)reg;
-    SET_FARVAR(seg,*dest_far,val);
-}
-
-static void dc_set(u16 seg, u32 reg, u32 and, u32 or)
-{
-    u32 val = dc_read(seg,reg);
-    val &=and;
-    val |=or;
-    dc_write(seg,reg,val);
-}
-
-static void dc_unlock(u16 seg)
-{
-    dc_write(seg,DC_UNLOCK,DC_LOCK_UNLOCK);
-}
-
-static void dc_lock(u16 seg)
-{
-    dc_write(seg,DC_UNLOCK,DC_LOCK_LOCK);
-}
-
-static u16 dc_map(u16 seg)
-{
-    u8 reg;
-
-    reg = crtce_read(EXTENDED_MODE_CONTROL);
-    reg &= 0xf9;
-    switch (seg) {
-    case SEG_GRAPH:
-        reg |= 0x02;
-        break;
-    case SEG_MTEXT:
-        reg |= 0x04;
-        break;
-    case SEG_CTEXT:
-        reg |= 0x06;
-        break;
-    default:
-        seg=0;
-        break;
-    }
-
-    crtce_write(EXTENDED_MODE_CONTROL,reg);
-    return seg;
-}
-
-static void dc_unmap(void)
-{
-    dc_map(0);
-}
-
-
-/****************************************************************
 * Init Functions
 ****************************************************************/
 
-- 
1.7.11.rc2.5.g68f532f




More information about the SeaBIOS mailing list