crtce_lock();
}
-/****************************************************************
-* 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
****************************************************************/