u-boot/doc/usage
AKASHI Takahiro 36e45f69c4 cmd: dm: allow for selecting uclass and device
The output from "dm tree" or "dm uclass" is a bit annoying
if the number of devices available on the system is huge.
(This is especially true on sandbox when I debug some DM code.)

With this patch, we can specify the uclass name or the device
name that we are interested in in order to limit the output.

For instance,

=> dm uclass usb
uclass 121: usb
0     usb@1 @ 0bcff8b0, seq 1

uclass 124: usb

=> dm tree usb:usb@1
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 usb           0  [   ]   usb_sandbox           usb@1
 usb_hub       0  [   ]   usb_hub               `-- hub
 usb_emul      0  [   ]   usb_sandbox_hub           `-- hub-emul
 usb_emul      1  [   ]   usb_sandbox_flash             |-- flash-stick@0
 usb_emul      2  [   ]   usb_sandbox_flash             |-- flash-stick@1
 usb_emul      3  [   ]   usb_sandbox_flash             |-- flash-stick@2
 usb_emul      4  [   ]   usb_sandbox_keyb              `-- keyb@3

If you want forward-matching against a uclass or udevice name,
you can specify "-e" option.

=> dm uclass -e usb
uclass 15: usb_emul
0     hub-emul @ 0bcffb00, seq 0
1     flash-stick@0 @ 0bcffc30, seq 1
2     flash-stick@1 @ 0bcffdc0, seq 2
3     flash-stick@2 @ 0bcfff50, seq 3
4     keyb@3 @ 0bd000e0, seq 4

uclass 64: usb_mass_storage

uclass 121: usb
0     usb@1 @ 0bcff8b0, seq 1

uclass 122: usb_dev_generic

uclass 123: usb_hub
0     hub @ 0bcff9b0, seq 0

uclass 124: usb

=> dm tree -e usb
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 usb           0  [   ]   usb_sandbox           usb@1
 usb_hub       0  [   ]   usb_hub               `-- hub
 usb_emul      0  [   ]   usb_sandbox_hub           `-- hub-emul
 usb_emul      1  [   ]   usb_sandbox_flash             |-- flash-stick@0
 usb_emul      2  [   ]   usb_sandbox_flash             |-- flash-stick@1
 usb_emul      3  [   ]   usb_sandbox_flash             |-- flash-stick@2
 usb_emul      4  [   ]   usb_sandbox_keyb              `-- keyb@3

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-09-23 12:31:25 -06:00
..
cmd cmd: dm: allow for selecting uclass and device 2023-09-23 12:31:25 -06:00
fit Pull request doc-2023-07-rc6 2023-06-23 14:31:55 -04:00
os doc: usage: Convert README.plan9 to reST 2022-03-31 19:06:16 +02:00
blkmap.rst doc: harmonize Linux kernel documentation links 2023-07-09 04:00:06 +02:00
cmdline.rst doc: man-page for the env command 2022-04-15 11:23:02 +02:00
dfu.rst global: Use proper project name U-Boot 2023-06-12 13:24:31 +02:00
environment.rst global: Use proper project name U-Boot (next2) 2023-09-21 13:20:11 +02:00
fdt_overlays.rst doc: usage: Fix command in fdt overlay apply sequence 2021-12-09 11:43:25 -08:00
index.rst doc: Add gpt command documentation 2023-09-02 09:44:04 +02:00
netconsole.rst global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
partitions.rst blk: Rename if_type to uclass_id 2022-09-25 08:30:05 -06:00
semihosting.rst global: Use proper project name U-Boot (next2) 2023-09-21 13:20:11 +02:00
spl_boot.rst doc: describe TPL/VPL/SPL boot 2023-08-27 08:21:08 +02:00