From: Oleksij Rempel <o.rempel@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [PATCH v1 1/4] ARM: boards: protonic-imx6: enable deep-probe support
Date: Wed, 25 Aug 2021 14:54:27 +0200 [thread overview]
Message-ID: <20210825125430.26901-2-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20210825125430.26901-1-o.rempel@pengutronix.de>
Enable deep-probe support and fix gpio dependency for the early probe.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
arch/arm/boards/protonic-imx6/board.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/boards/protonic-imx6/board.c b/arch/arm/boards/protonic-imx6/board.c
index 9ded94b3b0..81e09a8d8b 100644
--- a/arch/arm/boards/protonic-imx6/board.c
+++ b/arch/arm/boards/protonic-imx6/board.c
@@ -5,6 +5,7 @@
#include <bbu.h>
#include <common.h>
+#include <deep-probe.h>
#include <environment.h>
#include <fcntl.h>
#include <gpio.h>
@@ -707,8 +708,17 @@ static int prt_imx6_get_id(struct prt_imx6_priv *priv)
{
struct gpio gpios_type[] = GPIO_HW_TYPE_ID;
struct gpio gpios_rev[] = GPIO_HW_REV_ID;
+ struct device_node *gpio_np = NULL;
int ret;
+ gpio_np = of_find_node_by_name(NULL, "gpio@20a0000");
+ if (!gpio_np)
+ return -ENODEV;
+
+ ret = of_device_ensure_probed(gpio_np);
+ if (ret)
+ return ret;
+
ret = gpio_array_to_id(gpios_type, ARRAY_SIZE(gpios_type), &priv->hw_id);
if (ret)
goto exit_get_id;
@@ -1071,6 +1081,7 @@ static const struct of_device_id prt_imx6_of_match[] = {
{ .compatible = "prt,prtwd3", .data = &prt_imx6_cfg_prtwd3 },
{ /* sentinel */ },
};
+BAREBOX_DEEP_PROBE_ENABLE(prt_imx6_of_match);
static struct driver_d prt_imx6_board_driver = {
.name = "board-protonic-imx6",
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-08-25 12:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-25 12:54 [PATCH v1 0/6] protonic: maintaining and new board Oleksij Rempel
2021-08-25 12:54 ` Oleksij Rempel [this message]
2021-08-25 12:54 ` [PATCH v1 2/4] ARM: boards: protonic-imx6: use decode error values instead error numbers Oleksij Rempel
2021-08-25 12:54 ` [PATCH v1 3/4] ARM: boards: protonic-imx6: Skip usb check on prtvt7 by default Oleksij Rempel
2021-08-25 12:54 ` [PATCH v1 4/4] ARM: boards: protonic-imx6: Add support for jozacp board Oleksij Rempel
2021-10-04 11:52 ` [PATCH v1 0/6] protonic: maintaining and new board Sascha Hauer
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=20210825125430.26901-2-o.rempel@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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