fusee: fix boot partition selection

This commit is contained in:
Kate J. Temkin 2018-05-06 22:47:36 -06:00
parent f5ed029cdb
commit 8d071ca7c9
2 changed files with 2 additions and 2 deletions

View file

@ -2251,7 +2251,7 @@ int sdmmc_select_partition(struct mmc *mmc, enum sdmmc_partition partition)
// Set the PARTITION_CONFIG register to select the active partition. // Set the PARTITION_CONFIG register to select the active partition.
mmc_print(mmc, "switching to partition %d", partition); mmc_print(mmc, "switching to partition %d", partition);
rc = mmc->switch_mode(mmc, MMC_SWITCH_EXTCSD_NORMAL, MMC_PARTITION_CONFIG, argument, 0); rc = mmc->switch_mode(mmc, MMC_SWITCH_MODE_WRITE_BYTE, MMC_PARTITION_CONFIG, argument, 0);
if (rc) { if (rc) {
mmc_print(mmc, "failed to select partition %d (%02x, rc=%d)", partition, argument, rc); mmc_print(mmc, "failed to select partition %d (%02x, rc=%d)", partition, argument, rc);
} }

View file

@ -105,7 +105,7 @@ enum sdmmc_switch_access_mode {
* Offsets into the SWITCH_MODE argument. * Offsets into the SWITCH_MODE argument.
*/ */
enum sdmmc_switch_argument_offsets { enum sdmmc_switch_argument_offsets {
MMC_SWITCH_VALUE_SHIFT = 0, MMC_SWITCH_VALUE_SHIFT = 8,
MMC_SWITCH_FIELD_SHIFT = 16, MMC_SWITCH_FIELD_SHIFT = 16,
MMC_SWITCH_ACCESS_MODE_SHIFT = 24, MMC_SWITCH_ACCESS_MODE_SHIFT = 24,
}; };