diff mbox

[U-Boot] ARM: at91: Don't invoke spl_boot_device() twice

Message ID 1463262148-8858-1-git-send-email-marex@denx.de
State Accepted
Commit 968ebdf1ef1493a9095cbc00934d608c624bcad4
Delegated to: Andreas Bießmann
Headers show

Commit Message

Marek Vasut May 14, 2016, 9:42 p.m. UTC
Since the spl_boot_mode() is now passed the boot device to boot from,
make use of it instead of inquiring for the boot device again. This
allows board_boot_order() to function correctly.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
---
 arch/arm/mach-at91/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Vasut May 14, 2016, 9:44 p.m. UTC | #1
On 05/14/2016 11:42 PM, Marek Vasut wrote:
> Since the spl_boot_mode() is now passed the boot device to boot from,
> make use of it instead of inquiring for the boot device again. This
> allows board_boot_order() to function correctly.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Andreas Bießmann <andreas.devel@googlemail.com>
> ---
>  arch/arm/mach-at91/spl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This one depends on :
[PATCH] common: Pass the boot device into spl_boot_mode()

> diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c
> index 561cf5f..236c8ec 100644
> --- a/arch/arm/mach-at91/spl.c
> +++ b/arch/arm/mach-at91/spl.c
> @@ -72,7 +72,7 @@ u32 spl_boot_device(void)
>  
>  u32 spl_boot_mode(const u32 boot_device)
>  {
> -	switch (spl_boot_device()) {
> +	switch (boot_device) {
>  #ifdef CONFIG_SYS_USE_MMC
>  	case BOOT_DEVICE_MMC1:
>  	case BOOT_DEVICE_MMC2:
>
Andreas Bießmann June 25, 2016, 9:24 p.m. UTC | #2
On 14.05.16 23:42, Marek Vasut wrote:
> Since the spl_boot_mode() is now passed the boot device to boot from,
> make use of it instead of inquiring for the boot device again. This
> allows board_boot_order() to function correctly.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Andreas Bießmann <andreas.devel@googlemail.com>

Reviewed-by: Andreas Bießmann <andreas@biessmann.org>

> ---
>  arch/arm/mach-at91/spl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c
> index 561cf5f..236c8ec 100644
> --- a/arch/arm/mach-at91/spl.c
> +++ b/arch/arm/mach-at91/spl.c
> @@ -72,7 +72,7 @@ u32 spl_boot_device(void)
>  
>  u32 spl_boot_mode(const u32 boot_device)
>  {
> -	switch (spl_boot_device()) {
> +	switch (boot_device) {
>  #ifdef CONFIG_SYS_USE_MMC
>  	case BOOT_DEVICE_MMC1:
>  	case BOOT_DEVICE_MMC2:
>
Andreas Bießmann June 26, 2016, 6:20 p.m. UTC | #3
Dear Marek Vasut,

Marek Vasut <marex@denx.de> writes:
>Since the spl_boot_mode() is now passed the boot device to boot from,
>make use of it instead of inquiring for the boot device again. This
>allows board_boot_order() to function correctly.
>
>Signed-off-by: Marek Vasut <marex@denx.de>
>Cc: Andreas Bießmann <andreas.devel@googlemail.com>
>Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
>---
> arch/arm/mach-at91/spl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
diff mbox

Patch

diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c
index 561cf5f..236c8ec 100644
--- a/arch/arm/mach-at91/spl.c
+++ b/arch/arm/mach-at91/spl.c
@@ -72,7 +72,7 @@  u32 spl_boot_device(void)
 
 u32 spl_boot_mode(const u32 boot_device)
 {
-	switch (spl_boot_device()) {
+	switch (boot_device) {
 #ifdef CONFIG_SYS_USE_MMC
 	case BOOT_DEVICE_MMC1:
 	case BOOT_DEVICE_MMC2: