fusee_cpp: add logic for loading mtc overlays

This commit is contained in:
Michael Scire 2021-08-23 21:15:51 -07:00 committed by SciresM
parent 4480e7a8a5
commit 3bcdd0c3c8
157 changed files with 2222 additions and 47 deletions

View file

@ -153,7 +153,6 @@ namespace ams::clkrst {
reg::ReadWrite(g_register_address + CLK_RST_CONTROLLER_PLLC_BASE, CLK_RST_REG_BITS_ENUM(PLLC_BASE_PLLC_ENABLE, DISABLE));
reg::ReadWrite(g_register_address + CLK_RST_CONTROLLER_PLLC_BASE, CLK_RST_REG_BITS_ENUM(PLLC_BASE_PLLC_REF_DIS, REF_DISABLE));
reg::ReadWrite(g_register_address + CLK_RST_CONTROLLER_PLLC_BASE, CLK_RST_REG_BITS_ENUM(PLLC_BASE_PLLC_REF_DIS, REF_DISABLE));
reg::SetBits(g_register_address + CLK_RST_CONTROLLER_PLLC_MISC1, (1u << 27));
reg::SetBits(g_register_address + CLK_RST_CONTROLLER_PLLC_MISC, (1u << 30));
util::WaitMicroSeconds(10);
@ -281,6 +280,11 @@ namespace ams::clkrst {
rate = BpmpClockRate_589MHz;
}
/* Change the rate, if we need to. */
if (rate == prev_rate) {
return prev_rate;
}
/* Configure the rate. */
if (rate != BpmpClockRate_408MHz) {
/* If we were previously overclocked, restore to PLLP_OUT. */