From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] ti_armv7_common: env: Consolidate support for loading images from mmc
Date: Tue, 29 Nov 2016 11:57:59 +0530 [thread overview]
Message-ID: <20161129062804.8398-2-lokeshvutla@ti.com> (raw)
In-Reply-To: <20161129062804.8398-1-lokeshvutla@ti.com>
Support for loading images from mmc is duplicated in all TI platforms.
Add this information to DEFAULT_MMC_TI_ARGS so that it can be reused
in all TI platforms.
Reviewed-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
include/configs/am335x_evm.h | 25 -------------------------
include/configs/am43xx_evm.h | 14 --------------
include/configs/ti_armv7_common.h | 28 +++++++++++++++++++++++++++-
include/configs/ti_omap4_common.h | 8 --------
include/configs/ti_omap5_common.h | 15 ---------------
5 files changed, 27 insertions(+), 63 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 8fa8e39..7f5bee9 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -101,7 +101,6 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
DEFAULT_MMC_TI_ARGS \
- "boot_fdt=try\0" \
"bootpart=0:2\0" \
"bootdir=/boot\0" \
"bootfile=zImage\0" \
@@ -127,30 +126,6 @@
"root=${ramroot} " \
"rootfstype=${ramrootfstype}\0" \
"loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
- "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
- "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
- "mmcloados=run args_mmc; " \
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
- "if run loadfdt; then " \
- "bootz ${loadaddr} - ${fdtaddr}; " \
- "else " \
- "if test ${boot_fdt} = try; then " \
- "bootz; " \
- "else " \
- "echo WARN: Cannot load the DT; " \
- "fi; " \
- "fi; " \
- "else " \
- "bootz; " \
- "fi;\0" \
- "mmcboot=mmc dev ${mmcdev}; " \
- "if mmc rescan; then " \
- "echo SD/MMC found on device ${mmcdev};" \
- "run envboot; " \
- "if run loadimage; then " \
- "run mmcloados;" \
- "fi;" \
- "fi;\0" \
"spiboot=echo Booting from spi ...; " \
"run spiargs; " \
"sf probe ${spibusno}:0; " \
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 0a6c06a..abfa852 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -229,20 +229,6 @@
"root=${ramroot} " \
"rootfstype=${ramrootfstype}\0" \
"loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz\0" \
- "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
- "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
- "mmcboot=mmc dev ${mmcdev}; " \
- "setenv devnum ${mmcdev}; " \
- "setenv devtype mmc; " \
- "if mmc rescan; then " \
- "echo SD/MMC found on device ${devnum};" \
- "if run loadimage; then " \
- "run loadfdt; " \
- "echo Booting from mmc${mmcdev} ...; " \
- "run args_mmc; " \
- "bootz ${loadaddr} - ${fdtaddr}; " \
- "fi;" \
- "fi;\0" \
"usbboot=" \
"setenv devnum ${usbdev}; " \
"setenv devtype usb; " \
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 3e4d3fa..d720b2b 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -54,7 +54,8 @@
"ramdisk_addr_r=0x88080000\0" \
"scriptaddr=0x80000000\0" \
"pxefile_addr_r=0x80100000\0" \
- "bootm_size=0x10000000\0"
+ "bootm_size=0x10000000\0" \
+ "boot_fdt=try\0"
#define DEFAULT_MMC_TI_ARGS \
"mmcdev=0\0" \
@@ -71,6 +72,8 @@
"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
"env import -t ${loadaddr} ${filesize}\0" \
"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
+ "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+ "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
"envboot=mmc dev ${mmcdev}; " \
"if mmc rescan; then " \
"echo SD/MMC found on device ${mmcdev};" \
@@ -87,6 +90,29 @@
"fi;" \
"fi;" \
"fi;\0" \
+ "mmcloados=run args_mmc; " \
+ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
+ "if run loadfdt; then " \
+ "bootz ${loadaddr} - ${fdtaddr}; " \
+ "else " \
+ "if test ${boot_fdt} = try; then " \
+ "bootz; " \
+ "else " \
+ "echo WARN: Cannot load the DT; " \
+ "fi; " \
+ "fi; " \
+ "else " \
+ "bootz; " \
+ "fi;\0" \
+ "mmcboot=mmc dev ${mmcdev}; " \
+ "setenv devnum ${mmcdev}; " \
+ "setenv devtype mmc; " \
+ "if mmc rescan; then " \
+ "echo SD/MMC found on device ${mmcdev};" \
+ "if run loadimage; then " \
+ "run mmcloados;" \
+ "fi;" \
+ "fi;\0" \
/*
* DDR information. If the CONFIG_NR_DRAM_BANKS is not defined,
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index aa17c09..ce9d3e8 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -114,14 +114,7 @@
"bootfile=zImage\0" \
"usbtty=cdc_acm\0" \
"vram=16M\0" \
- "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
"loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \
- "mmcboot=echo Booting from mmc${mmcdev} ...; " \
- "run args_mmc; " \
- "if run loadimage; then " \
- "run loadfdt; " \
- "bootz ${loadaddr} - ${fdtaddr}; " \
- "fi;\0" \
"uimageboot=echo Booting from mmc${mmcdev} ...; " \
"run args_mmc; " \
"bootm ${loadaddr}\0" \
@@ -138,7 +131,6 @@
"setenv fdtfile omap4-duovero-parlor.dtb; fi;" \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
- "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
BOOTENV
/*
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index 86e5464..90ead56 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -75,20 +75,6 @@
"partitions=" PARTS_DEFAULT "\0" \
"optargs=\0" \
"dofastboot=0\0" \
- "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
- "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
- "source ${loadaddr}\0" \
- "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
- "mmcboot=mmc dev ${mmcdev}; " \
- "if mmc rescan; then " \
- "echo SD/MMC found on device ${mmcdev};" \
- "if run loadimage; then " \
- "run loadfdt; " \
- "echo Booting from mmc${mmcdev} ...; " \
- "run args_mmc; " \
- "bootz ${loadaddr} - ${fdtaddr}; " \
- "fi;" \
- "fi;\0" \
"findfdt="\
"if test $board_name = omap5_uevm; then " \
"setenv fdtfile omap5-uevm.dtb; fi; " \
@@ -114,7 +100,6 @@
"setenv fdtfile am571x-idk.dtb; fi;" \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
- "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
DFUARGS \
NETARGS \
--
2.10.1
next prev parent reply other threads:[~2016-11-29 6:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 6:27 [U-Boot] [PATCH 0/5] ti_armv7_common: env: Add support for loading FIT images Lokesh Vutla
2016-11-29 6:27 ` Lokesh Vutla [this message]
2016-11-29 18:03 ` [U-Boot] [PATCH 1/5] ti_armv7_common: env: Consolidate support for loading images from mmc Tom Rini
2016-12-04 0:45 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 6:28 ` [U-Boot] [PATCH 2/5] ti_armv7_common: env: Add support for loading FIT images Lokesh Vutla
2016-11-29 18:03 ` Tom Rini
2016-12-04 0:45 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 6:28 ` [U-Boot] [PATCH 3/5] ARM: DRA7: Make FIT boot as default boot on HS devices Lokesh Vutla
2016-11-29 18:04 ` Tom Rini
2016-12-04 0:46 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 6:28 ` [U-Boot] [PATCH 4/5] ARM: AM57xx: " Lokesh Vutla
2016-11-29 18:04 ` Tom Rini
2016-12-04 0:47 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 6:28 ` [U-Boot] [PATCH 5/5] ARM: AMx3xx: " Lokesh Vutla
2016-11-29 18:04 ` Tom Rini
2016-12-04 0:48 ` [U-Boot] [U-Boot, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161129062804.8398-2-lokeshvutla@ti.com \
--to=lokeshvutla@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.