Atmosphere/fusee/fusee-primary/src
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
..
display Sync sdmmc changes between stage1 and 2 2018-05-19 02:50:50 +02:00
hwinit Revamp all the Makefiles (thanks @fincs @WinterMute) 2018-05-19 01:07:27 +02:00
lib Pass screen status and mmc struct from stage1 to 2 2018-06-04 19:17:23 +02:00
apb_misc.h Make sdmmc autocalibration follow TRM procedure 2018-06-05 19:07:14 +02:00
car.h Copy latest sdmmc driver to stage2 2018-05-24 01:17:13 +02:00
chainloader.c Refactor stage1's and stage2's main.c files 2018-05-08 16:51:43 +02:00
chainloader.h Refactor stage1's and stage2's main.c files 2018-05-08 16:51:43 +02:00
exception_handlers_asm.s Refactor fusee's makefile 2018-05-27 00:59:02 +02:00
exception_handlers.c Stage2: Add exception handlers 2018-05-21 03:50:53 +02:00
exception_handlers.h [stage1] Add exception handlers... which somehow don't work? 2018-05-21 02:24:41 +02:00
fs_utils.c Rename sd_utils to fs_utils, etc 2018-05-13 23:49:50 +02:00
fs_utils.h Rename sd_utils to fs_utils, etc 2018-05-13 23:49:50 +02:00
fuse.c Change fusee folder naming 2018-04-07 21:45:57 -06:00
fuse.h Change fusee folder naming 2018-04-07 21:45:57 -06:00
gpio.c fusee: merge in most of the microSD card (not fully working) 2018-05-04 03:24:27 -06:00
gpio.h fusee: merge in most of the microSD card (not fully working) 2018-05-04 03:24:27 -06:00
hwinit.h Redesign fs_dev, raw_dev, introducing device_partition and switch_fs. 2018-05-13 19:53:55 +02:00
init.c stage2: fix init malloc size for stage2_args_t 2018-05-08 23:24:27 -04:00
main.c Pass screen status and mmc struct from stage1 to 2 2018-06-04 19:17:23 +02:00
pad_control.h Remove packed when not needed 2018-05-20 22:57:25 +02:00
panic_color.h Change fusee folder naming 2018-04-07 21:45:57 -06:00
panic.c Fusee use CAR reboot for fatal errors 2018-05-20 23:52:09 +02:00
panic.h Add custom panic driver 2018-05-20 14:11:46 +02:00
pinmux.h Remove packed when not needed 2018-05-20 22:57:25 +02:00
pmc.h Add custom panic driver 2018-05-20 14:11:46 +02:00
preprocessor.h Change fusee folder naming 2018-04-07 21:45:57 -06:00
sdmmc.c Fix race conditions and misconfiguration in sdmmc 2018-06-09 17:37:53 +02:00
sdmmc.h Pass screen status and mmc struct from stage1 to 2 2018-06-04 19:17:23 +02:00
se.c Stage1: fix SE issue too 2018-05-21 21:18:30 +02:00
se.h Use uintX_t for the SE & copy bugfixed SE struct definition 2018-05-21 19:05:00 +02:00
stage2.c Introduce fatal_error 2018-05-20 16:18:48 +02:00
stage2.h Pass screen status and mmc struct from stage1 to 2 2018-06-04 19:17:23 +02:00
start.s Fix bug in crt0 2018-05-08 14:56:17 +02:00
supplies.c fusee: support low-voltage SDMMC mode 2018-05-10 06:05:28 -07:00
supplies.h fusee: support low-voltage SDMMC mode 2018-05-10 06:05:28 -07:00
timers.h skeleton SDMMC 2018-05-04 03:24:27 -06:00
utils.c [stage1] Add exception handlers... which somehow don't work? 2018-05-21 02:24:41 +02:00
utils.h [stage1] Add exception handlers... which somehow don't work? 2018-05-21 02:24:41 +02:00