summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-06-28 08:45:16 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-07-18 07:14:12 +0200
commit89a7bdcd41bfaa197d0ff140b9b3680400c2f70d (patch)
tree5342681186ab24dc49e7b15ccb71eb5e3d53de5e /arch
parent2e04cb3bf9a838afa8fc1cd86fd254db13d0f691 (diff)
downloadbarebox-89a7bdcd41bfaa197d0ff140b9b3680400c2f70d.tar.gz
barebox-89a7bdcd41bfaa197d0ff140b9b3680400c2f70d.tar.xz
sandbox: turn into deep probe platform
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> Link: https://lore.barebox.org/20210628064517.28636-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/sandbox/board/board.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/sandbox/board/board.c b/arch/sandbox/board/board.c
index 45b7c7deff..43e355afe8 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);