summaryrefslogtreecommitdiff
path: root/drivers/usb_ohci.h
diff options
context:
space:
mode:
authorMarkus Klotzbuecher <mk@denx.de>2006-11-27 11:43:09 +0100
committerMarkus Klotzbuecher <mk@pollux.denx.de>2006-11-27 11:43:09 +0100
commit53e336e9ffc51035bdc4e5867631b3378761b4df (patch)
tree77756a70bf7c5628bc5667da15abb97b396810a0 /drivers/usb_ohci.h
parent98280e3d431db77d92219438b8840853bd7cb412 (diff)
downloadu-boot-imx-53e336e9ffc51035bdc4e5867631b3378761b4df.zip
u-boot-imx-53e336e9ffc51035bdc4e5867631b3378761b4df.tar.gz
u-boot-imx-53e336e9ffc51035bdc4e5867631b3378761b4df.tar.bz2
Modified the mpc5xxx and the ppc4xx cpu to use the generic OHCI driver
and adapted board configs TQM5200 and yosemite accordingly. This commit also makes the maximum number of root hub ports configurable (CFG_USB_OHCI_MAX_ROOT_PORTS).
Diffstat (limited to 'drivers/usb_ohci.h')
-rw-r--r--drivers/usb_ohci.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/usb_ohci.h b/drivers/usb_ohci.h
index 68dd4ec..95fbc44 100644
--- a/drivers/usb_ohci.h
+++ b/drivers/usb_ohci.h
@@ -113,7 +113,9 @@ struct td {
__u32 hwNextTD; /* Next TD Pointer */
__u32 hwBE; /* Memory Buffer End Pointer */
+/* #ifndef CONFIG_MPC5200 /\* this seems wrong *\/ */
__u16 hwPSW[MAXPSW];
+/* #endif */
__u8 unused;
__u8 index;
struct ed *ed;
@@ -137,8 +139,13 @@ typedef struct td td_t;
#define NUM_INTS 32 /* part of the OHCI standard */
struct ohci_hcca {
__u32 int_table[NUM_INTS]; /* Interrupt ED table */
+#if defined(CONFIG_MPC5200)
+ __u16 pad1; /* set to 0 on each frame_no change */
+ __u16 frame_no; /* current frame number */
+#else
__u16 frame_no; /* current frame number */
__u16 pad1; /* set to 0 on each frame_no change */
+#endif
__u32 done_head; /* info returned for an interrupt */
u8 reserved_for_hc[116];
} __attribute((aligned(256)));
@@ -147,7 +154,9 @@ struct ohci_hcca {
/*
* Maximum number of root hub ports.
*/
-#define MAX_ROOT_PORTS 3 /* maximum OHCI root hub ports */
+#ifndef CFG_USB_OHCI_MAX_ROOT_PORTS
+# error "CFG_USB_OHCI_MAX_ROOT_PORTS undefined!"
+#endif
/*
* This is the structure of the OHCI controller's memory mapped I/O
@@ -181,7 +190,7 @@ struct ohci_regs {
__u32 a;
__u32 b;
__u32 status;
- __u32 portstatus[MAX_ROOT_PORTS];
+ __u32 portstatus[CFG_USB_OHCI_MAX_ROOT_PORTS];
} roothub;
} __attribute((aligned(32)));