From 1df1f5955d21fb429d9f791ef6a6ad1d24a47a82 Mon Sep 17 00:00:00 2001 From: Li-Ta Lo Date: Thu, 26 Oct 2000 03:13:26 +0000 Subject: [PATCH] set CLKIN frequence to 24 MHZ for correct Serial Port operation --- src/superio/sis/950/superio.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/superio/sis/950/superio.c b/src/superio/sis/950/superio.c index 6ee98dfc27..1d5cf952db 100644 --- a/src/superio/sis/950/superio.c +++ b/src/superio/sis/950/superio.c @@ -8,20 +8,20 @@ void enter_pnp() { - // unlock it XXX make this a subr at some point - outb(0x87, 0x2e); - outb(0x01, 0x2e); - outb(0x55, 0x2e); - outb(0x55, 0x2e); + // unlock it XXX make this a subr at some point + outb(0x87, 0x2e); + outb(0x01, 0x2e); + outb(0x55, 0x2e); + outb(0x55, 0x2e); } void exit_pnp() { - /* all done. */ - // select configure control - outb(2, 0x2e); - outb(2, 0x2f); + /* all done. */ + // select configure control + outb(2, 0x2e); + outb(2, 0x2f); } #ifdef MUST_ENABLE_FLOPPY @@ -35,13 +35,13 @@ void enable_floppy() /* now select register 0x30, and set bit 1 in that register */ outb(0x30, 0x2e); outb(0x1, 0x2f); - } #endif /* MUST_ENABLE_FLOPPY */ void enable_com(int com) { + unsigned char b; /* now set the LDN to com LDN */ outb(0x7, 0x2e); /* pick reg. 7 */ outb(com, 0x2f); /* LDN 0 to reg. 7 */ @@ -50,6 +50,11 @@ enable_com(int com) outb(0x30, 0x2e); outb(0x1, 0x2f); + /* set CLKIN frequence to 24 MHZ */ + outb(0x24, 0x2e); + b = inb(0x2f) | 0xfd; + outb(0x24, 0x2e); + outb(b, 0x2f); } void