[U-Boot,v2,2/2] icorem6_rqs: env: Return mmc devno

Message ID 1507819464-24321-2-git-send-email-jagan@amarulasolutions.com
State New
Delegated to: Stefano Babic
Headers show
Series
  • [U-Boot,v2,1/2] icore: configs: Fix merge conflict issue
Related show

Commit Message

Jagan Teki Oct. 12, 2017, 2:44 p.m.
Instead of changing mmc devno from dts nodes better
to return the detected devno so-that env trigger the same.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- None

 board/engicam/icorem6_rqs/icorem6_rqs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Stefano Babic Oct. 12, 2017, 3:43 p.m. | #1
On 12/10/2017 16:44, Jagan Teki wrote:
> Instead of changing mmc devno from dts nodes better
> to return the detected devno so-that env trigger the same.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v2:
> - None
> 
>  board/engicam/icorem6_rqs/icorem6_rqs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c
> index 2a321dc..0114889 100644
> --- a/board/engicam/icorem6_rqs/icorem6_rqs.c
> +++ b/board/engicam/icorem6_rqs/icorem6_rqs.c
> @@ -27,8 +27,7 @@ DECLARE_GLOBAL_DATA_PTR;
>  #ifdef CONFIG_ENV_IS_IN_MMC
>  int board_mmc_get_env_dev(int devno)
>  {
> -	/* dev 0 for SD/eSD, dev 1 for MMC/eMMC */
> -	return (devno == 3) ? 1 : 0;
> +	return devno;
>  }
>  #endif
>  
> 

Reviewed-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

Patch

diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c
index 2a321dc..0114889 100644
--- a/board/engicam/icorem6_rqs/icorem6_rqs.c
+++ b/board/engicam/icorem6_rqs/icorem6_rqs.c
@@ -27,8 +27,7 @@  DECLARE_GLOBAL_DATA_PTR;
 #ifdef CONFIG_ENV_IS_IN_MMC
 int board_mmc_get_env_dev(int devno)
 {
-	/* dev 0 for SD/eSD, dev 1 for MMC/eMMC */
-	return (devno == 3) ? 1 : 0;
+	return devno;
 }
 #endif