mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Make RPi Timer::set_clock_rate static
This allows it to be called in UART without calling the Timer constructor. This in turn allows the UART to be used before interrupts are enabled.
This commit is contained in:
parent
3cf8d3361e
commit
a0b0c4e723
Notes:
sideshowbarker
2024-07-17 10:30:32 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/a0b0c4e723 Pull-request: https://github.com/SerenityOS/serenity/pull/14146 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/BertalanD Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/nico ✅
2 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ public:
|
|||
M2MC = 13,
|
||||
PIXEL_BVB = 14,
|
||||
};
|
||||
u32 set_clock_rate(ClockID, u32 rate_hz, bool skip_setting_turbo = true);
|
||||
static u32 set_clock_rate(ClockID, u32 rate_hz, bool skip_setting_turbo = true);
|
||||
|
||||
private:
|
||||
Timer();
|
||||
|
|
|
@ -101,7 +101,7 @@ UART::UART()
|
|||
|
||||
// Set UART clock so that the baud rate divisor ends up as 1.0.
|
||||
// FIXME: Not sure if this is a good UART clock rate.
|
||||
u32 rate_in_hz = Timer::the().set_clock_rate(Timer::ClockID::UART, 16 * baud_rate);
|
||||
u32 rate_in_hz = Timer::set_clock_rate(Timer::ClockID::UART, 16 * baud_rate);
|
||||
|
||||
// The BCM's PL011 UART is alternate function 0 on pins 14 and 15.
|
||||
auto& gpio = GPIO::the();
|
||||
|
|
Loading…
Reference in a new issue