Skip to contentSkip to conversation

spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if available

PATCH In review Guillaume GARDET 3 participants 7 messages Nov 18, 2014 – Dec 16, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if available

In SPL MMC, boot modes are exclusive. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to try MMCSD_MODE_FS then, if available.

It has been tested on a pandaboard (rev. A3).

---
 common/spl/spl_mmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
common/spl/spl_mmc.c +2 -1
index ee71f79..2c34b75 100644
@@ -101,7 +101,8 @@ void spl_mmc_load_image(void)
 		err = mmc_load_image_raw(mmc,
 			CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
 #if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
-	} else if (boot_mode == MMCSD_MODE_FS) {
+	}
+	if (err || boot_mode == MMCSD_MODE_FS) {
 		debug("boot mode - FS\n");
 #ifdef CONFIG_SPL_FAT_SUPPORT
 #ifdef CONFIG_SPL_OS_BOOT
Signature · 1 line
1.8.4.5
#1 lore raw

PATCH 1/1 spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if available

Ping.
Just a friendly reminder.

Guillaume

Le 18/11/2014 10:44, Guillaume GARDET a ?crit :

Quoted 25 lines

In SPL MMC, boot modes are exclusive. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to try MMCSD_MODE_FS then, if available.

It has been tested on a pandaboard (rev. A3).

---
  common/spl/spl_mmc.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
common/spl/spl_mmc.c +2 -1
index ee71f79..2c34b75 100644
@@ -101,7 +101,8 @@ void spl_mmc_load_image(void)
  		err = mmc_load_image_raw(mmc,
  			CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
  #if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
-	} else if (boot_mode == MMCSD_MODE_FS) {
+	}
+	if (err || boot_mode == MMCSD_MODE_FS) {
  		debug("boot mode - FS\n");
  #ifdef CONFIG_SPL_FAT_SUPPORT
  #ifdef CONFIG_SPL_OS_BOOT
#2 lore raw
In reply to Guillaume GARDET
Quoted 7 lines · Guillaume GARDET

In SPL MMC, boot modes are exclusive. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to try MMCSD_MODE_FS then, if available.

It has been tested on a pandaboard (rev. A3).

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141208/40623a89/attachment.pgp>
#3 lore raw

PATCH 1/1 spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if available

In reply to Guillaume GARDET
Quoted 4 lines · Guillaume GARDET

In SPL MMC, boot modes are exclusive. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to try MMCSD_MODE_FS then, if available.

It has been tested on a pandaboard (rev. A3).

HI Guillaume,

What mode did you test this is? (RAW or FS)

In Raw Mode with the omap5_uevm & beaglebone black, i've had to revert this. (I'm using RAW mode by default)

U-Boot SPL 2015.01-rc3-dirty (Dec 08 2014 - 20:04:01) OMAP5432 ES2.0
SPL: Please implement spl_start_uboot() for your board
SPL: Direct Linux boot not active!
spl: wrong MMC boot mode
### ERROR ### Please RESET the board ###

Disk setup, I'm using

sudo dd if=/dev/zero of=${DISK} bs=1M count=10

sudo dd if=./u-boot/MLO of=${DISK} count=1 seek=1 conv=notrunc bs=128k sudo dd if=./u-boot/u-boot.img of=${DISK} count=2 seek=1 conv=notrunc bs=384k

sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__ 1,,0x83,*
__EOF__

Regards,

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

PATCH 1/1 spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if available

Hi Robert,

Le 12/12/2014 22:49, Robert Nelson a ?crit :

Quoted 9 lines
Quoted 4 lines · Guillaume GARDET

In SPL MMC, boot modes are exclusive. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to try MMCSD_MODE_FS then, if available.

It has been tested on a pandaboard (rev. A3).

HI Guillaume,

What mode did you test this is? (RAW or FS)

I did test for FS for sure, but not sure about raw mode.

Quoted 10 lines

In Raw Mode with the omap5_uevm & beaglebone black, i've had to revert this. (I'm using RAW mode by default)

U-Boot SPL 2015.01-rc3-dirty (Dec 08 2014 - 20:04:01) OMAP5432 ES2.0
SPL: Please implement spl_start_uboot() for your board
SPL: Direct Linux boot not active!
spl: wrong MMC boot mode
### ERROR ### Please RESET the board ###

Ok, I think I found the problem. Could you test the following patch, please?
http://guillaume.gardet.free.fr/u-boot/0001-spl-mmc-Fix-raw-boot-mode-related-to-commit.patch

If this patch fix your boot problem, I will send it ASAP.

Guillaume

#5 lore raw

PATCH 1/1 spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if available

Le 15/12/2014 09:43, Guillaume Gardet a ?crit :

Quoted 27 lines

Hi Robert,

Le 12/12/2014 22:49, Robert Nelson a ?crit :

Quoted 9 lines
Quoted 4 lines · Guillaume GARDET

In SPL MMC, boot modes are exclusive. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to try MMCSD_MODE_FS then, if available.

It has been tested on a pandaboard (rev. A3).

HI Guillaume,

What mode did you test this is? (RAW or FS)

I did test for FS for sure, but not sure about raw mode.

Quoted 10 lines

In Raw Mode with the omap5_uevm & beaglebone black, i've had to revert this. (I'm using RAW mode by default)

U-Boot SPL 2015.01-rc3-dirty (Dec 08 2014 - 20:04:01) OMAP5432 ES2.0
SPL: Please implement spl_start_uboot() for your board
SPL: Direct Linux boot not active!
spl: wrong MMC boot mode
### ERROR ### Please RESET the board ###

Quoted 4 lines

Ok, I think I found the problem. Could you test the following patch, please?
http://guillaume.gardet.free.fr/u-boot/0001-spl-mmc-Fix-raw-boot-mode-related-to-commit.patch

If this patch fix your boot problem, I will send it ASAP.

Just updated the patch with a better fix:
http://guillaume.gardet.free.fr/u-boot/0001-spl-mmc-Fix-raw-boot-mode-related-to-commit.patch

Guillaume

#6 lore raw

PATCH 1/1 spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if available

Le 15/12/2014 10:01, Guillaume Gardet a ?crit :

Quoted 28 lines

Le 15/12/2014 09:43, Guillaume Gardet a ?crit :

Quoted 27 lines

Hi Robert,

Le 12/12/2014 22:49, Robert Nelson a ?crit :

Quoted 9 lines
Quoted 4 lines · Guillaume GARDET

In SPL MMC, boot modes are exclusive. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to try MMCSD_MODE_FS then, if available.

It has been tested on a pandaboard (rev. A3).

HI Guillaume,

What mode did you test this is? (RAW or FS)

I did test for FS for sure, but not sure about raw mode.

Quoted 10 lines

In Raw Mode with the omap5_uevm & beaglebone black, i've had to revert this. (I'm using RAW mode by default)

U-Boot SPL 2015.01-rc3-dirty (Dec 08 2014 - 20:04:01) OMAP5432 ES2.0
SPL: Please implement spl_start_uboot() for your board
SPL: Direct Linux boot not active!
spl: wrong MMC boot mode
### ERROR ### Please RESET the board ###

Quoted 7 lines
Quoted 4 lines

Ok, I think I found the problem. Could you test the following patch, please?
http://guillaume.gardet.free.fr/u-boot/0001-spl-mmc-Fix-raw-boot-mode-related-to-commit.patch

If this patch fix your boot problem, I will send it ASAP.

Just updated the patch with a better fix:
http://guillaume.gardet.free.fr/u-boot/0001-spl-mmc-Fix-raw-boot-mode-related-to-commit.patch

As I was able to test this patch, I just sent it:
https://patchwork.ozlabs.org/patch/421858/

Guillaume