Much USB code for ARM USB support

Written by JP Embedded.

Host controller (HCD), mass storage, and hub drivers.

Change-Id: I4237cf7aeb4a1c0205a1876593a9cc67ef3d577e
This commit is contained in:
Wojciech Zajac
2014-06-26 14:05:41 +02:00
committed by Ben Gras
parent bad58c9c51
commit 2d64210c1d
41 changed files with 2905 additions and 427 deletions

View File

@@ -78,12 +78,23 @@ struct ddekit_usb_urb {
void *ddekit_priv;
};
/* USB message types */
typedef enum {
DDEKIT_HUB_PORT_LS_CONN, /* Low speed device connected */
DDEKIT_HUB_PORT_FS_CONN, /* Full speed device connected */
DDEKIT_HUB_PORT_HS_CONN, /* High speed device connected */
DDEKIT_HUB_PORT_DISCONN /* Device disconnected */
}
ddekit_msg_type_t;
int ddekit_usb_dev_set_data(struct ddekit_usb_dev *dev, void *data);
void *ddekit_usb_dev_get_data(struct ddekit_usb_dev *dev);
void ddekit_usb_get_device_id(struct ddekit_usb_dev *dev, struct
ddekit_usb_device_id *id);
int ddekit_usb_submit_urb(struct ddekit_usb_urb *d_urb);
int ddekit_usb_cancle_urb(struct ddekit_usb_urb *d_urb);
long ddekit_usb_info(struct ddekit_usb_dev *, long, long);
/*
* This one is only implemented for the client side. For the server side is

View File

@@ -775,7 +775,8 @@
#define USB_RQ_DEINIT (USB_BASE + 1) /* Quit the session */
#define USB_RQ_SEND_URB (USB_BASE + 2) /* Send URB */
#define USB_RQ_CANCEL_URB (USB_BASE + 3) /* Cancel URB */
#define USB_REPLY (USB_BASE + 4)
#define USB_RQ_SEND_INFO (USB_BASE + 4) /* Sends various information */
#define USB_REPLY (USB_BASE + 5)
/* those are from USBD to driver */
@@ -793,6 +794,9 @@
# define USB_INTERFACES m4_l3
# define USB_RB_INIT_NAME m3_ca1
# define USB_INFO_TYPE m4_l1
# define USB_INFO_VALUE m4_l2
/*===========================================================================*
* Messages for DeviceManager (s/t like SysFS) *
*===========================================================================*/

View File

@@ -152,4 +152,7 @@ int usb_init(char *name);
/** This functions handles a message from the HCD */
int usb_handle_msg(struct usb_driver *ubd, message *msg);
/** Lets device driver send HCD various information */
int usb_send_info(long, long);
#endif /* _MINIX_USB_H */