USB-Host.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. S3C24XX USB Host support
  2. ========================
  3. Introduction
  4. ------------
  5. This document details the S3C2410/S3C2440 in-built OHCI USB host support.
  6. Configuration
  7. -------------
  8. Enable at least the following kernel options:
  9. menuconfig:
  10. Device Drivers --->
  11. USB support --->
  12. <*> Support for Host-side USB
  13. <*> OHCI HCD support
  14. .config:
  15. CONFIG_USB
  16. CONFIG_USB_OHCI_HCD
  17. Once these options are configured, the standard set of USB device
  18. drivers can be configured and used.
  19. Board Support
  20. -------------
  21. The driver attaches to a platform device, which will need to be
  22. added by the board specific support file in linux/arch/arm/mach-s3c2410,
  23. such as mach-bast.c or mach-smdk2410.c
  24. The platform device's platform_data field is only needed if the
  25. board implements extra power control or over-current monitoring.
  26. The OHCI driver does not ensure the state of the S3C2410's MISCCTRL
  27. register, so if both ports are to be used for the host, then it is
  28. the board support file's responsibility to ensure that the second
  29. port is configured to be connected to the OHCI core.
  30. Platform Data
  31. -------------
  32. See arch/arm/mach-s3c2410/include/mach/usb-control.h for the
  33. descriptions of the platform device data. An implementation
  34. can be found in linux/arch/arm/mach-s3c2410/usb-simtec.c .
  35. The `struct s3c2410_hcd_info` contains a pair of functions
  36. that get called to enable over-current detection, and to
  37. control the port power status.
  38. The ports are numbered 0 and 1.
  39. power_control:
  40. Called to enable or disable the power on the port.
  41. enable_oc:
  42. Called to enable or disable the over-current monitoring.
  43. This should claim or release the resources being used to
  44. check the power condition on the port, such as an IRQ.
  45. report_oc:
  46. The OHCI driver fills this field in for the over-current code
  47. to call when there is a change to the over-current state on
  48. an port. The ports argument is a bitmask of 1 bit per port,
  49. with bit X being 1 for an over-current on port X.
  50. The function s3c2410_usb_report_oc() has been provided to
  51. ensure this is called correctly.
  52. port[x]:
  53. This is struct describes each port, 0 or 1. The platform driver
  54. should set the flags field of each port to S3C_HCDFLG_USED if
  55. the port is enabled.
  56. Document Author
  57. ---------------
  58. Ben Dooks, Copyright 2005 Simtec Electronics