usb-host.rst 2.4 KB

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