1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-22 18:06:40 +00:00

emummc: Bail if emummc is not enabled

This commit is contained in:
CTCaer 2020-06-14 13:31:16 +03:00
parent 4d8dbe068d
commit ad5a50ecd9
2 changed files with 7 additions and 3 deletions

View file

@ -129,17 +129,19 @@ static int emummc_raw_get_part_off(int part_idx)
int emummc_storage_init_mmc(sdmmc_storage_t *storage, sdmmc_t *sdmmc) int emummc_storage_init_mmc(sdmmc_storage_t *storage, sdmmc_t *sdmmc)
{ {
FILINFO fno; FILINFO fno;
emu_cfg.active_part = 0;
// Always init eMMC even when in emuMMC. eMMC is needed from theh emuMMC driver anyway.
if (!sdmmc_storage_init_mmc(storage, sdmmc, SDMMC_BUS_WIDTH_8, SDHCI_TIMING_MMC_HS400)) if (!sdmmc_storage_init_mmc(storage, sdmmc, SDMMC_BUS_WIDTH_8, SDHCI_TIMING_MMC_HS400))
return 2; return 2;
if (h_cfg.emummc_force_disable) if (!emu_cfg.enabled || h_cfg.emummc_force_disable)
return 0; return 0;
emu_cfg.active_part = 0;
if (!sd_mount()) if (!sd_mount())
goto out; goto out;
if (emu_cfg.enabled && !emu_cfg.sector) if (!emu_cfg.sector)
{ {
strcpy(emu_cfg.emummc_file_based_path, emu_cfg.path); strcpy(emu_cfg.emummc_file_based_path, emu_cfg.path);
strcat(emu_cfg.emummc_file_based_path, "/eMMC"); strcat(emu_cfg.emummc_file_based_path, "/eMMC");

View file

@ -28,6 +28,8 @@
//#define DPRINTF(...) gfx_printf(__VA_ARGS__) //#define DPRINTF(...) gfx_printf(__VA_ARGS__)
#define DPRINTF(...) #define DPRINTF(...)
u32 sd_power_cycle_time_start;
static inline u32 unstuff_bits(u32 *resp, u32 start, u32 size) static inline u32 unstuff_bits(u32 *resp, u32 start, u32 size)
{ {
const u32 mask = (size < 32 ? 1 << size : 0) - 1; const u32 mask = (size < 32 ? 1 << size : 0) - 1;