diff options
Diffstat (limited to 'arch/sandbox/board/board.c')
-rw-r--r-- | arch/sandbox/board/board.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/arch/sandbox/board/board.c b/arch/sandbox/board/board.c index ad2bc910c3..c8d1c99897 100644 --- a/arch/sandbox/board/board.c +++ b/arch/sandbox/board/board.c @@ -3,9 +3,6 @@ * * Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix * - * See file CREDITS for list of people who contributed to this - * project. - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. @@ -23,6 +20,7 @@ #include <mach/linux.h> #include <init.h> #include <errno.h> +#include <deep-probe.h> #include <fb.h> struct fb_videomode mode = { @@ -31,23 +29,23 @@ struct fb_videomode mode = { .yres = 480, }; -static struct device_d tap_device = { +static struct device tap_device = { .id = DEVICE_ID_DYNAMIC, .name = "tap", }; -static struct device_d sdl_device = { +static struct device sdl_device = { .id = DEVICE_ID_DYNAMIC, .name = "sdlfb", .platform_data = &mode, }; -static struct device_d devrandom_device = { +static struct device devrandom_device = { .id = DEVICE_ID_DYNAMIC, .name = "devrandom", }; -static int devices_init(void) +static int devices_init(struct device *dev) { platform_device_register(&tap_device); @@ -64,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 sandbox_board_drv = { + .name = "sandbox-board", + .of_compatible = sandbox_dt_ids, + .probe = devices_init, +}; +device_platform_driver(sandbox_board_drv); |