From 90ab1e5656c9ae3b68e8c4bc807e45b467c44946 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Mon, 15 Jun 2020 17:33:13 +0300 Subject: [PATCH] hos: Hold USBD in reset before booting --- bootloader/hos/hos.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootloader/hos/hos.c b/bootloader/hos/hos.c index 82799f2..442cb9f 100644 --- a/bootloader/hos/hos.c +++ b/bootloader/hos/hos.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -1032,10 +1033,12 @@ int hos_launch(ini_sec_t *cfg) // Clear EMC_SCRATCH0. EMC(EMC_SCRATCH0) = 0; + // Hold USBD in reset for SoC state validation on sleep. + CLOCK(CLK_RST_CONTROLLER_RST_DEVICES_L) |= 0x400000; + // Flush cache and disable MMU. bpmp_mmu_disable(); bpmp_clk_rate_set(BPMP_CLK_NORMAL); - minerva_change_freq(FREQ_1600); // emuMMC: Some cards (Sandisk U1), do not like a fast power cycle. Wait min 100ms. sdmmc_storage_init_wait_sd();