mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 6/7] sandbox: turn into deep probe platform
Date: Mon, 28 Jun 2021 08:45:16 +0200	[thread overview]
Message-ID: <20210628064517.28636-7-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20210628064517.28636-1-a.fatoum@pengutronix.de>

With previous commits sorting out the few remaining issues holding
sandbox back from using deep probe, we can now enable it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/sandbox/board/board.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/sandbox/board/board.c b/arch/sandbox/board/board.c
index 45b7c7deff5e..43e355afe89c 100644
--- a/arch/sandbox/board/board.c
+++ b/arch/sandbox/board/board.c
@@ -20,6 +20,7 @@
 #include <mach/linux.h>
 #include <init.h>
 #include <errno.h>
+#include <deep-probe.h>
 #include <fb.h>
 
 struct fb_videomode mode = {
@@ -44,7 +45,7 @@ static struct device_d devrandom_device = {
 	.name     = "devrandom",
 };
 
-static int devices_init(void)
+static int devices_init(struct device_d *dev)
 {
 	platform_device_register(&tap_device);
 
@@ -61,4 +62,15 @@ static int devices_init(void)
 	return 0;
 }
 
-device_initcall(devices_init);
+static struct of_device_id sandbox_dt_ids[] = {
+	{ .compatible = "barebox,sandbox" },
+	{ /* sentinel */ }
+};
+BAREBOX_DEEP_PROBE_ENABLE(sandbox_dt_ids);
+
+static struct driver_d sandbox_board_drv = {
+	.name  = "sandbox-board",
+	.of_compatible = sandbox_dt_ids,
+	.probe = devices_init,
+};
+device_platform_driver(sandbox_board_drv);
-- 
2.30.2


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


  parent reply	other threads:[~2021-06-28  6:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28  6:45 [PATCH 0/7] " Ahmad Fatoum
2021-06-28  6:45 ` [PATCH 1/7] sandbox: power: set $global.system.reset=POR on poweroff Ahmad Fatoum
2021-06-28  6:45 ` [PATCH 2/7] sandbox: fix probe order dependency between watchdog and power Ahmad Fatoum
2021-06-28  6:45 ` [PATCH 3/7] of: partition: implement of_partition_ensure_probed Ahmad Fatoum
2021-06-28  6:45 ` [PATCH 4/7] state: support deep probe Ahmad Fatoum
2021-06-28  6:45 ` [PATCH 5/7] nvmem: " Ahmad Fatoum
2021-06-28  6:45 ` Ahmad Fatoum [this message]
2021-06-28  6:45 ` [PATCH 7/7] Revert "sandbox: hostfile: move initcall to earlier postcore level" Ahmad Fatoum
2021-07-18  5:14 ` [PATCH 0/7] sandbox: turn into deep probe platform 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=20210628064517.28636-7-a.fatoum@pengutronix.de \
    --to=a.fatoum@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