Pass screen status and mmc struct from stage1 to 2

This commit is contained in:
TuxSH
2018-06-04 19:17:23 +02:00
parent 116eb6c67c
commit b2139ed182
13 changed files with 139 additions and 30 deletions

View File

@@ -15,15 +15,8 @@
static bool g_ahb_redirect_enabled = false;
// Only use voltage switching in stage2 and later.
#ifdef FUSEE_STAGE1_SRC
#define MMC_VOLTAGE_SWITCHING_ALLOWED false
#else
#define MMC_VOLTAGE_SWITCHING_ALLOWED true
#endif
/* Global sd struct. */
static struct mmc g_sd_mmc = {0};
struct mmc g_sd_mmc = {0};
static bool g_sd_initialized = false;
int initialize_sd_mmc(void) {
@@ -33,7 +26,7 @@ int initialize_sd_mmc(void) {
}
if (!g_sd_initialized) {
int rc = sdmmc_init(&g_sd_mmc, SWITCH_MICROSD, MMC_VOLTAGE_SWITCHING_ALLOWED);
int rc = sdmmc_init(&g_sd_mmc, SWITCH_MICROSD, false);
if (rc == 0) {
g_sd_initialized = true;
return 0;