All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Protsenko <semen.protsenko@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] env: ti: boot: Get rid of magic numbers
Date: Mon, 26 Feb 2018 23:18:01 +0200	[thread overview]
Message-ID: <20180226211801.16060-4-semen.protsenko@linaro.org> (raw)
In-Reply-To: <20180226211801.16060-1-semen.protsenko@linaro.org>

Get the start address and the size of partitions using partition names
rather than partition numbers. This way we can change the partition
table further without changing the boot code.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
 include/environment/ti/boot.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
index 0a2342061c..24b7783f88 100644
--- a/include/environment/ti/boot.h
+++ b/include/environment/ti/boot.h
@@ -40,15 +40,13 @@
 		"setenv eval_bootargs setenv bootargs $bootargs; " \
 		"run eval_bootargs; " \
 		"setenv mmcdev 1; " \
-		"setenv fdt_part 3; " \
-		"setenv boot_part 9; " \
 		"setenv machid fe6; " \
 		"mmc dev $mmcdev; " \
 		"mmc rescan; " \
-		"part start mmc ${mmcdev} ${fdt_part} fdt_start; " \
-		"part size mmc ${mmcdev} ${fdt_part} fdt_size; " \
-		"part start mmc ${mmcdev} ${boot_part} boot_start; " \
-		"part size mmc ${mmcdev} ${boot_part} boot_size; " \
+		"part start mmc ${mmcdev} environment fdt_start; " \
+		"part size mmc ${mmcdev} environment fdt_size; " \
+		"part start mmc ${mmcdev} boot boot_start; " \
+		"part size mmc ${mmcdev} boot boot_size; " \
 		"mmc read ${fdtaddr} ${fdt_start} ${fdt_size}; " \
 		"mmc read ${loadaddr} ${boot_start} ${boot_size}; " \
 		"bootm $loadaddr $loadaddr $fdtaddr;\0"
-- 
2.16.1

  parent reply	other threads:[~2018-02-26 21:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 21:17 [U-Boot] [PATCH 0/3] Provide partition names to commands in environment Sam Protsenko
2018-02-26 21:17 ` [U-Boot] [PATCH 1/3] cmd: part: Allow passing partition name to start and size Sam Protsenko
2018-02-28  9:25   ` Lukasz Majewski
2018-03-14 14:09   ` [U-Boot] [U-Boot, " Tom Rini
2018-02-26 21:18 ` [U-Boot] [PATCH 2/3] cmd: part: Extract common code to separate function Sam Protsenko
2018-02-28  9:25   ` Lukasz Majewski
2018-03-14 14:09   ` [U-Boot] [U-Boot, " Tom Rini
2018-02-26 21:18 ` Sam Protsenko [this message]
2018-03-14 14:09   ` [U-Boot] [U-Boot,3/3] env: ti: boot: Get rid of magic numbers 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=20180226211801.16060-4-semen.protsenko@linaro.org \
    --to=semen.protsenko@linaro.org \
    --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.