Back to home page

OSCL-LXR

 
 

    


0001 ========================
0002 S3C24XX USB Host support
0003 ========================
0004 
0005 
0006 
0007 Introduction
0008 ------------
0009 
0010   This document details the S3C2410/S3C2440 in-built OHCI USB host support.
0011 
0012 Configuration
0013 -------------
0014 
0015   Enable at least the following kernel options:
0016 
0017   menuconfig::
0018 
0019    Device Drivers  --->
0020      USB support  --->
0021        <*> Support for Host-side USB
0022        <*>   OHCI HCD support
0023 
0024 
0025   .config:
0026 
0027     - CONFIG_USB
0028     - CONFIG_USB_OHCI_HCD
0029 
0030 
0031   Once these options are configured, the standard set of USB device
0032   drivers can be configured and used.
0033 
0034 
0035 Board Support
0036 -------------
0037 
0038   The driver attaches to a platform device, which will need to be
0039   added by the board specific support file in arch/arm/mach-s3c,
0040   such as mach-bast.c or mach-smdk2410.c
0041 
0042   The platform device's platform_data field is only needed if the
0043   board implements extra power control or over-current monitoring.
0044 
0045   The OHCI driver does not ensure the state of the S3C2410's MISCCTRL
0046   register, so if both ports are to be used for the host, then it is
0047   the board support file's responsibility to ensure that the second
0048   port is configured to be connected to the OHCI core.
0049 
0050 
0051 Platform Data
0052 -------------
0053 
0054   See include/linux/platform_data/usb-ohci-s3c2410.h for the
0055   descriptions of the platform device data. An implementation
0056   can be found in arch/arm/mach-s3c/simtec-usb.c .
0057 
0058   The `struct s3c2410_hcd_info` contains a pair of functions
0059   that get called to enable over-current detection, and to
0060   control the port power status.
0061 
0062   The ports are numbered 0 and 1.
0063 
0064   power_control:
0065     Called to enable or disable the power on the port.
0066 
0067   enable_oc:
0068     Called to enable or disable the over-current monitoring.
0069     This should claim or release the resources being used to
0070     check the power condition on the port, such as an IRQ.
0071 
0072   report_oc:
0073     The OHCI driver fills this field in for the over-current code
0074     to call when there is a change to the over-current state on
0075     an port. The ports argument is a bitmask of 1 bit per port,
0076     with bit X being 1 for an over-current on port X.
0077 
0078     The function s3c2410_usb_report_oc() has been provided to
0079     ensure this is called correctly.
0080 
0081   port[x]:
0082     This is struct describes each port, 0 or 1. The platform driver
0083     should set the flags field of each port to S3C_HCDFLG_USED if
0084     the port is enabled.
0085 
0086 
0087 
0088 Document Author
0089 ---------------
0090 
0091 Ben Dooks, Copyright 2005 Simtec Electronics