cmd_usb.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. /*
  2. * (C) Copyright 2001
  3. * Denis Peter, MPL AG Switzerland
  4. *
  5. * Most of this source has been derived from the Linux USB
  6. * project.
  7. *
  8. * See file CREDITS for list of people who contributed to this
  9. * project.
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  24. * MA 02111-1307 USA
  25. *
  26. */
  27. #include <common.h>
  28. #include <command.h>
  29. #if (CONFIG_COMMANDS & CFG_CMD_USB)
  30. #include <usb.h>
  31. #ifdef CONFIG_USB_STORAGE
  32. static int usb_stor_curr_dev=-1; /* current device */
  33. #endif
  34. /* some display routines (info command) */
  35. char * usb_get_class_desc(unsigned char dclass)
  36. {
  37. switch(dclass) {
  38. case USB_CLASS_PER_INTERFACE:
  39. return("See Interface");
  40. case USB_CLASS_AUDIO:
  41. return("Audio");
  42. case USB_CLASS_COMM:
  43. return("Communication");
  44. case USB_CLASS_HID:
  45. return("Human Interface");
  46. case USB_CLASS_PRINTER:
  47. return("Printer");
  48. case USB_CLASS_MASS_STORAGE:
  49. return("Mass Storage");
  50. case USB_CLASS_HUB:
  51. return("Hub");
  52. case USB_CLASS_DATA:
  53. return("CDC Data");
  54. case USB_CLASS_VENDOR_SPEC:
  55. return("Vendor specific");
  56. default :
  57. return("");
  58. }
  59. }
  60. void usb_display_class_sub(unsigned char dclass,unsigned char subclass,unsigned char proto)
  61. {
  62. switch(dclass) {
  63. case USB_CLASS_PER_INTERFACE:
  64. printf("See Interface");
  65. break;
  66. case USB_CLASS_HID:
  67. printf("Human Interface, Subclass: ");
  68. switch(subclass) {
  69. case USB_SUB_HID_NONE:
  70. printf("None");
  71. break;
  72. case USB_SUB_HID_BOOT:
  73. printf("Boot ");
  74. switch(proto) {
  75. case USB_PROT_HID_NONE:
  76. printf("None");
  77. break;
  78. case USB_PROT_HID_KEYBOARD:
  79. printf("Keyboard");
  80. break;
  81. case USB_PROT_HID_MOUSE:
  82. printf("Mouse");
  83. break;
  84. default:
  85. printf("reserved");
  86. }
  87. break;
  88. default:
  89. printf("reserved");
  90. }
  91. break;
  92. case USB_CLASS_MASS_STORAGE:
  93. printf("Mass Storage, ");
  94. switch(subclass) {
  95. case US_SC_RBC:
  96. printf("RBC ");
  97. break;
  98. case US_SC_8020:
  99. printf("SFF-8020i (ATAPI)");
  100. break;
  101. case US_SC_QIC:
  102. printf("QIC-157 (Tape)");
  103. break;
  104. case US_SC_UFI:
  105. printf("UFI");
  106. break;
  107. case US_SC_8070:
  108. printf("SFF-8070");
  109. break;
  110. case US_SC_SCSI:
  111. printf("Transp. SCSI");
  112. break;
  113. default:
  114. printf("reserved");
  115. break;
  116. }
  117. printf(", ");
  118. switch(proto) {
  119. case US_PR_CB:
  120. printf("Command/Bulk");
  121. break;
  122. case US_PR_CBI:
  123. printf("Command/Bulk/Int");
  124. break;
  125. case US_PR_BULK:
  126. printf("Bulk only");
  127. break;
  128. default:
  129. printf("reserved");
  130. }
  131. break;
  132. default:
  133. printf("%s",usb_get_class_desc(dclass));
  134. }
  135. }
  136. void usb_display_string(struct usb_device *dev,int index)
  137. {
  138. char buffer[256];
  139. if (index!=0) {
  140. if (usb_string(dev,index,&buffer[0],256)>0);
  141. printf("String: \"%s\"",buffer);
  142. }
  143. }
  144. void usb_display_desc(struct usb_device *dev)
  145. {
  146. if (dev->descriptor.bDescriptorType==USB_DT_DEVICE) {
  147. printf("%d: %s, USB Revision %x.%x\n",dev->devnum,usb_get_class_desc(dev->config.if_desc[0].bInterfaceClass),
  148. (dev->descriptor.bcdUSB>>8) & 0xff,dev->descriptor.bcdUSB & 0xff);
  149. if (strlen(dev->mf) || strlen(dev->prod) || strlen(dev->serial))
  150. printf(" - %s %s %s\n",dev->mf,dev->prod,dev->serial);
  151. if (dev->descriptor.bDeviceClass) {
  152. printf(" - Class: ");
  153. usb_display_class_sub(dev->descriptor.bDeviceClass,dev->descriptor.bDeviceSubClass,dev->descriptor.bDeviceProtocol);
  154. printf("\n");
  155. }
  156. else {
  157. printf(" - Class: (from Interface) %s\n",usb_get_class_desc(dev->config.if_desc[0].bInterfaceClass));
  158. }
  159. printf(" - PacketSize: %d Configurations: %d\n",dev->descriptor.bMaxPacketSize0,dev->descriptor.bNumConfigurations);
  160. printf(" - Vendor: 0x%04x Product 0x%04x Version %d.%d\n",dev->descriptor.idVendor,dev->descriptor.idProduct,(dev->descriptor.bcdDevice>>8) & 0xff,dev->descriptor.bcdDevice & 0xff);
  161. }
  162. }
  163. void usb_display_conf_desc(struct usb_config_descriptor *config,struct usb_device *dev)
  164. {
  165. printf(" Configuration: %d\n",config->bConfigurationValue);
  166. printf(" - Interfaces: %d %s%s%dmA\n",config->bNumInterfaces,(config->bmAttributes & 0x40) ? "Self Powered " : "Bus Powered ",
  167. (config->bmAttributes & 0x20) ? "Remote Wakeup " : "",config->MaxPower*2);
  168. if (config->iConfiguration) {
  169. printf(" - ");
  170. usb_display_string(dev,config->iConfiguration);
  171. printf("\n");
  172. }
  173. }
  174. void usb_display_if_desc(struct usb_interface_descriptor *ifdesc,struct usb_device *dev)
  175. {
  176. printf(" Interface: %d\n",ifdesc->bInterfaceNumber);
  177. printf(" - Alternate Settings %d, Endpoints: %d\n",ifdesc->bAlternateSetting,ifdesc->bNumEndpoints);
  178. printf(" - Class ");
  179. usb_display_class_sub(ifdesc->bInterfaceClass,ifdesc->bInterfaceSubClass,ifdesc->bInterfaceProtocol);
  180. printf("\n");
  181. if (ifdesc->iInterface) {
  182. printf(" - ");
  183. usb_display_string(dev,ifdesc->iInterface);
  184. printf("\n");
  185. }
  186. }
  187. void usb_display_ep_desc(struct usb_endpoint_descriptor *epdesc)
  188. {
  189. printf(" - Endpoint %d %s ",epdesc->bEndpointAddress & 0xf,(epdesc->bEndpointAddress & 0x80) ? "In" : "Out");
  190. switch((epdesc->bmAttributes & 0x03))
  191. {
  192. case 0: printf("Control"); break;
  193. case 1: printf("Isochronous"); break;
  194. case 2: printf("Bulk"); break;
  195. case 3: printf("Interrupt"); break;
  196. }
  197. printf(" MaxPacket %d",epdesc->wMaxPacketSize);
  198. if ((epdesc->bmAttributes & 0x03)==0x3)
  199. printf(" Interval %dms",epdesc->bInterval);
  200. printf("\n");
  201. }
  202. /* main routine to diasplay the configs, interfaces and endpoints */
  203. void usb_display_config(struct usb_device *dev)
  204. {
  205. struct usb_config_descriptor *config;
  206. struct usb_interface_descriptor *ifdesc;
  207. struct usb_endpoint_descriptor *epdesc;
  208. int i,ii;
  209. config= &dev->config;
  210. usb_display_conf_desc(config,dev);
  211. for(i=0;i<config->no_of_if;i++) {
  212. ifdesc= &config->if_desc[i];
  213. usb_display_if_desc(ifdesc,dev);
  214. for(ii=0;ii<ifdesc->no_of_ep;ii++) {
  215. epdesc= &ifdesc->ep_desc[ii];
  216. usb_display_ep_desc(epdesc);
  217. }
  218. }
  219. printf("\n");
  220. }
  221. /* shows the device tree recursively */
  222. void usb_show_tree_graph(struct usb_device *dev,char *pre)
  223. {
  224. int i,index;
  225. int has_child,last_child,port;
  226. index=strlen(pre);
  227. printf(" %s",pre);
  228. /* check if the device has connected children */
  229. has_child=0;
  230. for(i=0;i<dev->maxchild;i++) {
  231. if (dev->children[i]!=NULL)
  232. has_child=1;
  233. }
  234. /* check if we are the last one */
  235. last_child=1;
  236. if (dev->parent!=NULL) {
  237. for(i=0;i<dev->parent->maxchild;i++) {
  238. /* search for children */
  239. if (dev->parent->children[i]==dev) {
  240. /* found our pointer, see if we have a little sister */
  241. port=i;
  242. while(i++<dev->parent->maxchild) {
  243. if (dev->parent->children[i]!=NULL) {
  244. /* found a sister */
  245. last_child=0;
  246. break;
  247. } /* if */
  248. } /* while */
  249. } /* device found */
  250. } /* for all children of the parent */
  251. printf("\b+-");
  252. /* correct last child */
  253. if (last_child) {
  254. pre[index-1]=' ';
  255. }
  256. } /* if not root hub */
  257. else
  258. printf(" ");
  259. printf("%d ",dev->devnum);
  260. pre[index++]=' ';
  261. pre[index++]= has_child ? '|' : ' ';
  262. pre[index]=0;
  263. printf(" %s (%s, %dmA)\n",usb_get_class_desc(dev->config.if_desc[0].bInterfaceClass),
  264. dev->slow ? "1.5MBit/s" : "12MBit/s",dev->config.MaxPower * 2);
  265. if (strlen(dev->mf) ||
  266. strlen(dev->prod) ||
  267. strlen(dev->serial))
  268. printf(" %s %s %s %s\n",pre,dev->mf,dev->prod,dev->serial);
  269. printf(" %s\n",pre);
  270. if (dev->maxchild>0) {
  271. for(i=0;i<dev->maxchild;i++) {
  272. if (dev->children[i]!=NULL) {
  273. usb_show_tree_graph(dev->children[i],pre);
  274. pre[index]=0;
  275. }
  276. }
  277. }
  278. }
  279. /* main routine for the tree command */
  280. void usb_show_tree(struct usb_device *dev)
  281. {
  282. char preamble[32];
  283. memset(preamble,0,32);
  284. usb_show_tree_graph(dev,&preamble[0]);
  285. }
  286. /******************************************************************************
  287. * usb boot command intepreter. Derived from diskboot
  288. */
  289. #ifdef CONFIG_USB_STORAGE
  290. int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
  291. {
  292. char *boot_device = NULL;
  293. char *ep;
  294. int dev, part=1, rcode;
  295. ulong addr, cnt, checksum;
  296. disk_partition_t info;
  297. image_header_t *hdr;
  298. block_dev_desc_t *stor_dev;
  299. switch (argc) {
  300. case 1:
  301. addr = CFG_LOAD_ADDR;
  302. boot_device = getenv ("bootdevice");
  303. break;
  304. case 2:
  305. addr = simple_strtoul(argv[1], NULL, 16);
  306. boot_device = getenv ("bootdevice");
  307. break;
  308. case 3:
  309. addr = simple_strtoul(argv[1], NULL, 16);
  310. boot_device = argv[2];
  311. break;
  312. default:
  313. printf ("Usage:\n%s\n", cmdtp->usage);
  314. return 1;
  315. }
  316. if (!boot_device) {
  317. puts ("\n** No boot device **\n");
  318. return 1;
  319. }
  320. dev = simple_strtoul(boot_device, &ep, 16);
  321. stor_dev=usb_stor_get_dev(dev);
  322. if (stor_dev->type == DEV_TYPE_UNKNOWN) {
  323. printf ("\n** Device %d not available\n", dev);
  324. return 1;
  325. }
  326. if (stor_dev->block_read==NULL) {
  327. printf("storage device not initialized. Use usb scan\n");
  328. return 1;
  329. }
  330. if (*ep) {
  331. if (*ep != ':') {
  332. puts ("\n** Invalid boot device, use `dev[:part]' **\n");
  333. return 1;
  334. }
  335. part = simple_strtoul(++ep, NULL, 16);
  336. }
  337. if (get_partition_info (stor_dev, part, &info)) {
  338. /* try to boot raw .... */
  339. strncpy(&info.type[0], BOOT_PART_TYPE, sizeof(BOOT_PART_TYPE));
  340. strncpy(&info.name[0], "Raw", 4);
  341. info.start=0;
  342. info.blksz=0x200;
  343. info.size=2880;
  344. printf("error reading partinfo...try to boot raw\n");
  345. }
  346. if ((strncmp(info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) &&
  347. (strncmp(info.type, BOOT_PART_COMP, sizeof(info.type)) != 0)) {
  348. printf ("\n** Invalid partition type \"%.32s\""
  349. " (expect \"" BOOT_PART_TYPE "\")\n",
  350. info.type);
  351. return 1;
  352. }
  353. printf ("\nLoading from USB device %d, partition %d: "
  354. "Name: %.32s Type: %.32s\n",
  355. dev, part, info.name, info.type);
  356. debug ("First Block: %ld, # of blocks: %ld, Block Size: %ld\n",
  357. info.start, info.size, info.blksz);
  358. if (stor_dev->block_read(dev, info.start, 1, (ulong *)addr) != 1) {
  359. printf ("** Read error on %d:%d\n", dev, part);
  360. return 1;
  361. }
  362. hdr = (image_header_t *)addr;
  363. if (ntohl(hdr->ih_magic) != IH_MAGIC) {
  364. printf("\n** Bad Magic Number **\n");
  365. return 1;
  366. }
  367. checksum = ntohl(hdr->ih_hcrc);
  368. hdr->ih_hcrc = 0;
  369. if (crc32 (0, (char *)hdr, sizeof(image_header_t)) != checksum) {
  370. puts ("\n** Bad Header Checksum **\n");
  371. return 1;
  372. }
  373. hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */
  374. print_image_hdr (hdr);
  375. cnt = (ntohl(hdr->ih_size) + sizeof(image_header_t));
  376. cnt += info.blksz - 1;
  377. cnt /= info.blksz;
  378. cnt -= 1;
  379. if (stor_dev->block_read (dev, info.start+1, cnt,
  380. (ulong *)(addr+info.blksz)) != cnt) {
  381. printf ("\n** Read error on %d:%d\n", dev, part);
  382. return 1;
  383. }
  384. /* Loading ok, update default load address */
  385. load_addr = addr;
  386. flush_cache (addr, (cnt+1)*info.blksz);
  387. /* Check if we should attempt an auto-start */
  388. if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) {
  389. char *local_args[2];
  390. extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
  391. local_args[0] = argv[0];
  392. local_args[1] = NULL;
  393. printf ("Automatic boot of image at addr 0x%08lX ...\n", addr);
  394. rcode=do_bootm (cmdtp, 0, 1, local_args);
  395. return rcode;
  396. }
  397. return 0;
  398. }
  399. #endif /* CONFIG_USB_STORAGE */
  400. /*********************************************************************************
  401. * usb command intepreter
  402. */
  403. int do_usb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
  404. {
  405. int i;
  406. struct usb_device *dev = NULL;
  407. #ifdef CONFIG_USB_STORAGE
  408. block_dev_desc_t *stor_dev;
  409. #endif
  410. if ((strncmp(argv[1],"reset",5) == 0) ||
  411. (strncmp(argv[1],"start",5) == 0)){
  412. usb_stop();
  413. printf("(Re)start USB...\n");
  414. usb_init();
  415. return 0;
  416. }
  417. if (strncmp(argv[1],"stop",4) == 0) {
  418. #ifdef CONFIG_USB_KEYBOARD
  419. if (argc==2) {
  420. if (usb_kbd_deregister()!=0) {
  421. printf("USB not stopped: usbkbd still using USB\n");
  422. return 1;
  423. }
  424. }
  425. else { /* forced stop, switch console in to serial */
  426. console_assign(stdin,"serial");
  427. usb_kbd_deregister();
  428. }
  429. #endif
  430. printf("stopping USB..\n");
  431. usb_stop();
  432. return 0;
  433. }
  434. if (strncmp(argv[1],"tree",4) == 0) {
  435. printf("\nDevice Tree:\n");
  436. usb_show_tree(usb_get_dev_index(0));
  437. return 0;
  438. }
  439. if (strncmp(argv[1],"inf",3) == 0) {
  440. int d;
  441. if (argc==2) {
  442. for(d=0;d<USB_MAX_DEVICE;d++) {
  443. dev=usb_get_dev_index(d);
  444. if (dev==NULL)
  445. break;
  446. usb_display_desc(dev);
  447. usb_display_config(dev);
  448. }
  449. return 0;
  450. }
  451. else {
  452. int d;
  453. i=simple_strtoul(argv[2], NULL, 16);
  454. printf("config for device %d\n",i);
  455. for(d=0;d<USB_MAX_DEVICE;d++) {
  456. dev=usb_get_dev_index(d);
  457. if (dev==NULL)
  458. break;
  459. if (dev->devnum==i)
  460. break;
  461. }
  462. if (dev==NULL) {
  463. printf("*** NO Device avaiable ***\n");
  464. return 0;
  465. }
  466. else {
  467. usb_display_desc(dev);
  468. usb_display_config(dev);
  469. }
  470. }
  471. return 0;
  472. }
  473. #ifdef CONFIG_USB_STORAGE
  474. if (strncmp(argv[1],"scan",4) == 0) {
  475. printf("Scan for storage device:\n");
  476. usb_stor_curr_dev=usb_stor_scan(1);
  477. if (usb_stor_curr_dev==-1) {
  478. printf("No device found. Not initialized?\n");
  479. return 1;
  480. }
  481. return 0;
  482. }
  483. if (strncmp(argv[1],"part",4) == 0) {
  484. int devno, ok;
  485. for (ok=0, devno=0; devno<USB_MAX_STOR_DEV; ++devno) {
  486. stor_dev=usb_stor_get_dev(devno);
  487. if (stor_dev->type!=DEV_TYPE_UNKNOWN) {
  488. ok++;
  489. if (devno)
  490. printf("\n");
  491. printf("print_part of %x\n",devno);
  492. print_part(stor_dev);
  493. }
  494. }
  495. if (!ok) {
  496. printf("\nno USB devices available\n");
  497. return 1;
  498. }
  499. return 0;
  500. }
  501. if (strcmp(argv[1],"read") == 0) {
  502. if (usb_stor_curr_dev<0) {
  503. printf("no current device selected\n");
  504. return 1;
  505. }
  506. if (argc==5) {
  507. unsigned long addr = simple_strtoul(argv[2], NULL, 16);
  508. unsigned long blk = simple_strtoul(argv[3], NULL, 16);
  509. unsigned long cnt = simple_strtoul(argv[4], NULL, 16);
  510. unsigned long n;
  511. printf ("\nUSB read: device %d block # %ld, count %ld ... ",
  512. usb_stor_curr_dev, blk, cnt);
  513. stor_dev=usb_stor_get_dev(usb_stor_curr_dev);
  514. n = stor_dev->block_read(usb_stor_curr_dev, blk, cnt, (ulong *)addr);
  515. printf ("%ld blocks read: %s\n",n,(n==cnt) ? "OK" : "ERROR");
  516. if (n==cnt)
  517. return 0;
  518. return 1;
  519. }
  520. }
  521. if (strcmp(argv[1],"dev") == 0) {
  522. if (argc==3) {
  523. int dev = (int)simple_strtoul(argv[2], NULL, 10);
  524. printf ("\nUSB device %d: ", dev);
  525. if (dev >= USB_MAX_STOR_DEV) {
  526. printf("unknown device\n");
  527. return 1;
  528. }
  529. printf ("\n Device %d: ", dev);
  530. stor_dev=usb_stor_get_dev(dev);
  531. dev_print(stor_dev);
  532. if (stor_dev->type == DEV_TYPE_UNKNOWN) {
  533. return 1;
  534. }
  535. usb_stor_curr_dev = dev;
  536. printf("... is now current device\n");
  537. return 0;
  538. }
  539. else {
  540. printf ("\nUSB device %d: ", usb_stor_curr_dev);
  541. stor_dev=usb_stor_get_dev(usb_stor_curr_dev);
  542. dev_print(stor_dev);
  543. if (stor_dev->type == DEV_TYPE_UNKNOWN) {
  544. return 1;
  545. }
  546. return 0;
  547. }
  548. return 0;
  549. }
  550. #endif /* CONFIG_USB_STORAGE */
  551. printf ("Usage:\n%s\n", cmdtp->usage);
  552. return 1;
  553. }
  554. #endif /* (CONFIG_COMMANDS & CFG_CMD_USB) */
  555. #if (CONFIG_COMMANDS & CFG_CMD_USB)
  556. #ifdef CONFIG_USB_STORAGE
  557. U_BOOT_CMD(
  558. usb, 5, 1, do_usb,
  559. "usb - USB sub-system\n",
  560. "reset - reset (rescan) USB controller\n"
  561. "usb stop [f] - stop USB [f]=force stop\n"
  562. "usb tree - show USB device tree\n"
  563. "usb info [dev] - show available USB devices\n"
  564. "usb scan - (re-)scan USB bus for storage devices\n"
  565. "usb device [dev] - show or set current USB storage device\n"
  566. "usb part [dev] - print partition table of one or all USB storage devices\n"
  567. "usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'\n"
  568. " to memory address `addr'\n"
  569. );
  570. U_BOOT_CMD(
  571. usbboot, 3, 1, do_usbboot,
  572. "usbboot - boot from USB device\n",
  573. "loadAddr dev:part\n"
  574. );
  575. #else
  576. U_BOOT_CMD(
  577. usb, 5, 1, do_usb,
  578. "usb - USB sub-system\n",
  579. "reset - reset (rescan) USB controller\n"
  580. "usb tree - show USB device tree\n"
  581. "usb info [dev] - show available USB devices\n"
  582. );
  583. #endif
  584. #endif