Skip to contentSkip to conversation

spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)

PATCH New Guillaume GARDET 3 participants 6 messages Dec 16, 2014 – Jan 5, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)

As reported by Robert Nelson, commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f may break MMC RAW boot mode.
This patch fixes the check path to fix MMC Raw boot mode.

Tested raw boot mode and FS boot mode on a pandaboard (rev. A3).

Cc Tom Rini <[email protected]>
Cc Robert Nelson <[email protected]>
---
 common/spl/spl_mmc.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
common/spl/spl_mmc.c +16 -3
index 7bae16b..c2e596b 100644
@@ -172,11 +172,24 @@ void spl_mmc_load_image(void)
 		err = mmc_load_image_raw_sector(mmc,
 			CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
 #endif
-	} else {
+	}
+
+	switch(boot_mode){
+		case MMCSD_MODE_RAW:
+#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
+		case MMCSD_MODE_FS:
+#endif
+#ifdef CONFIG_SUPPORT_EMMC_BOOT
+		case MMCSD_MODE_EMMCBOOT:
+#endif
+			/* Boot mode is ok. Nothing to do. */
+			break;
+		case MMCSD_MODE_UNDEFINED:
+		default:
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-		puts("spl: wrong MMC boot mode\n");
+			puts("spl: wrong MMC boot mode\n");
 #endif
-		hang();
+			hang();
 	}
 
 	if (err)
Signature · 1 line
1.8.4.5
#1 lore raw

PATCH 1/1 spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)

Quoted 11 lines · Guillaume GARDET

As reported by Robert Nelson, commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f may break MMC RAW boot mode.
This patch fixes the check path to fix MMC Raw boot mode.

Tested raw boot mode and FS boot mode on a pandaboard (rev. A3).

Cc Tom Rini <[email protected]>
Cc Robert Nelson <[email protected]>

Thanks Guillaume!

Tested in raw & fs mode on a beaglebone black (microSD & eMMC)

Regards,

Signature · 2 lines
Robert Nelson
http://www.rcn-ee.com/
#2 lore raw

PATCH 1/1 spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)

Le 16/12/2014 18:16, Robert Nelson a ?crit :

Quoted 8 lines
Quoted 6 lines · Guillaume GARDET

As reported by Robert Nelson, commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f may break MMC RAW boot mode.
This patch fixes the check path to fix MMC Raw boot mode.

Tested raw boot mode and FS boot mode on a pandaboard (rev. A3).

Quoted 8 lines
Quoted 5 lines
Cc Tom Rini <[email protected]>
Cc Robert Nelson <[email protected]>

Thanks Guillaume!

Tested in raw & fs mode on a beaglebone black (microSD & eMMC)

Thanks for testing it. :) You could add your "tested by" tag.

Guillaume

#3 lore raw

PATCH 1/1 spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)

Quoted 15 lines · Guillaume Gardet

Le 16/12/2014 18:16, Robert Nelson a ?crit :

Quoted 12 lines
Quoted 10 lines · Guillaume GARDET

As reported by Robert Nelson, commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f
may break MMC RAW boot mode.
This patch fixes the check path to fix MMC Raw boot mode.

Tested raw boot mode and FS boot mode on a pandaboard (rev. A3).

Quoted 11 lines
Quoted 7 lines
Quoted 3 lines
Cc Tom Rini <[email protected]>
Cc Robert Nelson <[email protected]>

Thanks Guillaume!

Tested in raw & fs mode on a beaglebone black (microSD & eMMC)

Thanks for testing it. :) You could add your "tested by" tag.

I always forget. ;)

Regards,

Signature · 2 lines
Robert Nelson
http://www.rcn-ee.com/
#4 lore raw

PATCH 1/1 spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)

In reply to Guillaume GARDET

Ping.

This patch is needed for the release. Otherwise, raw boot mode is broken if FAT/SPL support is also enabled.

Guillaume

Le 16/12/2014 12:00, Guillaume GARDET a ?crit :

Quoted 48 lines

As reported by Robert Nelson, commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f may break MMC RAW boot mode.
This patch fixes the check path to fix MMC Raw boot mode.

Tested raw boot mode and FS boot mode on a pandaboard (rev. A3).

Cc Tom Rini <[email protected]>
Cc Robert Nelson <[email protected]>
---
  common/spl/spl_mmc.c | 19 ++++++++++++++++---
  1 file changed, 16 insertions(+), 3 deletions(-)
common/spl/spl_mmc.c +16 -3
index 7bae16b..c2e596b 100644
@@ -172,11 +172,24 @@ void spl_mmc_load_image(void)
  		err = mmc_load_image_raw_sector(mmc,
  			CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
  #endif
-	} else {
+	}
+
+	switch(boot_mode){
+		case MMCSD_MODE_RAW:
+#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
+		case MMCSD_MODE_FS:
+#endif
+#ifdef CONFIG_SUPPORT_EMMC_BOOT
+		case MMCSD_MODE_EMMCBOOT:
+#endif
+			/* Boot mode is ok. Nothing to do. */
+			break;
+		case MMCSD_MODE_UNDEFINED:
+		default:
  #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-		puts("spl: wrong MMC boot mode\n");
+			puts("spl: wrong MMC boot mode\n");
  #endif
-		hang();
+			hang();
  	}
 
  	if (err)
#5 lore raw

PATCH 1/1 spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)

In reply to Guillaume GARDET

Hi Guillaume,

Quoted 52 lines · Guillaume GARDET

As reported by Robert Nelson, commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f may break MMC RAW boot mode.
This patch fixes the check path to fix MMC Raw boot mode.

Tested raw boot mode and FS boot mode on a pandaboard (rev. A3).

Cc Tom Rini <[email protected]>
Cc Robert Nelson <[email protected]>

---
common/spl/spl_mmc.c | 19 ++++++++++++++++---

1 file changed, 16 insertions(+), 3 deletions(-)
common/spl/spl_mmc.c +16 -3
index 7bae16b..c2e596b 100644
@@ -172,11 +172,24 @@ void spl_mmc_load_image(void)
 		err = mmc_load_image_raw_sector(mmc,
 			CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
 #endif
-	} else {
+	}
+
+	switch(boot_mode){
+		case MMCSD_MODE_RAW:
+#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
+		case MMCSD_MODE_FS:
+#endif
+#ifdef CONFIG_SUPPORT_EMMC_BOOT
+		case MMCSD_MODE_EMMCBOOT:
+#endif
+			/* Boot mode is ok. Nothing to do. */
+			break;
+		case MMCSD_MODE_UNDEFINED:
+		default:
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-		puts("spl: wrong MMC boot mode\n");
+			puts("spl: wrong MMC boot mode\n");
 #endif
-		hang();
+			hang();
 	}
 
 	if (err)
Signature · 1 line
1.8.4.5

Applied, thanks

? Pantelis