Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /* arch/arm/plat-samsung/include/plat/usb-control.h
0003  *
0004  * Copyright (c) 2004 Simtec Electronics
0005  *  Ben Dooks <ben@simtec.co.uk>
0006  *
0007  * S3C - USB host port information
0008 */
0009 
0010 #ifndef __ASM_ARCH_USBCONTROL_H
0011 #define __ASM_ARCH_USBCONTROL_H
0012 
0013 #define S3C_HCDFLG_USED (1)
0014 
0015 struct s3c2410_hcd_port {
0016     unsigned char   flags;
0017     unsigned char   power;
0018     unsigned char   oc_status;
0019     unsigned char   oc_changed;
0020 };
0021 
0022 struct s3c2410_hcd_info {
0023     struct usb_hcd      *hcd;
0024     struct s3c2410_hcd_port port[2];
0025 
0026     void        (*power_control)(int port, int to);
0027     void        (*enable_oc)(struct s3c2410_hcd_info *, int on);
0028     void        (*report_oc)(struct s3c2410_hcd_info *, int ports);
0029 };
0030 
0031 static inline void s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports)
0032 {
0033     if (info->report_oc != NULL) {
0034         (info->report_oc)(info, ports);
0035     }
0036 }
0037 
0038 extern void s3c_ohci_set_platdata(struct s3c2410_hcd_info *info);
0039 
0040 #endif /*__ASM_ARCH_USBCONTROL_H */