aboutsummaryrefslogtreecommitdiff
path: root/src/usb-ohci.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-02-26 08:57:13 -0500
committerKevin O'Connor <kevin@koconnor.net>2010-02-28 17:26:25 -0500
commit357bdfa26a681d614f04e842f85850fe5848f6fe (patch)
tree3b992d2b421d990cf3fe41ed5401826e3015bdf1 /src/usb-ohci.h
parent7fb8ba866e112491feb64b2cf82b762fd9071f89 (diff)
downloadseabios-hppa-357bdfa26a681d614f04e842f85850fe5848f6fe.zip
seabios-hppa-357bdfa26a681d614f04e842f85850fe5848f6fe.tar.gz
seabios-hppa-357bdfa26a681d614f04e842f85850fe5848f6fe.tar.bz2
Prefer passing a USB "pipe" structure over a USB endp encoding.
Instead of passing the "u32 endp" encoding of the usb endpoint, allocate a "struct usb_pipe" for each end point and pass that. Allocate a control pipe for every device found. Support freeing the pipes after they are done. Implement pipe allocation and freeing for both UHCI and OHCI controllers. Also, don't define every UHCI qh to include a pipe - create a separate structure "struct uhci_pipe". Also, be sure to clear the USBControllers on reset. Also, convert usb_hub_init to return 0 on success. Also, cleanup some of the USB debug messages to make them more consistent.
Diffstat (limited to 'src/usb-ohci.h')
-rw-r--r--src/usb-ohci.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/usb-ohci.h b/src/usb-ohci.h
index 7ff84f6..fadd396 100644
--- a/src/usb-ohci.h
+++ b/src/usb-ohci.h
@@ -4,7 +4,10 @@
// usb-ohci.c
struct usb_s;
void ohci_init(void *data);
-int ohci_control(u32 endp, int dir, const void *cmd, int cmdsize
+struct usb_pipe;
+void ohci_free_pipe(struct usb_pipe *p);
+struct usb_pipe *ohci_alloc_control_pipe(u32 endp);
+int ohci_control(struct usb_pipe *p, int dir, const void *cmd, int cmdsize
, void *data, int datasize);
struct usb_pipe *ohci_alloc_intr_pipe(u32 endp, int frameexp);
int ohci_poll_intr(struct usb_pipe *pipe, void *data);
@@ -94,6 +97,7 @@ struct ohci_regs {
#define OHCI_CTRL_CBSR (3 << 0)
#define OHCI_CTRL_PLE (1 << 2)
#define OHCI_CTRL_CLE (1 << 4)
+#define OHCI_CTRL_BLE (1 << 5)
#define OHCI_CTRL_HCFS (3 << 6)
# define OHCI_USB_RESET (0 << 6)
# define OHCI_USB_OPER (2 << 6)