diff options
Diffstat (limited to 'board/sandbox')
-rw-r--r-- | board/sandbox/sandbox.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 0c3d245d..197a321e 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -12,6 +12,9 @@ #include <os.h> #include <asm/test.h> #include <asm/u-boot-sandbox.h> +#include <malloc.h> + +#include <extension_board.h> /* * Pointer to initial global data area @@ -58,6 +61,26 @@ int board_init(void) return 0; } +#ifdef CONFIG_CMD_EXTENSION +int extension_board_scan(struct list_head *extension_list) +{ + struct extension *extension; + int i; + + for (i = 0; i < 2; i++) { + extension = calloc(1, sizeof(struct extension)); + snprintf(extension->overlay, sizeof(extension->overlay), "overlay%d.dtbo", i); + snprintf(extension->name, sizeof(extension->name), "extension board %d", i); + snprintf(extension->owner, sizeof(extension->owner), "sandbox"); + snprintf(extension->version, sizeof(extension->version), "1.1"); + snprintf(extension->other, sizeof(extension->other), "Fictionnal extension board"); + list_add_tail(&extension->list, extension_list); + } + + return i; +} +#endif + #ifdef CONFIG_BOARD_LATE_INIT int board_late_init(void) { |