mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 11:21:23 +00:00
bdk: sdmmc: move sdr12 setup for better readability
This commit is contained in:
parent
29e32f09fb
commit
2f7e841b50
2 changed files with 3 additions and 3 deletions
|
@ -846,6 +846,9 @@ static int _sd_storage_get_op_cond(sdmmc_storage_t *storage, bool is_sdsc, int b
|
||||||
// Switch to 1.8V signaling.
|
// Switch to 1.8V signaling.
|
||||||
if (_sdmmc_storage_execute_cmd_type1(storage, SD_SWITCH_VOLTAGE, 0, 0, R1_STATE_READY))
|
if (_sdmmc_storage_execute_cmd_type1(storage, SD_SWITCH_VOLTAGE, 0, 0, R1_STATE_READY))
|
||||||
{
|
{
|
||||||
|
if (!sdmmc_setup_clock(storage->sdmmc, SDHCI_TIMING_UHS_SDR12))
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (!sdmmc_enable_low_voltage(storage->sdmmc))
|
if (!sdmmc_enable_low_voltage(storage->sdmmc))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -1418,9 +1418,6 @@ int sdmmc_enable_low_voltage(sdmmc_t *sdmmc)
|
||||||
if (sdmmc->id != SDMMC_1)
|
if (sdmmc->id != SDMMC_1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!sdmmc_setup_clock(sdmmc, SDHCI_TIMING_UHS_SDR12))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
_sdmmc_commit_changes(sdmmc);
|
_sdmmc_commit_changes(sdmmc);
|
||||||
|
|
||||||
// Switch to 1.8V and wait for regulator to stabilize. Assume max possible wait needed.
|
// Switch to 1.8V and wait for regulator to stabilize. Assume max possible wait needed.
|
||||||
|
|
Loading…
Reference in a new issue