aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/tridentfb.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
index 919ce75db9e2..5976a1e40514 100644
--- a/drivers/video/tridentfb.c
+++ b/drivers/video/tridentfb.c
@@ -566,44 +566,32 @@ static inline void write3CE(int reg, unsigned char val)
566 566
567static void enable_mmio(void) 567static void enable_mmio(void)
568{ 568{
569 unsigned char tmp;
570
571 /* Goto New Mode */ 569 /* Goto New Mode */
572 outb(0x0B, 0x3C4); 570 outb(0x0B, 0x3C4);
573 inb(0x3C5); 571 inb(0x3C5);
574 572
575 /* Unprotect registers */ 573 /* Unprotect registers */
576 outb(NewMode1, 0x3C4); 574 outb(NewMode1, 0x3C4);
577 tmp = inb(0x3C5);
578 outb(0x80, 0x3C5); 575 outb(0x80, 0x3C5);
579 576
580 /* Enable MMIO */ 577 /* Enable MMIO */
581 outb(PCIReg, 0x3D4); 578 outb(PCIReg, 0x3D4);
582 outb(inb(0x3D5) | 0x01, 0x3D5); 579 outb(inb(0x3D5) | 0x01, 0x3D5);
583
584 t_outb(NewMode1, 0x3C4);
585 t_outb(tmp, 0x3C5);
586} 580}
587 581
588static void disable_mmio(void) 582static void disable_mmio(void)
589{ 583{
590 unsigned char tmp;
591
592 /* Goto New Mode */ 584 /* Goto New Mode */
593 t_outb(0x0B, 0x3C4); 585 t_outb(0x0B, 0x3C4);
594 t_inb(0x3C5); 586 t_inb(0x3C5);
595 587
596 /* Unprotect registers */ 588 /* Unprotect registers */
597 t_outb(NewMode1, 0x3C4); 589 t_outb(NewMode1, 0x3C4);
598 tmp = t_inb(0x3C5);
599 t_outb(0x80, 0x3C5); 590 t_outb(0x80, 0x3C5);
600 591
601 /* Disable MMIO */ 592 /* Disable MMIO */
602 t_outb(PCIReg, 0x3D4); 593 t_outb(PCIReg, 0x3D4);
603 t_outb(t_inb(0x3D5) & ~0x01, 0x3D5); 594 t_outb(t_inb(0x3D5) & ~0x01, 0x3D5);
604
605 outb(NewMode1, 0x3C4);
606 outb(tmp, 0x3C5);
607} 595}
608 596
609#define crtc_unlock() write3X4(CRTVSyncEnd, read3X4(CRTVSyncEnd) & 0x7F) 597#define crtc_unlock() write3X4(CRTVSyncEnd, read3X4(CRTVSyncEnd) & 0x7F)