diff options
author | Tom Rini <trini@ti.com> | 2014-06-20 20:03:51 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-06-20 20:03:51 -0400 |
commit | 39b6d07fd7e692736cdb05a000b1c84ab43de4fb (patch) | |
tree | 72b3530f77de13dab378b5be9789edd952bc9e03 /test | |
parent | 45f0ad9545578b4436fdf04ba25a10173bcb75ef (diff) | |
parent | 22ec136325fdfc805b1e48e5ac8e17f23b4e9fc6 (diff) | |
download | u-boot-imx-39b6d07fd7e692736cdb05a000b1c84ab43de4fb.zip u-boot-imx-39b6d07fd7e692736cdb05a000b1c84ab43de4fb.tar.gz u-boot-imx-39b6d07fd7e692736cdb05a000b1c84ab43de4fb.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-dm
Diffstat (limited to 'test')
-rw-r--r-- | test/dm/Makefile | 2 | ||||
-rw-r--r-- | test/dm/cmd_dm.c | 19 | ||||
-rw-r--r-- | test/dm/test-fdt.c | 2 |
3 files changed, 16 insertions, 7 deletions
diff --git a/test/dm/Makefile b/test/dm/Makefile index 4e9afe6..c0f2135 100644 --- a/test/dm/Makefile +++ b/test/dm/Makefile @@ -15,4 +15,6 @@ obj-$(CONFIG_DM_TEST) += ut.o # subsystem you must add sandbox tests here. obj-$(CONFIG_DM_TEST) += core.o obj-$(CONFIG_DM_TEST) += ut.o +ifneq ($(CONFIG_SANDBOX),) obj-$(CONFIG_DM_GPIO) += gpio.o +endif diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c index 083f15c..aa8122c 100644 --- a/test/dm/cmd_dm.c +++ b/test/dm/cmd_dm.c @@ -23,7 +23,7 @@ static int display_succ(struct udevice *in, char *buf) char local[16]; struct udevice *pos, *n, *prev = NULL; - printf("%s- %s @ %08x", buf, in->name, map_to_sysmem(in)); + printf("%s- %s @ %08lx", buf, in->name, (ulong)map_to_sysmem(in)); if (in->flags & DM_FLAG_ACTIVATED) puts(" - activated"); puts("\n"); @@ -62,7 +62,7 @@ static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc, struct udevice *root; root = dm_root(); - printf("ROOT %08x\n", map_to_sysmem(root)); + printf("ROOT %08lx\n", (ulong)map_to_sysmem(root)); return dm_dump(root); } @@ -84,8 +84,8 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc, for (ret = uclass_first_device(id, &dev); dev; ret = uclass_next_device(&dev)) { - printf(" %s @ %08x:\n", dev->name, - map_to_sysmem(dev)); + printf(" %s @ %08lx:\n", dev->name, + (ulong)map_to_sysmem(dev)); } puts("\n"); } @@ -93,16 +93,23 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } +#ifdef CONFIG_DM_TEST static int do_dm_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return dm_test_main(); } +#define TEST_HELP "\ndm test Run tests" +#else +#define TEST_HELP +#endif static cmd_tbl_t test_commands[] = { U_BOOT_CMD_MKENT(tree, 0, 1, do_dm_dump_all, "", ""), U_BOOT_CMD_MKENT(uclass, 1, 1, do_dm_dump_uclass, "", ""), +#ifdef CONFIG_DM_TEST U_BOOT_CMD_MKENT(test, 1, 1, do_dm_test, "", ""), +#endif }; static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) @@ -128,6 +135,6 @@ U_BOOT_CMD( dm, 2, 1, do_dm, "Driver model low level access", "tree Dump driver model tree\n" - "dm uclass Dump list of instances for each uclass\n" - "dm test Run tests" + "dm uclass Dump list of instances for each uclass" + TEST_HELP ); diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index 6eccf11..98e3936 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -53,7 +53,7 @@ static int testfdt_drv_probe(struct udevice *dev) return 0; } -static const struct device_id testfdt_ids[] = { +static const struct udevice_id testfdt_ids[] = { { .compatible = "denx,u-boot-fdt-test", .data = DM_TEST_TYPE_FIRST }, |