X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fusb.h;h=cc71c31a5de5a366c9dc23a245150b1105ffa094;hb=1ca05b0f393c0201c0e8efe87831edddb6a53532;hp=e8d74553403a4f5731a6b78732e29a52dc67706a;hpb=114592f000d5bc89b7d149e320a31ab209e20b41;p=seabios.git diff --git a/src/usb.h b/src/usb.h index e8d7455..cc71c31 100644 --- a/src/usb.h +++ b/src/usb.h @@ -4,24 +4,41 @@ // Local information for a usb controller. struct usb_s { - u16 bdf; - u16 iobase; + u8 type; u8 maxaddr; - void *qh; + u16 bdf; + + union { + struct { + u16 iobase; + void *qh; + } uhci; + struct { + struct ohci_regs *regs; + void *control_ed; + } ohci; + }; }; +#define USB_TYPE_UHCI 1 +#define USB_TYPE_OHCI 2 + extern struct usb_s USBControllers[]; +struct usb_pipe { + u32 endp; +}; + #define USB_MAXADDR 127 // usb.c -void usb_setup(); +void usb_setup(void); int configure_usb_device(struct usb_s *cntl, int lowspeed); struct usb_ctrlrequest; int send_default_control(u32 endp, const struct usb_ctrlrequest *req , void *data); -void *alloc_intr_pipe(u32 endp, int period); -int usb_poll_intr(void *pipe, void *data); +struct usb_pipe *alloc_intr_pipe(u32 endp, int period); +int usb_poll_intr(struct usb_pipe *pipe, void *data); /****************************************************************