cmd: add driver, fs and part type listing commands
cover 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(-)
Signature · 1 line
2.24.1
PATCH 1/3 cmd: part: Add subcommand to list supported partition tables
Add a subcommand "types" to the part command, which lists the supported partition table types.
--- cmd/part.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
cmd/part.c +25 -2
@@ -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" );
Signature · 1 line
2.24.1
PATCH 2/3 cmd: fs: Add command to list supported fs types
In reply to Niel FourieAdded command "fstypes" to list supported/included filesystems.
--- cmd/fs.c | 11 +++++++++++ fs/fs.c | 20 ++++++++++++++++++++ include/fs.h | 5 +++++ 3 files changed, 36 insertions(+)
cmd/fs.c +11 -0
@@ -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" ,"" +);
fs/fs.c +20 -0
@@ -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 ; +}
include/fs.h +5 -0
@@ -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 */
Signature · 1 line
2.24.1
PATCH 3/3 cmd: dm: Fixed/Added DM driver listing subcommands
In reply to Niel FourieRenamed 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.
--- cmd/dm.c | 24 ++++++++++++++++-- drivers/core/dump.c | 60 ++++++++++++++++++++++++++++++++++++++++++++- include/dm/util.h | 6 +++++ 3 files changed, 87 insertions(+), 3 deletions(-)
cmd/dm.c +22 -2
@@ -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" );
drivers/core/dump.c +59 -1
75 lines not on this page · raw message
include/dm/util.h +6 -0
@@ -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. *
Signature · 1 line
2.24.1
PATCH 3/3 cmd: dm: Fixed/Added DM driver listing subcommands
Quoted 80 lines · Niel Fourie
Renamed dm "drivers" subcommand to "compat" (as it listed compatibility strings) and prevent it from segfaulting when drivers have no
of_matchpopulated.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 <[email protected]>CC Simon Glass <[email protected]>--- cmd/dm.c | 24 ++++++++++++++++-- drivers/core/dump.c | 60 ++++++++++++++++++++++++++++++++++++++++++++- include/dm/util.h | 6 +++++ 3 files changed, 87 insertions(+), 3 deletions(-)cmd/dm.c +22
-2@@ -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" );drivers/core/dump.c +1
-1@@ -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);
drivers/core/dump.c void dm_dump_drivers(void) · line 112
Quoted 6 lines
drivers/core/dump.c +3
-0@@ -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].
Quoted 10 lines
drivers/core/dump.c +3
-0for (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 ) +{
drivers/core/dump.c void dm_dump_drivers(void) · line 133
Quoted 10 lines
drivers/core/dump.c +10
-0+ 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('-');Quoted 32 lines
drivers/core/dump.c +32
-0+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);
drivers/core/dump.c void dm_dump_drivers(void) · line 175
Quoted 10 lines
drivers/core/dump.c +10
-0+ 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?
Quoted 8 lines
include/dm/util.h +0
-0@@ -42,6 +42,12 @@ static inline void dm_dump_devres(void)/* Dump out a list of drivers */ void dm_dump_drivers (void );
include/dm/util.h static inline void dm_dump_devres(void) · line 53
Quoted 10 lines
include/dm/util.h +6
-0+/* 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
PATCH 3/3 cmd: dm: Fixed/Added DM driver listing subcommands
Dear Sean,
Quoted 6 lines · In message <[email protected]> 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
Signature · 5 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A person with one watch knows what time it is; a person with two watches is never sure. Proverb
PATCH 3/3 cmd: dm: Fixed/Added DM driver listing subcommands
In reply to Sean AndersonHi Sean, Simon,
I will write tests for all of these cases as Simon requested. Thanks, it did not occur to me.
Quoted 6 lines · Sean Anderson
Quoted 6 lines
drivers/core/dump.c +1
-1-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)
Quoted 8 lines
drivers/core/dump.c void dm_dump_drivers(void) · line 112
Quoted 6 lines
drivers/core/dump.c +3
-0puts ("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.
Quoted 17 lines
drivers/core/dump.c void dm_dump_drivers(void) · line 133
Quoted 13 lines
drivers/core/dump.c +13
-0+ +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
Quoted 3 lines
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!
Quoted 8 lines
Quoted 8 lines
drivers/core/dump.c +8
-0+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" );
Quoted 8 lines
drivers/core/dump.c void dm_dump_drivers(void) · line 175
Quoted 6 lines
drivers/core/dump.c +6
-0+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
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-21 Fax: +49-8142-66989-80 Email: lusus at denx.de
PATCH 3/3 cmd: dm: Fixed/Added DM driver listing subcommands
In reply to Sean AndersonHi Tom,
Quoted 12 lines · Sean Anderson
Quoted 11 lines · Niel Fourie
Renamed dm "drivers" subcommand to "compat" (as it listed compatibility strings) and prevent it from segfaulting when drivers have no
of_matchpopulated.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.
Quoted 8 lines
Quoted 8 lines
Signed-off-by Niel Fourie <[email protected]>CC Simon Glass <[email protected]>--- 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:
Quoted 16 lines
drivers/core/dump.c void dm_dump_drivers(void) · line 112
Quoted 13 lines
drivers/core/dump.c +4
-1-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].
Quoted 2 lines
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
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-21 Fax: +49-8142-66989-80 Email: lusus at denx.de
PATCH 3/3 cmd: dm: Fixed/Added DM driver listing subcommands
Quoted 40 lines · Niel Fourie
Hi Tom,
Quoted 12 lines · Sean Anderson
Quoted 11 lines · Niel Fourie
Renamed dm "drivers" subcommand to "compat" (as it listed compatibility strings) and prevent it from segfaulting when drivers have no
of_matchpopulated.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.
Quoted 8 lines
Quoted 8 lines
Signed-off-by Niel Fourie <[email protected]>CC Simon Glass <[email protected]>--- cmd/dm.c | 24 ++++++++++++++++-- drivers/core/dump.c | 60 ++++++++++++++++++++++++++++++++++++++++++++- include/dm/util.h | 6 +++++ 3 files changed, 87 insertions(+), 3 deletions(-)<snip>
Indrivers/core/dump.c:Quoted 15 lines
drivers/core/dump.c void dm_dump_drivers(void) · line 112
Quoted 12 lines
drivers/core/dump.c +4
-1-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].
Quoted 5 lines
Quoted 2 lines
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!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200318/4b6b7c8c/attachment.sig>
cover cmd: add driver, fs and part type listing commands
In reply to Niel FourieHi Neil,
Quoted 23 lines · Niel Fourie
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_matchwas 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).
Quoted 2 lines
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/dm/acpi.c
The test is dm_test_acpi_cmd_items()
Regards,
Simon
Quoted 18 lines
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 subcommandscmd/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