* [U-Boot] [PATCH 1/5] i.MX6Q: icorem6: Add modeboot env via board_late_init
@ 2017-03-27 18:02 Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 2/5] i.MX6Q: icorem6: Add mmc_late_init Jagan Teki
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Jagan Teki @ 2017-03-27 18:02 UTC (permalink / raw)
To: u-boot
From: Jagan Teki <jagan@amarulasolutions.com>
Add runtime, modeboot env which is setting mmcboot, or
nandboot based on the bootdevice so-that conditional
macros b/w MMC and NAND for CONFIG_BOOTCOMMAND should
be avoided in config files.
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
arch/arm/cpu/armv7/mx6/Kconfig | 1 +
board/engicam/icorem6/icorem6.c | 19 +++++++++++++++++++
include/configs/imx6qdl_icore.h | 36 ++++++++++++++++--------------------
3 files changed, 36 insertions(+), 20 deletions(-)
diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index 9174136..37f271b 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -160,6 +160,7 @@ config TARGET_MX6QARM2
config TARGET_MX6Q_ICORE
bool "Support Engicam i.Core"
+ select BOARD_LATE_INIT
select MX6QDL
select OF_CONTROL
select DM
diff --git a/board/engicam/icorem6/icorem6.c b/board/engicam/icorem6/icorem6.c
index 171ec45..f78f8c9 100644
--- a/board/engicam/icorem6/icorem6.c
+++ b/board/engicam/icorem6/icorem6.c
@@ -205,6 +205,25 @@ int board_early_init_f(void)
return 0;
}
+int board_late_init(void)
+{
+ switch ((imx6_src_get_boot_mode() & IMX6_BMODE_MASK) >>
+ IMX6_BMODE_SHIFT) {
+ case IMX6_BMODE_SD:
+ case IMX6_BMODE_ESD:
+ setenv("modeboot", "mmcboot");
+ break;
+ case IMX6_BMODE_NAND:
+ setenv("modeboot", "nandboot");
+ break;
+ default:
+ setenv("modeboot", "");
+ break;
+ }
+
+ return 0;
+}
+
int board_init(void)
{
/* Address of boot parameters */
diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h
index 5a28b15..b517e87 100644
--- a/include/configs/imx6qdl_icore.h
+++ b/include/configs/imx6qdl_icore.h
@@ -64,7 +64,7 @@
"fitboot=echo Booting FIT image from mmc ...; " \
"run mmcargs; " \
"bootm ${loadaddr}\0" \
- "mmcboot=echo Booting from mmc ...; " \
+ "_mmcboot=run mmcargs; " \
"run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
@@ -79,6 +79,20 @@
"else " \
"bootm; " \
"fi\0" \
+ "mmcboot=echo Booting from mmc ...; " \
+ "if mmc rescan; then " \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
+ "if run loadfit; then " \
+ "run fitboot; " \
+ "else " \
+ "if run loadimage; then " \
+ "run _mmcboot; " \
+ "fi; " \
+ "fi; " \
+ "fi; " \
+ "fi\0" \
"nandboot=echo Booting from nand ...; " \
"if mtdparts; then " \
"echo Starting nand boot ...; " \
@@ -90,25 +104,7 @@
"nand read ${fdt_addr} dtb 0x100000; " \
"bootm ${loadaddr} - ${fdt_addr}\0"
-#ifdef CONFIG_NAND_MXS
-# define CONFIG_BOOTCOMMAND "run nandboot"
-#else
-# define CONFIG_BOOTCOMMAND \
- "mmc dev ${mmcdev};" \
- "if mmc rescan; then " \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loadfit; then " \
- "run fitboot; " \
- "else " \
- "if run loadimage; then " \
- "run mmcboot; " \
- "fi; " \
- "fi; " \
- "fi; " \
- "fi"
-#endif
+#define CONFIG_BOOTCOMMAND "run $modeboot"
/* Miscellaneous configurable options */
#define CONFIG_SYS_MEMTEST_START 0x80000000
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/5] i.MX6Q: icorem6: Add mmc_late_init
2017-03-27 18:02 [U-Boot] [PATCH 1/5] i.MX6Q: icorem6: Add modeboot env via board_late_init Jagan Teki
@ 2017-03-27 18:02 ` Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 3/5] i.MX6UL: geam6ul: Add modeboot env via board_late_init Jagan Teki
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Jagan Teki @ 2017-03-27 18:02 UTC (permalink / raw)
To: u-boot
From: Jagan Teki <jagan@amarulasolutions.com>
Let the runtime code can set the mmcdev and mmcroot based
on the devno using mmc_get_env_dev instead of defining
separately in build-time configs using mmc_late_init func.
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/icorem6.c | 22 ++++++++++++++++++++++
include/configs/imx6qdl_icore.h | 2 --
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/board/engicam/icorem6/icorem6.c b/board/engicam/icorem6/icorem6.c
index f78f8c9..55fc77f 100644
--- a/board/engicam/icorem6/icorem6.c
+++ b/board/engicam/icorem6/icorem6.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <mmc.h>
#include <asm/io.h>
#include <asm/gpio.h>
@@ -205,12 +206,33 @@ int board_early_init_f(void)
return 0;
}
+#ifdef CONFIG_ENV_IS_IN_MMC
+static void mmc_late_init(void)
+{
+ char cmd[32];
+ char mmcblk[32];
+ u32 dev_no = mmc_get_env_dev();
+
+ setenv_ulong("mmcdev", dev_no);
+
+ /* Set mmcblk env */
+ sprintf(mmcblk, "/dev/mmcblk%dp2 rootwait rw", dev_no);
+ setenv("mmcroot", mmcblk);
+
+ sprintf(cmd, "mmc dev %d", dev_no);
+ run_command(cmd, 0);
+}
+#endif
+
int board_late_init(void)
{
switch ((imx6_src_get_boot_mode() & IMX6_BMODE_MASK) >>
IMX6_BMODE_SHIFT) {
case IMX6_BMODE_SD:
case IMX6_BMODE_ESD:
+#ifdef CONFIG_ENV_IS_IN_MMC
+ mmc_late_init();
+#endif
setenv("modeboot", "mmcboot");
break;
case IMX6_BMODE_NAND:
diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h
index b517e87..4bdba57 100644
--- a/include/configs/imx6qdl_icore.h
+++ b/include/configs/imx6qdl_icore.h
@@ -45,9 +45,7 @@
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
"fdt_addr=0x18000000\0" \
"boot_fdt=try\0" \
- "mmcdev=0\0" \
"mmcpart=1\0" \
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
"nandroot=ubi0:rootfs rootfstype=ubifs\0" \
"mmcautodetect=yes\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 3/5] i.MX6UL: geam6ul: Add modeboot env via board_late_init
2017-03-27 18:02 [U-Boot] [PATCH 1/5] i.MX6Q: icorem6: Add modeboot env via board_late_init Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 2/5] i.MX6Q: icorem6: Add mmc_late_init Jagan Teki
@ 2017-03-27 18:02 ` Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 4/5] i.MX6UL: geam6ul: Add mmc_late_init Jagan Teki
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Jagan Teki @ 2017-03-27 18:02 UTC (permalink / raw)
To: u-boot
From: Jagan Teki <jagan@amarulasolutions.com>
Add runtime, modeboot env which is setting mmcboot, or
nandboot based on the bootdevice so-that conditional
macros b/w MMC and NAND for CONFIG_BOOTCOMMAND should
be avoided in config files.
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
arch/arm/cpu/armv7/mx6/Kconfig | 1 +
board/engicam/geam6ul/geam6ul.c | 19 +++++++++++++++++++
include/configs/imx6ul_geam.h | 35 ++++++++++++++++-------------------
3 files changed, 36 insertions(+), 19 deletions(-)
diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index 37f271b..3170442 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -244,6 +244,7 @@ config TARGET_MX6UL_14X14_EVK
config TARGET_MX6UL_GEAM
bool "Support Engicam GEAM6UL"
+ select BOARD_LATE_INIT
select MX6UL
select OF_CONTROL
select DM
diff --git a/board/engicam/geam6ul/geam6ul.c b/board/engicam/geam6ul/geam6ul.c
index 40f20a9..29a4830 100644
--- a/board/engicam/geam6ul/geam6ul.c
+++ b/board/engicam/geam6ul/geam6ul.c
@@ -103,6 +103,25 @@ static void setup_gpmi_nand(void)
}
#endif /* CONFIG_NAND_MXS */
+int board_late_init(void)
+{
+ switch ((imx6_src_get_boot_mode() & IMX6_BMODE_MASK) >>
+ IMX6_BMODE_SHIFT) {
+ case IMX6_BMODE_SD:
+ case IMX6_BMODE_ESD:
+ setenv("modeboot", "mmcboot");
+ break;
+ case IMX6_BMODE_NAND:
+ setenv("modeboot", "nandboot");
+ break;
+ default:
+ setenv("modeboot", "");
+ break;
+ }
+
+ return 0;
+}
+
int board_init(void)
{
/* Address of boot parameters */
diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h
index 8bffacd..e9a1a06 100644
--- a/include/configs/imx6ul_geam.h
+++ b/include/configs/imx6ul_geam.h
@@ -63,7 +63,7 @@
"fitboot=echo Booting FIT image from mmc ...; " \
"run mmcargs; " \
"bootm ${loadaddr}\0" \
- "mmcboot=echo Booting from mmc ...; " \
+ "_mmcboot=run mmcargs; " \
"run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
@@ -78,6 +78,20 @@
"else " \
"bootm; " \
"fi\0" \
+ "mmcboot=echo Booting from mmc ...; " \
+ "if mmc rescan; then " \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
+ "if run loadfit; then " \
+ "run fitboot; " \
+ "else " \
+ "if run loadimage; then " \
+ "run _mmcboot; " \
+ "fi; " \
+ "fi; " \
+ "fi; " \
+ "fi\0" \
"nandboot=echo Booting from nand ...; " \
"if mtdparts; then " \
"echo Starting nand boot ...; " \
@@ -89,24 +103,7 @@
"nand read ${fdt_addr} dtb 0x100000; " \
"bootm ${loadaddr} - ${fdt_addr}\0"
-#ifdef CONFIG_NAND_MXS
-# define CONFIG_BOOTCOMMAND "run nandboot"
-#else
-# define CONFIG_BOOTCOMMAND \
- "if mmc rescan; then " \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loadfit; then " \
- "run fitboot; " \
- "else " \
- "if run loadimage; then " \
- "run mmcboot; " \
- "fi; " \
- "fi; " \
- "fi; " \
- "fi"
-#endif
+#define CONFIG_BOOTCOMMAND "run $modeboot"
/* Miscellaneous configurable options */
#define CONFIG_SYS_MEMTEST_START 0x80000000
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 4/5] i.MX6UL: geam6ul: Add mmc_late_init
2017-03-27 18:02 [U-Boot] [PATCH 1/5] i.MX6Q: icorem6: Add modeboot env via board_late_init Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 2/5] i.MX6Q: icorem6: Add mmc_late_init Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 3/5] i.MX6UL: geam6ul: Add modeboot env via board_late_init Jagan Teki
@ 2017-03-27 18:02 ` Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 5/5] MAINTAINERS: Fix ARM FREESCALE IMX files Jagan Teki
[not found] ` <CAD6G_RQ-wA0OUg2N2WEQ0NkAZFP9e8D7jdA8hnGOjJgrBxDnZg@mail.gmail.com>
4 siblings, 0 replies; 7+ messages in thread
From: Jagan Teki @ 2017-03-27 18:02 UTC (permalink / raw)
To: u-boot
From: Jagan Teki <jagan@amarulasolutions.com>
Let the runtime code can set the mmcdev and mmcroot based
on the devno using mmc_get_env_dev instead of defining
separately in build-time configs using mmc_late_init func.
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
board/engicam/geam6ul/geam6ul.c | 22 ++++++++++++++++++++++
include/configs/imx6ul_geam.h | 2 --
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/board/engicam/geam6ul/geam6ul.c b/board/engicam/geam6ul/geam6ul.c
index 29a4830..3593719 100644
--- a/board/engicam/geam6ul/geam6ul.c
+++ b/board/engicam/geam6ul/geam6ul.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <mmc.h>
#include <asm/io.h>
#include <asm/gpio.h>
@@ -103,12 +104,33 @@ static void setup_gpmi_nand(void)
}
#endif /* CONFIG_NAND_MXS */
+#ifdef CONFIG_ENV_IS_IN_MMC
+static void mmc_late_init(void)
+{
+ char cmd[32];
+ char mmcblk[32];
+ u32 dev_no = mmc_get_env_dev();
+
+ setenv_ulong("mmcdev", dev_no);
+
+ /* Set mmcblk env */
+ sprintf(mmcblk, "/dev/mmcblk%dp2 rootwait rw", dev_no);
+ setenv("mmcroot", mmcblk);
+
+ sprintf(cmd, "mmc dev %d", dev_no);
+ run_command(cmd, 0);
+}
+#endif
+
int board_late_init(void)
{
switch ((imx6_src_get_boot_mode() & IMX6_BMODE_MASK) >>
IMX6_BMODE_SHIFT) {
case IMX6_BMODE_SD:
case IMX6_BMODE_ESD:
+#ifdef CONFIG_ENV_IS_IN_MMC
+ mmc_late_init();
+#endif
setenv("modeboot", "mmcboot");
break;
case IMX6_BMODE_NAND:
diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h
index e9a1a06..d331744 100644
--- a/include/configs/imx6ul_geam.h
+++ b/include/configs/imx6ul_geam.h
@@ -44,9 +44,7 @@
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
"fdt_addr=0x87800000\0" \
"boot_fdt=try\0" \
- "mmcdev=0\0" \
"mmcpart=1\0" \
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
"nandroot=ubi0:rootfs rootfstype=ubifs\0" \
"mmcautodetect=yes\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 5/5] MAINTAINERS: Fix ARM FREESCALE IMX files
2017-03-27 18:02 [U-Boot] [PATCH 1/5] i.MX6Q: icorem6: Add modeboot env via board_late_init Jagan Teki
` (2 preceding siblings ...)
2017-03-27 18:02 ` [U-Boot] [PATCH 4/5] i.MX6UL: geam6ul: Add mmc_late_init Jagan Teki
@ 2017-03-27 18:02 ` Jagan Teki
2017-04-12 15:52 ` Stefano Babic
[not found] ` <CAD6G_RQ-wA0OUg2N2WEQ0NkAZFP9e8D7jdA8hnGOjJgrBxDnZg@mail.gmail.com>
4 siblings, 1 reply; 7+ messages in thread
From: Jagan Teki @ 2017-03-27 18:02 UTC (permalink / raw)
To: u-boot
From: Jagan Teki <jagan@amarulasolutions.com>
- Remove arch/arm/cpu/arm926ejs/imx/ which is not available
- arch/arm/cpu/imx-common/ => arch/arm/imx-common/
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
MAINTAINERS | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 19c0eed..c60cd2a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -93,10 +93,9 @@ S: Maintained
T: git git://git.denx.de/u-boot-imx.git
F: arch/arm/cpu/arm1136/mx*/
F: arch/arm/cpu/arm926ejs/mx*/
-F: arch/arm/cpu/arm926ejs/imx/
F: arch/arm/cpu/armv7/mx*/
F: arch/arm/cpu/armv7/vf610/
-F: arch/arm/cpu/imx-common/
+F: arch/arm/imx-common/
F: arch/arm/include/asm/arch-imx/
F: arch/arm/include/asm/arch-mx*/
F: arch/arm/include/asm/arch-vf610/
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 5/5] MAINTAINERS: Fix ARM FREESCALE IMX files
2017-03-27 18:02 ` [U-Boot] [PATCH 5/5] MAINTAINERS: Fix ARM FREESCALE IMX files Jagan Teki
@ 2017-04-12 15:52 ` Stefano Babic
0 siblings, 0 replies; 7+ messages in thread
From: Stefano Babic @ 2017-04-12 15:52 UTC (permalink / raw)
To: u-boot
On 27/03/2017 20:02, Jagan Teki wrote:
> From: Jagan Teki <jagan@amarulasolutions.com>
>
> - Remove arch/arm/cpu/arm926ejs/imx/ which is not available
> - arch/arm/cpu/imx-common/ => arch/arm/imx-common/
>
> Cc: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> MAINTAINERS | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 19c0eed..c60cd2a 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -93,10 +93,9 @@ S: Maintained
> T: git git://git.denx.de/u-boot-imx.git
> F: arch/arm/cpu/arm1136/mx*/
> F: arch/arm/cpu/arm926ejs/mx*/
> -F: arch/arm/cpu/arm926ejs/imx/
> F: arch/arm/cpu/armv7/mx*/
> F: arch/arm/cpu/armv7/vf610/
> -F: arch/arm/cpu/imx-common/
> +F: arch/arm/imx-common/
> F: arch/arm/include/asm/arch-imx/
> F: arch/arm/include/asm/arch-mx*/
> F: arch/arm/include/asm/arch-vf610/
>
Applied to u-boot-imx, thanks!
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/5] i.MX6Q: icorem6: Add modeboot env via board_late_init
[not found] ` <CAD6G_RStc9x5g5MUrbYiZCngnGLYZhJkhO0t4g=QcJ6yZBWGWg@mail.gmail.com>
@ 2017-04-25 18:34 ` Jagan Teki
0 siblings, 0 replies; 7+ messages in thread
From: Jagan Teki @ 2017-04-25 18:34 UTC (permalink / raw)
To: u-boot
Hi Stefano,
On Mon, Apr 17, 2017 at 9:18 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> On Wed, Apr 12, 2017 at 9:27 PM, Stefano Babic <sbabic@denx.de> wrote:
>> On 07/04/2017 19:50, Jagan Teki wrote:
>>> Hi Stefano,
>>>
>>> On Mon, Mar 27, 2017 at 11:32 PM, Jagan Teki <jagan@openedev.com> wrote:
>>>> From: Jagan Teki <jagan@amarulasolutions.com>
>>>>
>>>> Add runtime, modeboot env which is setting mmcboot, or
>>>> nandboot based on the bootdevice so-that conditional
>>>> macros b/w MMC and NAND for CONFIG_BOOTCOMMAND should
>>>> be avoided in config files.
>>>>
>>>> Cc: Matteo Lisi <matteo.lisi@engicam.com>
>>>> Cc: Michael Trimarchi <michael@amarulasolutions.com>
>>>> Cc: Stefano Babic <sbabic@denx.de>
>>>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>>
>>> Can you take this series?
>>>
>>
>> I could take, but I am just asking if you do not find another way to
>> avoid code duplication. You have very similar boards, and code is simply
>> duplicated. Let's see Pathch 1/5 and Patch 3/5:
>>
>>
>> +int board_late_init(void)
>> +{
>> + switch ((imx6_src_get_boot_mode() & IMX6_BMODE_MASK) >>
>> + IMX6_BMODE_SHIFT) {
>> + case IMX6_BMODE_SD:
>> + case IMX6_BMODE_ESD:
>> + setenv("modeboot", "mmcboot");
>> + break;
>> + case IMX6_BMODE_NAND:
>> + setenv("modeboot", "nandboot");
>> + break;
>> + default:
>> + setenv("modeboot", "");
>> + break;
>> + }
>> +
>> + return 0;
>> +}
>>
>> And patch 3/5:
>>
>> +int board_late_init(void)
>> +{
>> + switch ((imx6_src_get_boot_mode() & IMX6_BMODE_MASK) >>
>> + IMX6_BMODE_SHIFT) {
>> + case IMX6_BMODE_SD:
>> + case IMX6_BMODE_ESD:
>> + setenv("modeboot", "mmcboot");
>> + break;
>> + case IMX6_BMODE_NAND:
>> + setenv("modeboot", "nandboot");
>> + break;
>> + default:
>> + setenv("modeboot", "");
>> + break;
>> + }
>> +
>> + return 0;
>> +}
>> +
>>
>>
>> Why do you not use the same factorization as for Freescale's boards ? A
>> board/engicam/common could contain shared code, and you reuse it among
>> boards. The same for the default environment: it is duplicated again.
>
> Yes, I understand completely. will factorized the code in coming MW.
Any help?
thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-04-25 18:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 18:02 [U-Boot] [PATCH 1/5] i.MX6Q: icorem6: Add modeboot env via board_late_init Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 2/5] i.MX6Q: icorem6: Add mmc_late_init Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 3/5] i.MX6UL: geam6ul: Add modeboot env via board_late_init Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 4/5] i.MX6UL: geam6ul: Add mmc_late_init Jagan Teki
2017-03-27 18:02 ` [U-Boot] [PATCH 5/5] MAINTAINERS: Fix ARM FREESCALE IMX files Jagan Teki
2017-04-12 15:52 ` Stefano Babic
[not found] ` <CAD6G_RQ-wA0OUg2N2WEQ0NkAZFP9e8D7jdA8hnGOjJgrBxDnZg@mail.gmail.com>
[not found] ` <555d45ec-3d67-743c-f81c-14cc836e5fac@denx.de>
[not found] ` <CAD6G_RStc9x5g5MUrbYiZCngnGLYZhJkhO0t4g=QcJ6yZBWGWg@mail.gmail.com>
2017-04-25 18:34 ` [U-Boot] [PATCH 1/5] i.MX6Q: icorem6: Add modeboot env via board_late_init Jagan Teki
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.