diff options
author | Jagan Teki | 2017-02-24 15:45:24 +0530 |
---|---|---|
committer | Stefano Babic | 2017-03-17 09:27:08 +0100 |
commit | 8c998a85a3df9cabf9701835b82ccbbfcdf9ee36 (patch) | |
tree | 76ed1a123a57629f9e8166db54b1578df89aaa88 /board | |
parent | ffa11c33811b610a6ad2b029debc1159a52805de (diff) |
i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
Add runtime, modeboot env which is setting mmcboot based
on the bootdevice so-that conditional macros for MMC via
CONFIG_BOOTCOMMAND should be avoided in config files.
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>
Diffstat (limited to 'board')
-rw-r--r-- | board/engicam/icorem6_rqs/icorem6_rqs.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c index 175bda58605..cc7f897f632 100644 --- a/board/engicam/icorem6_rqs/icorem6_rqs.c +++ b/board/engicam/icorem6_rqs/icorem6_rqs.c @@ -45,6 +45,24 @@ int board_init(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: + case IMX6_BMODE_MMC: + case IMX6_BMODE_EMMC: + setenv("modeboot", "mmcboot"); + break; + default: + setenv("modeboot", ""); + break; + } + + return 0; +} + int dram_init(void) { gd->ram_size = imx_ddr_size(); |