Atmosphere/fusee
Tomasz Moń 804a40830e Fix race conditions and misconfiguration in sdmmc
Properly configure pull up and pull down offsets for autocal.
Run autocal prior to every transfer.

Prevent race conditions in sdmmc_wait_for_event() - make sure the fault
handler has highest priority, then the target irq, state conditions and
finally the error mask.

Do not clear all bits (|=) when acknowledging fault conditions,
only acknowledge the fault conditions itself.

Enable interrupts before preparing command registers - if sdmmc is fast
enough it can actually finish transfer before we enabled the interrupts.
Enabling interrupts clears the COMMAND COMPLETE status bit.

Temporarily print all the sdmmc messages in stage2 - for yet unknown
reason respecting the log level results in some failures.

This results in working microsd card in stage2 on my switch with Samsung
EVO+ 256GB microsd card.
2018-06-09 17:37:53 +02:00
..
fusee-primary Fix race conditions and misconfiguration in sdmmc 2018-06-09 17:37:53 +02:00
fusee-secondary Fix race conditions and misconfiguration in sdmmc 2018-06-09 17:37:53 +02:00
Makefile Make a top-level make build everything in order 2018-05-15 01:30:56 +02:00