cmd_usb.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * (C) Copyright 2001
  3. * Denis Peter, MPL AG Switzerland
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. *
  23. */
  24. #ifndef _CMD_USB_H
  25. #define _CMD_USB_H
  26. #include <common.h>
  27. #include <command.h>
  28. #if (CONFIG_COMMANDS & CFG_CMD_USB)
  29. #ifdef CONFIG_USB_STORAGE
  30. #define CMD_TBL_USB MK_CMD_TBL_ENTRY( \
  31. "usb", 4, 5, 1, do_usb, \
  32. "usb - USB sub-system\n", \
  33. "reset - reset (rescan) USB controller\n" \
  34. "usb stop [f] - stop USB [f]=force stop\n" \
  35. "usb tree - show USB device tree\n" \
  36. "usb info [dev] - show available USB devices\n" \
  37. "usb scan - (re-)scan USB bus for storage devices\n" \
  38. "usb device [dev] - show or set current USB storage device\n" \
  39. "usb part [dev] - print partition table of one or all USB storage devices\n" \
  40. "usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'\n"\
  41. " to memory address `addr'\n" \
  42. ),
  43. #define CMD_TBL_USBBOOT MK_CMD_TBL_ENTRY( \
  44. "usbboot", 5, 3, 1, do_usbboot, \
  45. "usbboot - boot from USB device\n", \
  46. "loadAddr dev:part\n" \
  47. ),
  48. #else
  49. #define CMD_TBL_USB MK_CMD_TBL_ENTRY( \
  50. "usb", 4, 5, 1, do_usb, \
  51. "usb - USB sub-system\n", \
  52. "reset - reset (rescan) USB controller\n" \
  53. "usb tree - show USB device tree\n" \
  54. "usb info [dev] - show available USB devices\n" \
  55. ),
  56. #define CMD_TBL_USBBOOT
  57. #endif
  58. int do_usb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  59. int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  60. #else
  61. #define CMD_TBL_USB
  62. #define CMD_TBL_USBBOOT
  63. #endif
  64. #endif /* _CMD_USB_H */