diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-10-17 23:53:32 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-10-17 23:53:32 -0400 |
commit | 1c46a548f26cd28d478ae793e42bc1a82a977939 (patch) | |
tree | 04d3a295f4773e5169ea44a4e34329823bd95383 /src/usb-ohci.h | |
parent | 2f442fd566d683253cf23560867a34243c185550 (diff) | |
download | seabios-hppa-1c46a548f26cd28d478ae793e42bc1a82a977939.zip seabios-hppa-1c46a548f26cd28d478ae793e42bc1a82a977939.tar.gz seabios-hppa-1c46a548f26cd28d478ae793e42bc1a82a977939.tar.bz2 |
Expand USB OHCI support.
Get UHCI support to point where it works with (a modified) qemu.
Diffstat (limited to 'src/usb-ohci.h')
-rw-r--r-- | src/usb-ohci.h | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/src/usb-ohci.h b/src/usb-ohci.h index 9d13f8c..e5d2127 100644 --- a/src/usb-ohci.h +++ b/src/usb-ohci.h @@ -7,7 +7,7 @@ int ohci_init(struct usb_s *cntl); int ohci_control(u32 endp, int dir, const void *cmd, int cmdsize , void *data, int datasize); struct usb_pipe *ohci_alloc_intr_pipe(u32 endp, int period); -int ohci_poll_intr(void *pipe, void *data); +int ohci_poll_intr(struct usb_pipe *pipe, void *data); /**************************************************************** @@ -40,7 +40,6 @@ struct ohci_td { #define TD_CC 0xf0000000 #define TD_CC_GET(td_p) ((td_p >>28) & 0x0f) #define TD_DI 0x00E00000 -#define TD_DI_SET(X) (((X) & 0x07)<< 21) #define TD_DONE 0x00020000 #define TD_ISO 0x00010000 @@ -92,6 +91,48 @@ struct ohci_regs { u32 roothub_portstatus[15]; } PACKED; +#define OHCI_CTRL_CBSR (3 << 0) +#define OHCI_CTRL_PLE (1 << 2) +#define OHCI_CTRL_CLE (1 << 4) +#define OHCI_CTRL_HCFS (3 << 6) +# define OHCI_USB_RESET (0 << 6) +# define OHCI_USB_OPER (2 << 6) +#define OHCI_CTRL_RWC (1 << 9) + +#define OHCI_HCR (1 << 0) +#define OHCI_CLF (1 << 1) + #define OHCI_INTR_MIE (1 << 31) +#define RH_PS_CCS 0x00000001 +#define RH_PS_PES 0x00000002 +#define RH_PS_PSS 0x00000004 +#define RH_PS_POCI 0x00000008 +#define RH_PS_PRS 0x00000010 +#define RH_PS_PPS 0x00000100 +#define RH_PS_LSDA 0x00000200 +#define RH_PS_CSC 0x00010000 +#define RH_PS_PESC 0x00020000 +#define RH_PS_PSSC 0x00040000 +#define RH_PS_OCIC 0x00080000 +#define RH_PS_PRSC 0x00100000 + +#define RH_HS_LPS 0x00000001 +#define RH_HS_OCI 0x00000002 +#define RH_HS_DRWE 0x00008000 +#define RH_HS_LPSC 0x00010000 +#define RH_HS_OCIC 0x00020000 +#define RH_HS_CRWE 0x80000000 + +#define RH_B_DR 0x0000ffff +#define RH_B_PPCM 0xffff0000 + +#define RH_A_NDP (0xff << 0) +#define RH_A_PSM (1 << 8) +#define RH_A_NPS (1 << 9) +#define RH_A_DT (1 << 10) +#define RH_A_OCPM (1 << 11) +#define RH_A_NOCP (1 << 12) +#define RH_A_POTPGT (0xff << 24) + #endif // usb-ohci.h |