public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Stefan Roese <sr@denx.de>
Cc: u-boot@lists.denx.de, "Marek Behún" <marek.behun@nic.cz>
Subject: [PATCH 4/4] tools: kwbimage: Use IBR_HDR_* constants instead of raw numbers
Date: Wed, 11 Aug 2021 10:14:17 +0200	[thread overview]
Message-ID: <20210811081417.18010-4-pali@kernel.org> (raw)
In-Reply-To: <20210811081417.18010-1-pali@kernel.org>

There are already IBR_HDR_* constants for these numbers, so use them.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 tools/kwbimage.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index 5ac34ac5e9c8..c1269fb6633a 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -59,13 +59,13 @@ struct hash_v1 {
 };
 
 struct boot_mode boot_modes[] = {
-	{ 0x4D, "i2c"  },
-	{ 0x5A, "spi"  },
-	{ 0x8B, "nand" },
-	{ 0x78, "sata" },
-	{ 0x9C, "pex"  },
-	{ 0x69, "uart" },
-	{ 0xAE, "sdio" },
+	{ IBR_HDR_I2C_ID, "i2c"  },
+	{ IBR_HDR_SPI_ID, "spi"  },
+	{ IBR_HDR_NAND_ID, "nand" },
+	{ IBR_HDR_SATA_ID, "sata" },
+	{ IBR_HDR_PEX_ID, "pex"  },
+	{ IBR_HDR_UART_ID, "uart" },
+	{ IBR_HDR_SDIO_ID, "sdio" },
 	{},
 };
 
@@ -75,10 +75,10 @@ struct nand_ecc_mode {
 };
 
 struct nand_ecc_mode nand_ecc_modes[] = {
-	{ 0x00, "default" },
-	{ 0x01, "hamming" },
-	{ 0x02, "rs" },
-	{ 0x03, "disabled" },
+	{ IBR_HDR_ECC_DEFAULT, "default" },
+	{ IBR_HDR_ECC_FORCED_HAMMING, "hamming" },
+	{ IBR_HDR_ECC_FORCED_RS, "rs" },
+	{ IBR_HDR_ECC_DISABLED, "disabled" },
 	{},
 };
 
-- 
2.20.1


  parent reply	other threads:[~2021-08-11  8:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11  8:14 [PATCH 1/4] tools: kwbimage: Verify supported image version Pali Rohár
2021-08-11  8:14 ` [PATCH 2/4] tools: kwbimage: Verify size of v0 image header Pali Rohár
2021-08-11 14:18   ` Stefan Roese
2021-09-01  9:08   ` Stefan Roese
2021-08-11  8:14 ` [PATCH 3/4] tools: kwbimage: Verify size of image data Pali Rohár
2021-08-11 14:19   ` Stefan Roese
2021-09-01  9:08   ` Stefan Roese
2021-08-11  8:14 ` Pali Rohár [this message]
2021-08-11 14:19   ` [PATCH 4/4] tools: kwbimage: Use IBR_HDR_* constants instead of raw numbers Stefan Roese
2021-09-01  9:08   ` Stefan Roese
2021-08-11 14:18 ` [PATCH 1/4] tools: kwbimage: Verify supported image version Stefan Roese
2021-09-01  9:07 ` Stefan Roese

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=20210811081417.18010-4-pali@kernel.org \
    --to=pali@kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=sr@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox