diff mbox

[U-Boot,v3,15/15] i.MX6Q: isiot: Switch the mmc env based on devno

Message ID 1486047373-31676-16-git-send-email-jagan@openedev.com
State Changes Requested
Delegated to: Stefano Babic
Headers show

Commit Message

Jagan Teki Feb. 2, 2017, 2:56 p.m. UTC
From: Jagan Teki <jagan@amarulasolutions.com>

Add board_mmc_get_env_dev

Switch the mmc env based on the mmc devno, instead of separately
defining a config item in include/configs using board_mmc_get_env_dev
- devno 0: sd/esd
- devno 1: mmc/emmc

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 board/engicam/icorem6_rqs/icorem6_rqs.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Stefano Babic Feb. 19, 2017, 4 p.m. UTC | #1
On 02/02/2017 15:56, Jagan Teki wrote:
> From: Jagan Teki <jagan@amarulasolutions.com>
> 
> Add board_mmc_get_env_dev
> 
> Switch the mmc env based on the mmc devno, instead of separately
> defining a config item in include/configs using board_mmc_get_env_dev
> - devno 0: sd/esd
> - devno 1: mmc/emmc
> 
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Matteo Lisi <matteo.lisi@engicam.com>
> Cc: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  board/engicam/icorem6_rqs/icorem6_rqs.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c
> index f289e91..d2f9309 100644
> --- a/board/engicam/icorem6_rqs/icorem6_rqs.c
> +++ b/board/engicam/icorem6_rqs/icorem6_rqs.c
> @@ -47,6 +47,12 @@ int board_init(void)
>  }
>  
>  #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;
> +}
> +
>  static void mmc_late_init(void)
>  {
>  	char cmd[32];
> 

IMHO just patch 1 has an issue - could you resubmit just that patch ? I
will merge then the whole patchset.

Thanks!

Stefano
Jagan Teki Feb. 22, 2017, 10:40 a.m. UTC | #2
On Sunday 19 February 2017 09:30 PM, Stefano Babic wrote:
> On 02/02/2017 15:56, Jagan Teki wrote:
>> From: Jagan Teki <jagan@amarulasolutions.com>
>>
>> Add board_mmc_get_env_dev
>>
>> Switch the mmc env based on the mmc devno, instead of separately
>> defining a config item in include/configs using board_mmc_get_env_dev
>> - devno 0: sd/esd
>> - devno 1: mmc/emmc
>>
>> Cc: Stefano Babic <sbabic@denx.de>
>> Cc: Matteo Lisi <matteo.lisi@engicam.com>
>> Cc: Michael Trimarchi <michael@amarulasolutions.com>
>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>> ---
>>  board/engicam/icorem6_rqs/icorem6_rqs.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c
>> index f289e91..d2f9309 100644
>> --- a/board/engicam/icorem6_rqs/icorem6_rqs.c
>> +++ b/board/engicam/icorem6_rqs/icorem6_rqs.c
>> @@ -47,6 +47,12 @@ int board_init(void)
>>  }
>>
>>  #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;
>> +}
>> +
>>  static void mmc_late_init(void)
>>  {
>>  	char cmd[32];
>>
>
> IMHO just patch 1 has an issue - could you resubmit just that patch ? I
> will merge then the whole patchset.

look like there are few other patches have merge issue, will resolve and 
send the two series again, will it be OK?

thanks!
Stefano Babic Feb. 22, 2017, 10:49 a.m. UTC | #3
On 22/02/2017 11:40, Jagan Teki wrote:
> On Sunday 19 February 2017 09:30 PM, Stefano Babic wrote:
>> On 02/02/2017 15:56, Jagan Teki wrote:
>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>>
>>> Add board_mmc_get_env_dev
>>>
>>> Switch the mmc env based on the mmc devno, instead of separately
>>> defining a config item in include/configs using board_mmc_get_env_dev
>>> - devno 0: sd/esd
>>> - devno 1: mmc/emmc
>>>
>>> Cc: Stefano Babic <sbabic@denx.de>
>>> Cc: Matteo Lisi <matteo.lisi@engicam.com>
>>> Cc: Michael Trimarchi <michael@amarulasolutions.com>
>>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>> ---
>>>  board/engicam/icorem6_rqs/icorem6_rqs.c | 6 ++++++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c
>>> b/board/engicam/icorem6_rqs/icorem6_rqs.c
>>> index f289e91..d2f9309 100644
>>> --- a/board/engicam/icorem6_rqs/icorem6_rqs.c
>>> +++ b/board/engicam/icorem6_rqs/icorem6_rqs.c
>>> @@ -47,6 +47,12 @@ int board_init(void)
>>>  }
>>>
>>>  #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;
>>> +}
>>> +
>>>  static void mmc_late_init(void)
>>>  {
>>>      char cmd[32];
>>>
>>
>> IMHO just patch 1 has an issue - could you resubmit just that patch ? I
>> will merge then the whole patchset.
> 
> look like there are few other patches have merge issue, will resolve and
> send the two series again, will it be OK?
> 

Absolutely, thanks !

Best regards,
Stefano
diff mbox

Patch

diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c
index f289e91..d2f9309 100644
--- a/board/engicam/icorem6_rqs/icorem6_rqs.c
+++ b/board/engicam/icorem6_rqs/icorem6_rqs.c
@@ -47,6 +47,12 @@  int board_init(void)
 }
 
 #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;
+}
+
 static void mmc_late_init(void)
 {
 	char cmd[32];