From: Stefan Eichenberger <eichest@gmail.com>
To: sbabic@denx.de, festevam@gmail.com, uboot-imx@nxp.com,
trini@konsulko.com, francesco.dolcini@toradex.com,
stefan.eichenberger@toradex.com, peng.fan@nxp.com,
emanuele.ghidoli@toradex.com, joao.goncalves@toradex.com,
vitor.soares@toradex.com, igor.opaniuk@foundries.io
Cc: u-boot@lists.denx.de
Subject: [PATCH v1 4/5] toradex: apalis-imx8: simplify module version handling
Date: Wed, 11 Dec 2024 13:18:54 +0100 [thread overview]
Message-ID: <20241211122036.103383-5-eichest@gmail.com> (raw)
In-Reply-To: <20241211122036.103383-1-eichest@gmail.com>
From: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Simplify module version handling by removing the special case for the
Apalis iMX8QM.
The Apalis iMX8QM has been treated as a special case in module version
handling, but was always the default. By removing this special handling,
the code is simplified and easier to maintain.
We will not print the message "Unknown Apalis iMX8 module" anymore.
However, we still handle this because if the config block is missing we
show "MISSING TORADEX CONFIG BLOCK" and if the serial number is unknown
we show "Model: Toradex 0000 UNKNOWN MODULE V1.1A". Therefore, it is
still possible to detect such issues.
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
---
board/toradex/apalis-imx8/apalis-imx8.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index 1dc9483f022..a8c38208693 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -243,20 +243,12 @@ static enum pcb_rev_t get_pcb_revision(void)
static void select_dt_from_module_version(void)
{
- env_set("soc", "imx8qm");
- env_set("variant", "-v1.1");
+ if (get_pcb_revision() == PCB_VERSION_1_0)
+ env_set("variant", "");
+ else
+ env_set("variant", "-v1.1");
switch (tdx_hw_tag.prodid) {
- /* Select Apalis iMX8QM device trees */
- case APALIS_IMX8QM_IT:
- case APALIS_IMX8QM_WIFI_BT_IT:
- case APALIS_IMX8QM_8GB_WIFI_BT_IT:
- case APALIS_IMX8QM_IT_1300MHZ:
- case APALIS_IMX8QM_WIFI_BT_IT_1300MHZ:
- case APALIS_IMX8QM_8GB_WIFI_BT_IT_1300MHZ:
- if (get_pcb_revision() == PCB_VERSION_1_0)
- env_set("variant", "");
- break;
/* Select Apalis iMX8QP device trees */
case APALIS_IMX8QP_WIFI_BT:
case APALIS_IMX8QP:
@@ -265,8 +257,8 @@ static void select_dt_from_module_version(void)
env_set("soc", "imx8qp");
break;
default:
- printf("Unknown Apalis iMX8 module\n");
- return;
+ env_set("soc", "imx8qm");
+ break;
}
}
--
2.45.2
next prev parent reply other threads:[~2024-12-11 12:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 12:18 [PATCH v1 0/5] add support for Apalis iMX8 1300MHz version Stefan Eichenberger
2024-12-11 12:18 ` [PATCH v1 1/5] toradex: tdx-cfg-block: set apalis imx8dxp to always disabled Stefan Eichenberger
2024-12-11 12:18 ` [PATCH v1 2/5] toradex: tdx-cfg-block: increase indentation for longer defines Stefan Eichenberger
2024-12-11 12:18 ` [PATCH v1 3/5] toradex: tdx-cfg-block: add new apalis imx8 pids Stefan Eichenberger
2024-12-11 12:18 ` Stefan Eichenberger [this message]
2024-12-11 12:18 ` [PATCH v1 5/5] imx: mach: imx8: fdt: set correct frequencies for the industrial SoC Stefan Eichenberger
2024-12-11 17:39 ` [PATCH v1 0/5] add support for Apalis iMX8 1300MHz version Francesco Dolcini
2024-12-17 10:55 ` Fabio Estevam
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=20241211122036.103383-5-eichest@gmail.com \
--to=eichest@gmail.com \
--cc=emanuele.ghidoli@toradex.com \
--cc=festevam@gmail.com \
--cc=francesco.dolcini@toradex.com \
--cc=igor.opaniuk@foundries.io \
--cc=joao.goncalves@toradex.com \
--cc=peng.fan@nxp.com \
--cc=sbabic@denx.de \
--cc=stefan.eichenberger@toradex.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=vitor.soares@toradex.com \
/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.