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
|
void
|
||||||
enter_pnp()
|
enter_pnp()
|
||||||
{
|
{
|
||||||
// unlock it XXX make this a subr at some point
|
// unlock it XXX make this a subr at some point
|
||||||
outb(0x87, 0x2e);
|
outb(0x87, 0x2e);
|
||||||
outb(0x01, 0x2e);
|
outb(0x01, 0x2e);
|
||||||
outb(0x55, 0x2e);
|
outb(0x55, 0x2e);
|
||||||
outb(0x55, 0x2e);
|
outb(0x55, 0x2e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
exit_pnp()
|
exit_pnp()
|
||||||
{
|
{
|
||||||
/* all done. */
|
/* all done. */
|
||||||
// select configure control
|
// select configure control
|
||||||
outb(2, 0x2e);
|
outb(2, 0x2e);
|
||||||
outb(2, 0x2f);
|
outb(2, 0x2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MUST_ENABLE_FLOPPY
|
#ifdef MUST_ENABLE_FLOPPY
|
||||||
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue