diff options
author | Zhang Wei <wei.zhang@freescale.com> | 2007-06-06 10:08:14 +0200 |
---|---|---|
committer | Markus Klotzbuecher <mk@pollux.denx.de> | 2007-06-06 10:08:14 +0200 |
commit | 4dae14ce8fbdf380017dc54f172218e7d2acc889 (patch) | |
tree | ced3af27f0cb09a8475906d3ea0b452c2dcd94af /drivers/usb_ohci.h | |
parent | fdcfaa1b02268b2899e374b35adf936c911a47eb (diff) | |
download | u-boot-imx-4dae14ce8fbdf380017dc54f172218e7d2acc889.zip u-boot-imx-4dae14ce8fbdf380017dc54f172218e7d2acc889.tar.gz u-boot-imx-4dae14ce8fbdf380017dc54f172218e7d2acc889.tar.bz2 |
USB PCI-OHCI, interrupt pipe and usb event poll support
This patch added USB PCI-OHCI chips support, interrupt pipe support
and usb event poll support. For supporting the USB interrupt pipe, the
globe urb_priv is moved to purb in ed struct. Now, we can process
several urbs at one time. The interrupt pipe support codes are ported
from Linux kernel 2.4.
Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Diffstat (limited to 'drivers/usb_ohci.h')
-rw-r--r-- | drivers/usb_ohci.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb_ohci.h b/drivers/usb_ohci.h index d2b03c0..380cb4c 100644 --- a/drivers/usb_ohci.h +++ b/drivers/usb_ohci.h @@ -64,7 +64,8 @@ struct ed { struct ed *ed_rm_list; struct usb_device *usb_dev; - __u32 unused[3]; + void *purb; + __u32 unused[2]; } __attribute((aligned(16))); typedef struct ed ed_t; @@ -349,9 +350,14 @@ typedef struct ed_t *ed; __u16 length; /* number of tds associated with this request */ __u16 td_cnt; /* number of tds already serviced */ + struct usb_device *dev; int state; unsigned long pipe; + void *transfer_buffer; + int transfer_buffer_length; + int interval; int actual_length; + int finished; td_t *td[N_URB_TD]; /* list pointer to all corresponding TDs associated with this request */ } urb_priv_t; #define URB_DEL 1 @@ -375,6 +381,7 @@ typedef struct ohci { struct ohci_regs *regs; /* OHCI controller's memory */ + int ohci_int_load[32]; /* load of the 32 Interrupt Chains (for load balancing)*/ ed_t *ed_rm_list[2]; /* lists of all endpoints to be removed */ ed_t *ed_bulktail; /* last endpoint of bulk list */ ed_t *ed_controltail; /* last endpoint of control list */ @@ -397,7 +404,8 @@ struct ohci_device { /* endpoint */ static int ep_link(ohci_t * ohci, ed_t * ed); static int ep_unlink(ohci_t * ohci, ed_t * ed); -static ed_t * ep_add_ed(struct usb_device * usb_dev, unsigned long pipe); +static ed_t * ep_add_ed(struct usb_device * usb_dev, unsigned long pipe, + int interval, int load); /*-------------------------------------------------------------------------*/ |