X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fusb.h;h=36fde59fe7e0489185efca730ef2a7e77351b23d;hb=59f02834f38c63be537f63a702c69b68af913bfa;hp=e8d74553403a4f5731a6b78732e29a52dc67706a;hpb=91031edcb2a6adf2510478bc81a4df68c5e3daf2;p=seabios.git diff --git a/src/usb.h b/src/usb.h index e8d7455..36fde59 100644 --- a/src/usb.h +++ b/src/usb.h @@ -4,14 +4,30 @@ // 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; + } 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 @@ -20,8 +36,8 @@ 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); /****************************************************************