diff mbox series

[3/5] davinci: omapl138_lcdk: use environment variables for memory addresses

Message ID 20170406092257.15541-4-nsekhar@ti.com
State Accepted
Commit 6e8069616e43dc6d386e3793e6df422c109f1353
Headers show
Series davinci: omapl138_lcdk: align mmcboot with rest of TI boards | expand

Commit Message

Sekhar Nori April 6, 2017, 9:22 a.m. UTC
Use environment variables for various memory addresses
used on OMAP-L138 LCDK board. This makes it easy to
customize the boot process.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
 include/configs/omapl138_lcdk.h | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

Comments

Lukasz Majewski April 6, 2017, 9:59 a.m. UTC | #1
On Thu, 6 Apr 2017 14:52:55 +0530
Sekhar Nori <nsekhar@ti.com> wrote:

> Use environment variables for various memory addresses
> used on OMAP-L138 LCDK board. This makes it easy to
> customize the boot process.
> 
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> ---
>  include/configs/omapl138_lcdk.h | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/include/configs/omapl138_lcdk.h
> b/include/configs/omapl138_lcdk.h index f6aca0482527..599fd5b7a874
> 100644 --- a/include/configs/omapl138_lcdk.h
> +++ b/include/configs/omapl138_lcdk.h
> @@ -266,15 +266,21 @@
>  	"if mmc rescan; then " \
>  		"run mmcboot; "
>  	"fi"
> -#define CONFIG_EXTRA_ENV_SETTINGS \
> +
> +#define DEFAULT_LINUX_BOOT_ENV \
> +	"loadaddr=0xc0700000\0" \
>  	"fdtaddr=0xc0600000\0" \
> +	"scriptaddr=0xc0600000\0"
> +
> +#define CONFIG_EXTRA_ENV_SETTINGS \
> +	DEFAULT_LINUX_BOOT_ENV \
>  	"fdtfile=da850-lcdk.dtb\0" \
> -	"fdtboot=bootz 0xc0700000 - ${fdtaddr};\0" \
> +	"fdtboot=bootz ${loadaddr} - ${fdtaddr};\0" \
>  	"mmcboot=" \
> -		"if fatload mmc 0 0xc0600000 boot.scr; then " \
> -			"source 0xc0600000; " \
> +		"if fatload mmc 0 ${scriptaddr} boot.scr; then " \
> +			"source ${scriptaddr}; " \
>  		"else " \
> -			"fatload mmc 0 0xc0700000 " \
> +			"fatload mmc 0 ${loadaddr} " \
>  				__stringify(CONFIG_BOOTFILE) "; " \
>  			"fatload mmc 0 ${fdtaddr} ${fdtfile}; " \
>  			"run fdtboot; " \

Reviewed-by: Lukasz Majewski <lukma@denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Tom Rini April 6, 2017, 4:23 p.m. UTC | #2
On Thu, Apr 06, 2017 at 02:52:55PM +0530, Sekhar Nori wrote:

> Use environment variables for various memory addresses

> used on OMAP-L138 LCDK board. This makes it easy to

> customize the boot process.

> 

> Signed-off-by: Sekhar Nori <nsekhar@ti.com>


Reviewed-by: Tom Rini <trini@konsulko.com>


-- 
Tom
Tom Rini April 10, 2017, 6:24 p.m. UTC | #3
On Thu, Apr 06, 2017 at 02:52:55PM +0530, Sekhar Nori wrote:

> Use environment variables for various memory addresses

> used on OMAP-L138 LCDK board. This makes it easy to

> customize the boot process.

> 

> Signed-off-by: Sekhar Nori <nsekhar@ti.com>

> Reviewed-by: Lukasz Majewski <lukma@denx.de>

> Reviewed-by: Tom Rini <trini@konsulko.com>


Applied to u-boot/master, thanks!

-- 
Tom
diff mbox series

Patch

diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index f6aca0482527..599fd5b7a874 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -266,15 +266,21 @@ 
 	"if mmc rescan; then " \
 		"run mmcboot; "
 	"fi"
-#define CONFIG_EXTRA_ENV_SETTINGS \
+
+#define DEFAULT_LINUX_BOOT_ENV \
+	"loadaddr=0xc0700000\0" \
 	"fdtaddr=0xc0600000\0" \
+	"scriptaddr=0xc0600000\0"
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	DEFAULT_LINUX_BOOT_ENV \
 	"fdtfile=da850-lcdk.dtb\0" \
-	"fdtboot=bootz 0xc0700000 - ${fdtaddr};\0" \
+	"fdtboot=bootz ${loadaddr} - ${fdtaddr};\0" \
 	"mmcboot=" \
-		"if fatload mmc 0 0xc0600000 boot.scr; then " \
-			"source 0xc0600000; " \
+		"if fatload mmc 0 ${scriptaddr} boot.scr; then " \
+			"source ${scriptaddr}; " \
 		"else " \
-			"fatload mmc 0 0xc0700000 " \
+			"fatload mmc 0 ${loadaddr} " \
 				__stringify(CONFIG_BOOTFILE) "; " \
 			"fatload mmc 0 ${fdtaddr} ${fdtfile}; " \
 			"run fdtboot; " \