mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Kernel: Swap baud rate divisor registers in SerialDevice::set_baud
These were accidentally the wrong way around (LSB part of the divisor into the MSB register, MSB part of the divisor into the LSB register) as can be seen in the specification (and in the comments themselves)
This commit is contained in:
parent
0e5aba16ef
commit
be57c424f3
Notes:
sideshowbarker
2024-07-18 17:57:18 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/be57c424f3b Pull-request: https://github.com/SerenityOS/serenity/pull/7116 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/supercomputer7
1 changed files with 2 additions and 2 deletions
|
@ -87,8 +87,8 @@ void SerialDevice::set_baud(Baud baud)
|
|||
m_baud = baud;
|
||||
|
||||
IO::out8(m_base_addr + 3, IO::in8(m_base_addr + 3) | 0x80); // turn on DLAB
|
||||
IO::out8(m_base_addr + 0, ((u8)(baud)) >> 2); // lower half of divisor
|
||||
IO::out8(m_base_addr + 1, ((u8)(baud)) & 0xff); // upper half of divisor
|
||||
IO::out8(m_base_addr + 0, ((u8)(baud)) & 0xff); // lower half of divisor
|
||||
IO::out8(m_base_addr + 1, ((u8)(baud)) >> 2); // upper half of divisor
|
||||
IO::out8(m_base_addr + 3, IO::in8(m_base_addr + 3) & 0x7f); // turn off DLAB
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue