set CLKIN frequence to 24 MHZ for correct Serial Port operation

This commit is contained in:
Li-Ta Lo 2000-10-26 03:13:26 +00:00
parent da504a912a
commit 1df1f5955d

View file

@ -35,13 +35,13 @@ void enable_floppy()
/* now select register 0x30, and set bit 1 in that register */ /* now select register 0x30, and set bit 1 in that register */
outb(0x30, 0x2e); outb(0x30, 0x2e);
outb(0x1, 0x2f); outb(0x1, 0x2f);
} }
#endif /* MUST_ENABLE_FLOPPY */ #endif /* MUST_ENABLE_FLOPPY */
void void
enable_com(int com) enable_com(int com)
{ {
unsigned char b;
/* now set the LDN to com LDN */ /* now set the LDN to com LDN */
outb(0x7, 0x2e); /* pick reg. 7 */ outb(0x7, 0x2e); /* pick reg. 7 */
outb(com, 0x2f); /* LDN 0 to reg. 7 */ outb(com, 0x2f); /* LDN 0 to reg. 7 */
@ -50,6 +50,11 @@ enable_com(int com)
outb(0x30, 0x2e); outb(0x30, 0x2e);
outb(0x1, 0x2f); outb(0x1, 0x2f);
/* set CLKIN frequence to 24 MHZ */
outb(0x24, 0x2e);
b = inb(0x2f) | 0xfd;
outb(0x24, 0x2e);
outb(b, 0x2f);
} }
void void