From 8d071ca7c9a1b0ad91d2474a8b7ba5c83fb40b5a Mon Sep 17 00:00:00 2001 From: "Kate J. Temkin" Date: Sun, 6 May 2018 22:47:36 -0600 Subject: [PATCH] fusee: fix boot partition selection --- fusee/fusee-primary/src/sdmmc.c | 2 +- fusee/fusee-primary/src/sdmmc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fusee/fusee-primary/src/sdmmc.c b/fusee/fusee-primary/src/sdmmc.c index cc1ab9011..38029942f 100644 --- a/fusee/fusee-primary/src/sdmmc.c +++ b/fusee/fusee-primary/src/sdmmc.c @@ -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. 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) { mmc_print(mmc, "failed to select partition %d (%02x, rc=%d)", partition, argument, rc); } diff --git a/fusee/fusee-primary/src/sdmmc.h b/fusee/fusee-primary/src/sdmmc.h index 7f0f483f5..a6ff51546 100644 --- a/fusee/fusee-primary/src/sdmmc.h +++ b/fusee/fusee-primary/src/sdmmc.h @@ -105,7 +105,7 @@ enum sdmmc_switch_access_mode { * Offsets into the SWITCH_MODE argument. */ enum sdmmc_switch_argument_offsets { - MMC_SWITCH_VALUE_SHIFT = 0, + MMC_SWITCH_VALUE_SHIFT = 8, MMC_SWITCH_FIELD_SHIFT = 16, MMC_SWITCH_ACCESS_MODE_SHIFT = 24, };