mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
set CLKIN frequence to 24 MHZ for correct Serial Port operation
This commit is contained in:
parent
da504a912a
commit
1df1f5955d
1 changed files with 15 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue