grml...
[seabios.git] / src / usb-uhci.h
index b284fcc98738b480d413e602c50329dcd821d901..b5f70f77ba7f617ba4f92ad57c036c5d5e2e9a45 100644 (file)
@@ -1,15 +1,17 @@
 #ifndef __USB_UHCI_H
 #define __USB_UHCI_H
 
-#include "usb.h" // struct usb_pipe
-
 // usb-uhci.c
-struct usb_s;
-int uhci_init(struct usb_s *cntl);
-int uhci_control(u32 endp, int dir, const void *cmd, int cmdsize
+void uhci_init(struct pci_device *pci, int busid);
+struct usb_pipe;
+void uhci_free_pipe(struct usb_pipe *p);
+struct usb_pipe *uhci_alloc_control_pipe(struct usb_pipe *dummy);
+int uhci_control(struct usb_pipe *p, int dir, const void *cmd, int cmdsize
                  , void *data, int datasize);
-struct usb_pipe *uhci_alloc_intr_pipe(u32 endp, int period);
-int uhci_poll_intr(struct usb_pipe *pipe, void *data);
+struct usb_pipe *uhci_alloc_bulk_pipe(struct usb_pipe *dummy);
+int uhci_send_bulk(struct usb_pipe *p, int dir, void *data, int datasize);
+struct usb_pipe *uhci_alloc_intr_pipe(struct usb_pipe *dummy, int frameexp);
+int uhci_poll_intr(struct usb_pipe *p, void *data);
 
 
 /****************************************************************
@@ -88,7 +90,7 @@ struct uhci_framelist {
 #define TD_CTRL_ACTLEN_MASK     0x7FF   /* actual length, encoded as n - 1 */
 
 #define TD_CTRL_ANY_ERROR       (TD_CTRL_STALLED | TD_CTRL_DBUFERR | \
-                                 TD_CTRL_BABBLE | TD_CTRL_CRCTIME | \
+                                 TD_CTRL_BABBLE | TD_CTRL_CRCTIMEO | \
                                  TD_CTRL_BITSTUFF)
 #define uhci_maxerr(err)                ((err) << TD_CTRL_C_ERR_SHIFT)
 
@@ -110,18 +112,11 @@ struct uhci_td {
     u32 status;
     u32 token;
     void *buffer;
-
-    // Software fields
-    u32 data[4];
 } PACKED;
 
 struct uhci_qh {
     u32 link;
     u32 element;
-
-    // Software fields
-    struct uhci_td *next_td;
-    struct usb_pipe pipe;
 } PACKED;
 
 #define UHCI_PTR_BITS           0x000F