Avoid using the name "pid_t", which is used on unixoid systems.

Move controller specific data structures into private headers,
to avoid conflicts between controller drivers.
Factor out the USB PID ids, which are only exposed on UHCI. It's
of not much use on the other controllers.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5616 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Patrick Georgi
2010-06-07 13:58:17 +00:00
parent aed992054f
commit d78691d49d
5 changed files with 137 additions and 96 deletions

View File

@ -80,14 +80,14 @@ typedef struct usbdev_hc hci_t;
struct usbdev;
typedef struct usbdev usbdev_t;
typedef enum { SETUP = 0x2d, IN = 0x69, OUT = 0xe1 } pid_t;
typedef enum { SETUP, IN, OUT } direction_t;
typedef enum { CONTROL = 0, ISOCHRONOUS = 1, BULK = 2, INTERRUPT = 3
} endpoint_type;
typedef struct {
usbdev_t *dev;
int endpoint;
pid_t direction;
direction_t direction;
int toggle;
int maxpacketsize;
endpoint_type type;
@ -121,7 +121,7 @@ struct usbdev_hc {
void (*reset) (hci_t *controller);
void (*shutdown) (hci_t *controller);
int (*bulk) (endpoint_t *ep, int size, u8 *data, int finalize);
int (*control) (usbdev_t *dev, pid_t pid, int dr_length,
int (*control) (usbdev_t *dev, direction_t pid, int dr_length,
void *devreq, int data_length, u8 *data);
void* (*create_intr_queue) (endpoint_t *ep, int reqsize, int reqcount, int reqtiming);
void (*destroy_intr_queue) (endpoint_t *ep, void *queue);