Atmosphere/fusee/fusee-primary/src
Tomasz Moń 206c10f333 Rework sdmmc clocking configuration
Use 204 MHz as host clock in SDR104 mode instead of 136 MHz.
Due to this, also change the frequency init divider so the
initialization frequency is below 400 kHz.
This makes the clocks for SDMMC1 in all modes to match the TRM table.

Make it clear in the code that HS200/HS400 modes in fact use PLLP_OUT0
and not PLLC4_OUT2_LJ like the comment suggest. In fact selecting the
PLLC4_OUT2_LJ as clock source results in freeze after switching to
HS200/HS400 mode. This is most likely related to the PLLC4 not being
enabled, but it should be checked later.

Set the HS200/HS400 divider to 3, as this is what the code really did
set prior to this change - so this commit does not change that.

Configure Legacy 12 MHz clock to run at 12 MHz using the SW default
configuration (as per TRM) for the SDMMC legacy timer.

Introduce initial version of sdmmc_host_clock_delay() in order to use it
in places where the wait is host clock dependent. The way it is
implemented now does not change the sleep that was used instead.
2018-06-12 17:20:15 +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 Rework sdmmc clocking configuration 2018-06-12 17:20:15 +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.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
exception_handlers_asm.s Refactor fusee's makefile 2018-05-27 00:59:02 +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.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
panic_color.h Change fusee folder naming 2018-04-07 21:45:57 -06: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 Rework sdmmc clocking configuration 2018-06-12 17:20:15 +02:00
sdmmc.h Rework sdmmc clocking configuration 2018-06-12 17:20:15 +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