mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 09:21:57 -05:00
Kernel/SDHC: Return ENOTSUP if no base clock frequency provided
We would otherwise crash here on the Raspberry Pi 4.
This commit is contained in:
parent
6fa8165d91
commit
1d29f02274
1 changed files with 2 additions and 1 deletions
|
@ -963,7 +963,8 @@ ErrorOr<u32> SDHostController::retrieve_sd_clock_frequency()
|
|||
if (m_registers->capabilities.base_clock_frequency == 0) {
|
||||
// Spec says:
|
||||
// If these bits are all 0, the Host System has to get information via another method
|
||||
TODO();
|
||||
dbgln("FIXME: The SD Host Controller does not provide the base clock frequency; get this frequency using another method");
|
||||
return ENOTSUP;
|
||||
}
|
||||
i64 const one_mhz = 1'000'000;
|
||||
return { m_registers->capabilities.base_clock_frequency * one_mhz };
|
||||
|
|
Loading…
Reference in a new issue