Until now, we relied on a race condition that is broken on 11.0.0.
In 11.0.0 there's an eMMC request that happens while FS kills power to SD.
This causese the emuMMC driver to fail and do rereads and reinit SD. That slows down boot by 30s to 1min.
Additionally, because FS finds the sd card already powered while its init happens, it gets no support for UHS and initializes into HS25. Effectively decimating performance.
This commit adds sdmmc_wrapper_controller_open hook, in order to catch that and lock any eMMC access. After the full FS sd init happens it gets unlocked.
TODO: For now it only hooks 11.0.0. Any other version is skipped.
Until now, we relied on a race condition that is broken on 11.0.0.
In 11.0.0 there's an eMMC request that happens while FS kills power to SD. This causese the emuMMC driver to fail and do rereads and reinit SD. That slows down boot by 30s to 1min.
Additionally, because FS finds the sd card already powered while its init happens, it gets no support for UHS and initializes into HS25. Effectively decimating performance.
This commit adds sdmmc_wrapper_controller_open hook, in order to catch that and lock any eMMC access. After the full FS sd init happens it gets unlocked.
TODO: For now it only hooks 11.0.0. Any other version is skipped.