public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Schultz <d.schultz@phytec.de>
To: <w.egorov@phytec.de>, <trini@konsulko.com>, <u-boot@lists.denx.de>
Cc: <d-gole@ti.com>, <upstream@lists.phytec.de>,
	Daniel Schultz <d.schultz@phytec.de>
Subject: [PATCH v2 2/2] board: phytec: common: k3: Expose product infos to Linux
Date: Wed, 15 Jan 2025 02:35:02 -0800	[thread overview]
Message-ID: <20250115103502.844304-2-d.schultz@phytec.de> (raw)
In-Reply-To: <20250115103502.844304-1-d.schultz@phytec.de>

Call 'phytec_ft_board_fixup' in the common K3 board code
to expose the product name and part number to Linux.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
---

Changes in v2:
 * Removed 'return 0' right before leaving with the same return code anyways.
 * Added Wadim's Reviewed-by.

 board/phytec/common/k3/board.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/board/phytec/common/k3/board.c b/board/phytec/common/k3/board.c
index 9ff861cd3f4..3f70dcddf45 100644
--- a/board/phytec/common/k3/board.c
+++ b/board/phytec/common/k3/board.c
@@ -252,9 +252,21 @@ fixup_error:
 
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
+	struct phytec_eeprom_data data;
+	int ret;
+
 	fdt_apply_som_overlays(blob);
 	fdt_copy_fixed_partitions(blob);
 
+	ret = phytec_eeprom_data_setup(&data, 0, EEPROM_ADDR);
+	if (ret || !data.valid)
+		return 0;
+
+	ret = phytec_ft_board_fixup(&data, blob);
+	if (ret)
+		pr_err("%s: Failed to add PHYTEC information to fdt.\n",
+		       __func__);
+
 	return 0;
 }
 #endif
-- 
2.25.1


  reply	other threads:[~2025-01-15 10:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15 10:35 [PATCH v2 1/2] board: phytec: common: Add product information to FTD Daniel Schultz
2025-01-15 10:35 ` Daniel Schultz [this message]
2025-01-16  8:06 ` [Upstream] " Yannic Moog
2025-01-23 14:41   ` Daniel Schultz
2025-01-28 10:40     ` Yannic Moog

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=20250115103502.844304-2-d.schultz@phytec.de \
    --to=d.schultz@phytec.de \
    --cc=d-gole@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=upstream@lists.phytec.de \
    --cc=w.egorov@phytec.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