mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [PATCH v4 6/8] ARM: boards: skov-imx6: start using deep-probe
Date: Wed,  6 Oct 2021 10:43:21 +0200	[thread overview]
Message-ID: <20211006084323.14051-7-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20211006084323.14051-1-o.rempel@pengutronix.de>

Port Skov boards to the deep-propbe and reduce boot time by 100msec.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 arch/arm/boards/skov-imx6/board.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boards/skov-imx6/board.c b/arch/arm/boards/skov-imx6/board.c
index c09a2cd898..b91033afc1 100644
--- a/arch/arm/boards/skov-imx6/board.c
+++ b/arch/arm/boards/skov-imx6/board.c
@@ -2,16 +2,17 @@
 
 #define pr_fmt(fmt) "skov-imx6: " fmt
 
+#include <bootsource.h>
 #include <common.h>
-#include <init.h>
-#include <mach/bbu.h>
+#include <deep-probe.h>
 #include <environment.h>
-#include <bootsource.h>
 #include <globalvar.h>
-#include <net.h>
-#include <of_gpio.h>
 #include <gpio.h>
+#include <init.h>
 #include <linux/micrel_phy.h>
+#include <mach/bbu.h>
+#include <net.h>
+#include <of_gpio.h>
 
 #include "version.h"
 
@@ -489,10 +490,20 @@ static int skov_imx6_fixup(struct device_node *root, void *unused)
  */
 static void skov_init_board(const struct board_description *variant)
 {
+	struct device_node *gpio_np = NULL;
 	struct device_node *np;
 	char *environment_path, *envdev;
 	int ret;
 
+	gpio_np = of_find_node_by_name(NULL, "gpio@20b4000");
+	if (gpio_np) {
+		ret = of_device_ensure_probed(gpio_np);
+		if (ret)
+			pr_warn("Can't probe GPIO node\n");
+	} else {
+		pr_warn("Can't get GPIO node\n");
+	}
+
 	imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0.barebox",
 		BBU_HANDLER_FLAG_DEFAULT);
 
@@ -650,6 +661,7 @@ static __maybe_unused struct of_device_id skov_version_ids[] = {
 		/* sentinel */
 	}
 };
+BAREBOX_DEEP_PROBE_ENABLE(skov_version_ids);
 
 static struct driver_d skov_version_driver = {
 	.name = "skov-imx6",
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  parent reply	other threads:[~2021-10-06  8:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06  8:43 [PATCH v4 0/8] add noswitch support for skov boards Oleksij Rempel
2021-10-06  8:43 ` [PATCH v4 1/8] ARM: dts: skov-imx6: add USB nodes Oleksij Rempel
2021-10-06  8:43 ` [PATCH v4 2/8] ARM: boards: skov-imx6: fixup_machine_compatible() add optional root node Oleksij Rempel
2021-10-06  8:43 ` [PATCH v4 3/8] ARM: boards: skov-imx6: add switch detection Oleksij Rempel
2021-10-06  8:43 ` [PATCH v4 4/8] ARM: boards: skov-imx6: disable eth0 for barebox if no switch is detected Oleksij Rempel
2021-10-06  8:43 ` [PATCH v4 5/8] ARM: boards: skov-imx6: fixup different DTS variants Oleksij Rempel
2021-10-06  8:43 ` Oleksij Rempel [this message]
2021-10-06  8:43 ` [PATCH v4 7/8] ARM: boards: skov-imx6: add defaultenv with eth1-discover script Oleksij Rempel
2021-10-06  8:43 ` [PATCH v4 8/8] ARM: boards: skov-imx6: use separate DTS for the iMX6 Solo variant Oleksij Rempel
2021-10-11  9:36 ` [PATCH v4 0/8] add noswitch support for skov boards 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=20211006084323.14051-7-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