All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)
@ 2014-12-16 11:00 Guillaume GARDET
  2014-12-16 17:16 ` Robert Nelson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Guillaume GARDET @ 2014-12-16 11:00 UTC (permalink / raw)
  To: u-boot

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).

Reported-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>

Cc: Tom Rini <trini@ti.com>
Cc: Robert Nelson <robertcnelson@gmail.com>

---
 common/spl/spl_mmc.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 7bae16b..c2e596b 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -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)
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)
  2014-12-16 11:00 [U-Boot] [PATCH] spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f) Guillaume GARDET
@ 2014-12-16 17:16 ` Robert Nelson
  2014-12-16 17:43   ` Guillaume Gardet
  2014-12-27  9:53 ` Guillaume Gardet
  2015-01-05 18:49 ` Pantelis Antoniou
  2 siblings, 1 reply; 6+ messages in thread
From: Robert Nelson @ 2014-12-16 17:16 UTC (permalink / raw)
  To: u-boot

On Tue, Dec 16, 2014 at 5:00 AM, Guillaume GARDET
<guillaume.gardet@free.fr> wrote:
> 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).
>
> Reported-by: Robert Nelson <robertcnelson@gmail.com>
> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
>
> Cc: Tom Rini <trini@ti.com>
> Cc: Robert Nelson <robertcnelson@gmail.com>

Thanks Guillaume!

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

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)
  2014-12-16 17:16 ` Robert Nelson
@ 2014-12-16 17:43   ` Guillaume Gardet
  2014-12-16 20:52     ` Robert Nelson
  0 siblings, 1 reply; 6+ messages in thread
From: Guillaume Gardet @ 2014-12-16 17:43 UTC (permalink / raw)
  To: u-boot


Le 16/12/2014 18:16, Robert Nelson a ?crit :
> On Tue, Dec 16, 2014 at 5:00 AM, Guillaume GARDET
> <guillaume.gardet@free.fr> wrote:
>> 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).
>>
>> Reported-by: Robert Nelson <robertcnelson@gmail.com>
>> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
>>
>> Cc: Tom Rini <trini@ti.com>
>> Cc: Robert Nelson <robertcnelson@gmail.com>
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)
  2014-12-16 17:43   ` Guillaume Gardet
@ 2014-12-16 20:52     ` Robert Nelson
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Nelson @ 2014-12-16 20:52 UTC (permalink / raw)
  To: u-boot

On Tue, Dec 16, 2014 at 11:43 AM, Guillaume Gardet
<guillaume.gardet@free.fr> wrote:
>
> Le 16/12/2014 18:16, Robert Nelson a ?crit :
>
>> On Tue, Dec 16, 2014 at 5:00 AM, Guillaume GARDET
>> <guillaume.gardet@free.fr> wrote:
>>>
>>> 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).
>>>
>>> Reported-by: Robert Nelson <robertcnelson@gmail.com>
>>> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>

Tested-by: Robert Nelson <robertcnelson@gmail.com>

>>>
>>> Cc: Tom Rini <trini@ti.com>
>>> Cc: Robert Nelson <robertcnelson@gmail.com>
>>
>> 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,

-- 
Robert Nelson
http://www.rcn-ee.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)
  2014-12-16 11:00 [U-Boot] [PATCH] spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f) Guillaume GARDET
  2014-12-16 17:16 ` Robert Nelson
@ 2014-12-27  9:53 ` Guillaume Gardet
  2015-01-05 18:49 ` Pantelis Antoniou
  2 siblings, 0 replies; 6+ messages in thread
From: Guillaume Gardet @ 2014-12-27  9:53 UTC (permalink / raw)
  To: u-boot

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 :
> 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).
>
> Reported-by: Robert Nelson <robertcnelson@gmail.com>
> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
>
> Cc: Tom Rini <trini@ti.com>
> Cc: Robert Nelson <robertcnelson@gmail.com>
>
> ---
>   common/spl/spl_mmc.c | 19 ++++++++++++++++---
>   1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
> index 7bae16b..c2e596b 100644
> --- a/common/spl/spl_mmc.c
> +++ b/common/spl/spl_mmc.c
> @@ -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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f)
  2014-12-16 11:00 [U-Boot] [PATCH] spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f) Guillaume GARDET
  2014-12-16 17:16 ` Robert Nelson
  2014-12-27  9:53 ` Guillaume Gardet
@ 2015-01-05 18:49 ` Pantelis Antoniou
  2 siblings, 0 replies; 6+ messages in thread
From: Pantelis Antoniou @ 2015-01-05 18:49 UTC (permalink / raw)
  To: u-boot

Hi Guillaume,

> On Dec 16, 2014, at 13:00 , Guillaume GARDET <guillaume.gardet@free.fr> wrote:
> 
> 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).
> 
> Reported-by: Robert Nelson <robertcnelson@gmail.com>
> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
> 
> Cc: Tom Rini <trini@ti.com>
> Cc: Robert Nelson <robertcnelson@gmail.com>
> 
> ---
> common/spl/spl_mmc.c | 19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
> index 7bae16b..c2e596b 100644
> --- a/common/spl/spl_mmc.c
> +++ b/common/spl/spl_mmc.c
> @@ -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)
> -- 
> 1.8.4.5

Applied, thanks

? Pantelis

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-05 18:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-16 11:00 [U-Boot] [PATCH] spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f) Guillaume GARDET
2014-12-16 17:16 ` Robert Nelson
2014-12-16 17:43   ` Guillaume Gardet
2014-12-16 20:52     ` Robert Nelson
2014-12-27  9:53 ` Guillaume Gardet
2015-01-05 18:49 ` Pantelis Antoniou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.