[PATCH 0/3] cmd: add driver, fs and part type listing commands

This series adds commands for listing the supported partition tables, listing supported filesystems and expands Driver Model listing commands.
The existing "dm drivers" command, which lists the DM drivers and their compatibility strings, segmentation faulted on drivers for which of_match was unpopulated (which appears to not be uncommon). This was fixed, and the command was renamed "dm compat", and a new more extensive "dm drivers" command was added, which list all DM drivers and for each, their uclass id, uclass driver and the device names for active driver instances. The purpose is show available drivers, but also to highlight unused drivers or drivers with uclass ids without uclass drivers, etc.
The following commands were added: -"part types", lists partition tables supported -"fstypes", lists filesystem types supported -"dm compat", lists drivers and their compatibility strings (equivalent to existing "dm drivers" command) -"dm drivers", lists all DM drivers, and for each their uclass id, uclass driver and the device names for active driver instances. -"dm static", lists all DM drivers which use static platform data (instead of the device tree).
These patches were tested in the Sandbox and on the Wandboard i.MX6Quad Board rev B1.
Niel Fourie (3): cmd: part: Add subcommand to list supported partition tables cmd: fs: Add command to list supported fs types cmd: dm: Fixed/Added DM driver listing subcommands
cmd/dm.c | 24 ++++++++++++++++-- cmd/fs.c | 11 +++++++++ cmd/part.c | 27 ++++++++++++++++++-- drivers/core/dump.c | 60 ++++++++++++++++++++++++++++++++++++++++++++- fs/fs.c | 20 +++++++++++++++ include/dm/util.h | 6 +++++ include/fs.h | 5 ++++ 7 files changed, 148 insertions(+), 5 deletions(-)

Add a subcommand "types" to the part command, which lists the supported partition table types.
Signed-off-by: Niel Fourie lusus@denx.de CC: Simon Glass sjg@chromium.org --- cmd/part.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/cmd/part.c b/cmd/part.c index 5e4e45ca6d..fae5df7b71 100644 --- a/cmd/part.c +++ b/cmd/part.c @@ -182,6 +182,26 @@ static int do_part_number(int argc, char * const argv[]) return do_part_info(argc, argv, CMD_PART_INFO_NUMBER); }
+static int do_part_types(int argc, char * const argv[]) +{ + struct part_driver *drv = ll_entry_start(struct part_driver, + part_driver); + const int n_ents = ll_entry_count(struct part_driver, part_driver); + struct part_driver *entry; + int i = 0; + + puts("Supported partition tables"); + + for (entry = drv; entry != drv + n_ents; entry++) { + printf("%c %s", i ? ',' : ':', entry->name); + i++; + } + if (!i) + puts(": <none>"); + puts("\n"); + return CMD_RET_SUCCESS; +} + static int do_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2) @@ -197,7 +217,8 @@ static int do_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return do_part_size(argc - 2, argv + 2); else if (!strcmp(argv[1], "number")) return do_part_number(argc - 2, argv + 2); - + else if (!strcmp(argv[1], "types")) + return do_part_types(argc - 2, argv + 2); return CMD_RET_USAGE; }
@@ -221,5 +242,7 @@ U_BOOT_CMD( " part can be either partition number or partition name\n" "part number <interface> <dev> <part> <varname>\n" " - set environment variable to the partition number using the partition name\n" - " part must be specified as partition name" + " part must be specified as partition name\n" + "part types\n" + " - list supported partition table types" );

Added command "fstypes" to list supported/included filesystems.
Signed-off-by: Niel Fourie lusus@denx.de CC: Simon Glass sjg@chromium.org --- cmd/fs.c | 11 +++++++++++ fs/fs.c | 20 ++++++++++++++++++++ include/fs.h | 5 +++++ 3 files changed, 36 insertions(+)
diff --git a/cmd/fs.c b/cmd/fs.c index db74767b7b..26b47bd001 100644 --- a/cmd/fs.c +++ b/cmd/fs.c @@ -99,3 +99,14 @@ U_BOOT_CMD( "fstype <interface> <dev>:<part> <varname>\n" "- set environment variable to filesystem type\n" ); + +static int do_fstypes_wrapper(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) +{ + return do_fs_types(cmdtp, flag, argc, argv); +} + +U_BOOT_CMD( + fstypes, 1, 1, do_fstypes_wrapper, + "List supported filesystem types", "" +); diff --git a/fs/fs.c b/fs/fs.c index 0c66d60477..3e38b2e27a 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -900,3 +900,23 @@ int do_ln(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
return 0; } + +int do_fs_types(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + struct fstype_info *drv = fstypes; + const int n_ents = ARRAY_SIZE(fstypes); + struct fstype_info *entry; + int i = 0; + + puts("Supported filesystems"); + for (entry = drv; entry != drv + n_ents; entry++) { + if (entry->fstype != FS_TYPE_ANY) { + printf("%c %s", i ? ',' : ':', entry->name); + i++; + } + } + if (!i) + puts(": <none>"); + puts("\n"); + return CMD_RET_SUCCESS; +} diff --git a/include/fs.h b/include/fs.h index 37e35c2120..b3fd0b179d 100644 --- a/include/fs.h +++ b/include/fs.h @@ -254,4 +254,9 @@ int do_fs_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], */ int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+/* + * List supported filesystems. + */ +int do_fs_types(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); + #endif /* _FS_H */

Renamed dm "drivers" subcommand to "compat" (as it listed compatibility strings) and prevent it from segfaulting when drivers have no of_match populated.
Added a new "drivers" subcommand to dump a list of all known DM drivers and for each, their uclass id, uclass driver and names of attached devices.
Added a new "static" subcommand to dump a list of DM drivers with statically defined platform data.
Signed-off-by: Niel Fourie lusus@denx.de CC: Simon Glass sjg@chromium.org --- cmd/dm.c | 24 ++++++++++++++++-- drivers/core/dump.c | 60 ++++++++++++++++++++++++++++++++++++++++++++- include/dm/util.h | 6 +++++ 3 files changed, 87 insertions(+), 3 deletions(-)
diff --git a/cmd/dm.c b/cmd/dm.c index 108707c298..a17ef6a1bb 100644 --- a/cmd/dm.c +++ b/cmd/dm.c @@ -48,11 +48,29 @@ static int do_dm_dump_drivers(cmd_tbl_t *cmdtp, int flag, int argc, return 0; }
+static int do_dm_dump_driver_compat(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) +{ + dm_dump_driver_compat(); + + return 0; +} + +static int do_dm_dump_static_driver_info(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) +{ + dm_dump_static_driver_info(); + + return 0; +} + 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, "", ""), U_BOOT_CMD_MKENT(devres, 1, 1, do_dm_dump_devres, "", ""), U_BOOT_CMD_MKENT(drivers, 1, 1, do_dm_dump_drivers, "", ""), + U_BOOT_CMD_MKENT(compat, 1, 1, do_dm_dump_driver_compat, "", ""), + U_BOOT_CMD_MKENT(static, 1, 1, do_dm_dump_static_driver_info, "", ""), };
static __maybe_unused void dm_reloc(void) @@ -91,8 +109,10 @@ static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) U_BOOT_CMD( dm, 3, 1, do_dm, "Driver model low level access", - "tree Dump driver model tree ('*' = activated)\n" + "dm tree Dump driver model tree ('*' = activated)\n" "dm uclass Dump list of instances for each uclass\n" "dm devres Dump list of device resources for each device\n" - "dm drivers Dump list of drivers and their compatible strings\n" + "dm drivers Dump list of drivers with uclass and instances\n" + "dm compat Dump list of drivers with compatibility strings\n" + "dm static Dump list of drivers with static platform data\n" ); diff --git a/drivers/core/dump.c b/drivers/core/dump.c index e73ebeabcc..a42bfb577f 100644 --- a/drivers/core/dump.c +++ b/drivers/core/dump.c @@ -97,7 +97,7 @@ void dm_dump_uclass(void) } }
-void dm_dump_drivers(void) +void dm_dump_driver_compat(void) { struct driver *d = ll_entry_start(struct driver, driver); const int n_ents = ll_entry_count(struct driver, driver); @@ -107,6 +107,9 @@ void dm_dump_drivers(void) puts("Driver Compatible\n"); puts("--------------------------------\n"); for (entry = d; entry < d + n_ents; entry++) { + if (!entry->of_match) { + continue; + } for (match = entry->of_match; match->compatible; match++) printf("%-20.20s %s\n", match == entry->of_match ? entry->name : "", @@ -115,3 +118,58 @@ void dm_dump_drivers(void) printf("%-20.20s\n", entry->name); } } + +void dm_dump_drivers(void) +{ + struct driver *d = ll_entry_start(struct driver, driver); + const int n_ents = ll_entry_count(struct driver, driver); + struct driver *entry; + struct udevice *udev; + struct uclass *uc; + int i; + + puts("Driver uid uclass Devices\n"); + for (i = 0; i < 77; i++) + putc('-'); + putc('\n'); + + for (entry = d; entry < d + n_ents; entry++) { + uclass_get(entry->id, &uc); + + printf("%-25.25s %-3.3d %-20.20s ", entry->name, entry->id, + uc ? uc->uc_drv->name : "<no uclass>"); + + if (!uc) { + puts("\n"); + continue; + } + + i = 0; + uclass_foreach_dev(udev, uc) { + if (udev->driver != entry) + continue; + if (i) + printf("%-51.51s", ""); + + printf("%-25.25s\n", udev->name); + i++; + } + if (!i) + puts("<none>\n"); + } +} + +void dm_dump_static_driver_info(void) +{ + struct driver_info *drv = ll_entry_start(struct driver_info, + driver_info); + const int n_ents = ll_entry_count(struct driver_info, driver_info); + struct driver_info *entry; + + puts("Driver Address\n"); + puts("------------------------------\n"); + for (entry = drv; entry != drv + n_ents; entry++) { + printf("%-20.20s @%08lx\n", entry->name, + (ulong)map_to_sysmem(entry->platdata)); + } +} diff --git a/include/dm/util.h b/include/dm/util.h index 0ccb3fbadf..974347ce0b 100644 --- a/include/dm/util.h +++ b/include/dm/util.h @@ -42,6 +42,12 @@ static inline void dm_dump_devres(void) /* Dump out a list of drivers */ void dm_dump_drivers(void);
+/* Dump out a list with each driver's compatibility strings */ +void dm_dump_driver_compat(void); + +/* Dump out a list of drivers with static platform data */ +void dm_dump_static_driver_info(void); + /** * Check if an of node should be or was bound before relocation. *

On 3/17/20 10:09 AM, Niel Fourie wrote:
Renamed dm "drivers" subcommand to "compat" (as it listed compatibility strings) and prevent it from segfaulting when drivers have no of_match populated.
Added a new "drivers" subcommand to dump a list of all known DM drivers and for each, their uclass id, uclass driver and names of attached devices.
Added a new "static" subcommand to dump a list of DM drivers with statically defined platform data.
Signed-off-by: Niel Fourie lusus@denx.de CC: Simon Glass sjg@chromium.org
cmd/dm.c | 24 ++++++++++++++++-- drivers/core/dump.c | 60 ++++++++++++++++++++++++++++++++++++++++++++- include/dm/util.h | 6 +++++ 3 files changed, 87 insertions(+), 3 deletions(-)
diff --git a/cmd/dm.c b/cmd/dm.c index 108707c298..a17ef6a1bb 100644 --- a/cmd/dm.c +++ b/cmd/dm.c @@ -48,11 +48,29 @@ static int do_dm_dump_drivers(cmd_tbl_t *cmdtp, int flag, int argc, return 0; }
+static int do_dm_dump_driver_compat(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
+{
- dm_dump_driver_compat();
- return 0;
+}
+static int do_dm_dump_static_driver_info(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
+{
- dm_dump_static_driver_info();
- return 0;
+}
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, "", ""), U_BOOT_CMD_MKENT(devres, 1, 1, do_dm_dump_devres, "", ""), U_BOOT_CMD_MKENT(drivers, 1, 1, do_dm_dump_drivers, "", ""),
- U_BOOT_CMD_MKENT(compat, 1, 1, do_dm_dump_driver_compat, "", ""),
- U_BOOT_CMD_MKENT(static, 1, 1, do_dm_dump_static_driver_info, "", ""),
};
static __maybe_unused void dm_reloc(void) @@ -91,8 +109,10 @@ static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) U_BOOT_CMD( dm, 3, 1, do_dm, "Driver model low level access",
- "tree Dump driver model tree ('*' = activated)\n"
- "dm tree Dump driver model tree ('*' = activated)\n" "dm uclass Dump list of instances for each uclass\n" "dm devres Dump list of device resources for each device\n"
- "dm drivers Dump list of drivers and their compatible strings\n"
- "dm drivers Dump list of drivers with uclass and instances\n"
- "dm compat Dump list of drivers with compatibility strings\n"
- "dm static Dump list of drivers with static platform data\n"
); diff --git a/drivers/core/dump.c b/drivers/core/dump.c index e73ebeabcc..a42bfb577f 100644 --- a/drivers/core/dump.c +++ b/drivers/core/dump.c @@ -97,7 +97,7 @@ void dm_dump_uclass(void) } }
-void dm_dump_drivers(void) +void dm_dump_driver_compat(void) { struct driver *d = ll_entry_start(struct driver, driver); const int n_ents = ll_entry_count(struct driver, driver); @@ -107,6 +107,9 @@ void dm_dump_drivers(void) puts("Driver Compatible\n"); puts("--------------------------------\n"); for (entry = d; entry < d + n_ents; entry++) {
if (!entry->of_match) {
continue;
}
This should have been fixed in version 2 of the patch [1].
[1] https://patchwork.ozlabs.org/patch/1234460/
for (match = entry->of_match; match->compatible; match++) printf("%-20.20s %s\n", match == entry->of_match ? entry->name : "",
@@ -115,3 +118,58 @@ void dm_dump_drivers(void) printf("%-20.20s\n", entry->name); } }
+void dm_dump_drivers(void) +{
- struct driver *d = ll_entry_start(struct driver, driver);
- const int n_ents = ll_entry_count(struct driver, driver);
- struct driver *entry;
- struct udevice *udev;
- struct uclass *uc;
- int i;
- puts("Driver uid uclass Devices\n");
- for (i = 0; i < 77; i++)
putc('-');
Can you print these dashes in a way which makes it obvious that they are the correct length? E.g. do something like
puts("Driver uid uclass Devices\n"); puts("----------------------------------------------------------\n");
or
char header[] = "Driver uid uclass Devices"; puts("%s\n", header); for (i = 0; i < sizeof(header) - 1; i++) putc('-');
- putc('\n');
- for (entry = d; entry < d + n_ents; entry++) {
uclass_get(entry->id, &uc);
printf("%-25.25s %-3.3d %-20.20s ", entry->name, entry->id,
uc ? uc->uc_drv->name : "<no uclass>");
if (!uc) {
puts("\n");
continue;
}
i = 0;
uclass_foreach_dev(udev, uc) {
if (udev->driver != entry)
continue;
if (i)
printf("%-51.51s", "");
printf("%-25.25s\n", udev->name);
i++;
}
if (!i)
puts("<none>\n");
- }
+}
+void dm_dump_static_driver_info(void) +{
- struct driver_info *drv = ll_entry_start(struct driver_info,
driver_info);
- const int n_ents = ll_entry_count(struct driver_info, driver_info);
- struct driver_info *entry;
- puts("Driver Address\n");
- puts("------------------------------\n");
- for (entry = drv; entry != drv + n_ents; entry++) {
printf("%-20.20s @%08lx\n", entry->name,
(ulong)map_to_sysmem(entry->platdata));
- }
+}
Just curious, what were you using this for?
diff --git a/include/dm/util.h b/include/dm/util.h index 0ccb3fbadf..974347ce0b 100644 --- a/include/dm/util.h +++ b/include/dm/util.h @@ -42,6 +42,12 @@ static inline void dm_dump_devres(void) /* Dump out a list of drivers */ void dm_dump_drivers(void);
+/* Dump out a list with each driver's compatibility strings */ +void dm_dump_driver_compat(void);
+/* Dump out a list of drivers with static platform data */ +void dm_dump_static_driver_info(void);
/**
- Check if an of node should be or was bound before relocation.
--Sean

Dear Sean,
In message f508db5c-e15c-7ec3-f290-99427821d644@gmail.com you wrote:
Can you print these dashes in a way which makes it obvious that they are the correct length? E.g. do something like
puts("Driver uid uclass Devices\n"); puts("----------------------------------------------------------\n");
Or even less code:
puts("Driver uid uclass Devices\n" "----------------------------------------------------------\n");
Best regards,
Wolfgang Denk

Hi Sean, Simon,
I will write tests for all of these cases as Simon requested. Thanks, it did not occur to me.
On 3/17/20 7:51 PM, Sean Anderson wrote:
-void dm_dump_drivers(void) +void dm_dump_driver_compat(void) { struct driver *d = ll_entry_start(struct driver, driver); const int n_ents = ll_entry_count(struct driver, driver); @@ -107,6 +107,9 @@ void dm_dump_drivers(void) puts("Driver Compatible\n"); puts("--------------------------------\n"); for (entry = d; entry < d + n_ents; entry++) {
if (!entry->of_match) {
continue;
}
This should have been fixed in version 2 of the patch [1].
Ah, I didn't know of that patch. I'll ask Tom whether I should rebase my patches on top of that change or not.
+void dm_dump_drivers(void) +{
- struct driver *d = ll_entry_start(struct driver, driver);
- const int n_ents = ll_entry_count(struct driver, driver);
- struct driver *entry;
- struct udevice *udev;
- struct uclass *uc;
- int i;
- puts("Driver uid uclass Devices\n");
- for (i = 0; i < 77; i++)
putc('-');
Can you print these dashes in a way which makes it obvious that they are the correct length? E.g. do something like
puts("Driver uid uclass Devices\n"); puts("----------------------------------------------------------\n");
Ah, I was lining the dashes up with the contents instead of the heading. I will fix all cases to be like the above. Thanks!
+void dm_dump_static_driver_info(void) +{
- struct driver_info *drv = ll_entry_start(struct driver_info,
driver_info);
- const int n_ents = ll_entry_count(struct driver_info, driver_info);
- struct driver_info *entry;
- puts("Driver Address\n");
- puts("------------------------------\n");
- for (entry = drv; entry != drv + n_ents; entry++) {
printf("%-20.20s @%08lx\n", entry->name,
(ulong)map_to_sysmem(entry->platdata));
- }
+}
Just curious, what were you using this for?
In general I was looking for ways to query list-able capabilities of U-boot at run time, to show anomalies and to highlight legacy/non-ideal implementations when possible; it is hard to fix a problem which you can't see it.
Because the U_BOOT_DEVICE() devices should be used sparingly and do not appear in the device tree, I felt that it was useful to list them to see their impact. The address is useful to for eyeballing the platform data with md.b to distinguish between multiple driver instances...
In the hunt against legacy drivers, I am also looking at ways of listing/highlighting other problem-children at run time, but whether those patches will see light-of-day is another matter...
Best regards, Niel Fourie

Hi Tom,
On 3/17/20 7:51 PM, Sean Anderson wrote:
On 3/17/20 10:09 AM, Niel Fourie wrote:
Renamed dm "drivers" subcommand to "compat" (as it listed compatibility strings) and prevent it from segfaulting when drivers have no of_match populated.
Added a new "drivers" subcommand to dump a list of all known DM drivers and for each, their uclass id, uclass driver and names of attached devices.
Added a new "static" subcommand to dump a list of DM drivers with statically defined platform data.
Signed-off-by: Niel Fourie lusus@denx.de CC: Simon Glass sjg@chromium.org
cmd/dm.c | 24 ++++++++++++++++-- drivers/core/dump.c | 60 ++++++++++++++++++++++++++++++++++++++++++++- include/dm/util.h | 6 +++++ 3 files changed, 87 insertions(+), 3 deletions(-)
<snip> In drivers/core/dump.c:
-void dm_dump_drivers(void) +void dm_dump_driver_compat(void) { struct driver *d = ll_entry_start(struct driver, driver); const int n_ents = ll_entry_count(struct driver, driver); @@ -107,6 +107,9 @@ void dm_dump_drivers(void) puts("Driver Compatible\n"); puts("--------------------------------\n"); for (entry = d; entry < d + n_ents; entry++) {
if (!entry->of_match) {
continue;
}
This should have been fixed in version 2 of the patch [1].
Should I rebase my series on the version 2 of the above patch, or should I simply include that change in my series instead? Thanks in advance!
Best regards, Niel Fourie

On Wed, Mar 18, 2020 at 01:22:03PM +0100, Niel Fourie wrote:
Hi Tom,
On 3/17/20 7:51 PM, Sean Anderson wrote:
On 3/17/20 10:09 AM, Niel Fourie wrote:
Renamed dm "drivers" subcommand to "compat" (as it listed compatibility strings) and prevent it from segfaulting when drivers have no of_match populated.
Added a new "drivers" subcommand to dump a list of all known DM drivers and for each, their uclass id, uclass driver and names of attached devices.
Added a new "static" subcommand to dump a list of DM drivers with statically defined platform data.
Signed-off-by: Niel Fourie lusus@denx.de CC: Simon Glass sjg@chromium.org
cmd/dm.c | 24 ++++++++++++++++-- drivers/core/dump.c | 60 ++++++++++++++++++++++++++++++++++++++++++++- include/dm/util.h | 6 +++++ 3 files changed, 87 insertions(+), 3 deletions(-)
<snip> In drivers/core/dump.c: > > -void dm_dump_drivers(void) > > +void dm_dump_driver_compat(void) > > { > > struct driver *d = ll_entry_start(struct driver, driver); > > const int n_ents = ll_entry_count(struct driver, driver); > > @@ -107,6 +107,9 @@ void dm_dump_drivers(void) > > puts("Driver Compatible\n"); > > puts("--------------------------------\n"); > > for (entry = d; entry < d + n_ents; entry++) { > > + if (!entry->of_match) { > > + continue; > > + } > > This should have been fixed in version 2 of the patch [1]. > > [1] https://patchwork.ozlabs.org/patch/1234460/ >
Should I rebase my series on the version 2 of the above patch, or should I simply include that change in my series instead? Thanks in advance!
Please rebase on top of, thanks!

Hi Neil,
On Tue, 17 Mar 2020 at 08:09, Niel Fourie lusus@denx.de wrote:
This series adds commands for listing the supported partition tables, listing supported filesystems and expands Driver Model listing commands.
The existing "dm drivers" command, which lists the DM drivers and their compatibility strings, segmentation faulted on drivers for which of_match was unpopulated (which appears to not be uncommon). This was fixed, and the command was renamed "dm compat", and a new more extensive "dm drivers" command was added, which list all DM drivers and for each, their uclass id, uclass driver and the device names for active driver instances. The purpose is show available drivers, but also to highlight unused drivers or drivers with uclass ids without uclass drivers, etc.
The following commands were added: -"part types", lists partition tables supported -"fstypes", lists filesystem types supported -"dm compat", lists drivers and their compatibility strings (equivalent to existing "dm drivers" command) -"dm drivers", lists all DM drivers, and for each their uclass id, uclass driver and the device names for active driver instances. -"dm static", lists all DM drivers which use static platform data (instead of the device tree).
These patches were tested in the Sandbox and on the Wandboard i.MX6Quad Board rev B1.
This all looks very useful thank you. Can you please add sandbox tests for the commands?
For an example, see https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/blob/coral-working/test...
The test is dm_test_acpi_cmd_items()
Regards, Simon
Niel Fourie (3): cmd: part: Add subcommand to list supported partition tables cmd: fs: Add command to list supported fs types cmd: dm: Fixed/Added DM driver listing subcommands
cmd/dm.c | 24 ++++++++++++++++-- cmd/fs.c | 11 +++++++++ cmd/part.c | 27 ++++++++++++++++++-- drivers/core/dump.c | 60 ++++++++++++++++++++++++++++++++++++++++++++- fs/fs.c | 20 +++++++++++++++ include/dm/util.h | 6 +++++ include/fs.h | 5 ++++ 7 files changed, 148 insertions(+), 5 deletions(-)
-- 2.24.1
participants (5)
-
Niel Fourie
-
Sean Anderson
-
Simon Glass
-
Tom Rini
-
Wolfgang Denk