summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/IceCube.h9
-rw-r--r--include/configs/TQM5200.h9
-rw-r--r--include/configs/delta.h3
-rw-r--r--include/configs/mp2usb.h3
-rw-r--r--include/configs/trab.h3
-rw-r--r--include/configs/yosemite.h8
-rw-r--r--include/usb.h17
7 files changed, 39 insertions, 13 deletions
diff --git a/include/configs/IceCube.h b/include/configs/IceCube.h
index 1152f838d9..8753b9ff6f 100644
--- a/include/configs/IceCube.h
+++ b/include/configs/IceCube.h
@@ -94,9 +94,16 @@
/* USB */
#if 1
-#define CONFIG_USB_OHCI
+#define CONFIG_USB_OHCI_NEW
#define ADD_USB_CMD CFG_CMD_USB | CFG_CMD_FAT
#define CONFIG_USB_STORAGE
+
+#undef CFG_USB_OHCI_BOARD_INIT
+#define CFG_USB_OHCI_CPU_INIT
+#define CFG_USB_OHCI_REGS_BASE MPC5XXX_USB
+#define CFG_USB_OHCI_SLOT_NAME "mpc5200"
+#define CFG_USB_OHCI_MAX_ROOT_PORTS 15
+
#else
#define ADD_USB_CMD 0
#endif
diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h
index 08674ca49f..2c34ce09bb 100644
--- a/include/configs/TQM5200.h
+++ b/include/configs/TQM5200.h
@@ -146,9 +146,16 @@
/* USB */
#if defined(CONFIG_STK52XX) || defined(CONFIG_FO300)
-#define CONFIG_USB_OHCI
+#define CONFIG_USB_OHCI_NEW
#define ADD_USB_CMD CFG_CMD_USB | CFG_CMD_FAT
#define CONFIG_USB_STORAGE
+
+#undef CFG_USB_OHCI_BOARD_INIT
+#define CFG_USB_OHCI_CPU_INIT
+#define CFG_USB_OHCI_REGS_BASE MPC5XXX_USB
+#define CFG_USB_OHCI_SLOT_NAME "mpc5200"
+#define CFG_USB_OHCI_MAX_ROOT_PORTS 15
+
#else
#define ADD_USB_CMD 0
#endif
diff --git a/include/configs/delta.h b/include/configs/delta.h
index fea821ab9a..4038f21960 100644
--- a/include/configs/delta.h
+++ b/include/configs/delta.h
@@ -103,7 +103,7 @@
#endif
/* USB */
-#define CONFIG_USB_OHCI 1
+#define CONFIG_USB_OHCI_NEW 1
#define CONFIG_USB_STORAGE 1
#define CONFIG_DOS_PARTITION 1
@@ -111,6 +111,7 @@
#define CFG_USB_OHCI_CPU_INIT 1
#define CFG_USB_OHCI_REGS_BASE OHCI_REGS_BASE
#define CFG_USB_OHCI_SLOT_NAME "delta"
+#define CFG_USB_OHCI_MAX_ROOT_PORTS 3
#define LITTLEENDIAN 1 /* used by usb_ohci.c */
diff --git a/include/configs/mp2usb.h b/include/configs/mp2usb.h
index edb20f8d88..2cf78a3b15 100644
--- a/include/configs/mp2usb.h
+++ b/include/configs/mp2usb.h
@@ -101,7 +101,7 @@
#undef CONFIG_MODEM_SUPPORT /* disable modem initialization stuff */
-#define CONFIG_USB_OHCI 1
+#define CONFIG_USB_OHCI_NEW 1
#define CONFIG_USB_KEYBOARD 1
#define CONFIG_USB_STORAGE 1
#define CONFIG_DOS_PARTITION 1
@@ -111,6 +111,7 @@
#define CFG_USB_OHCI_CPU_INIT 1
#define CFG_USB_OHCI_REGS_BASE AT91_USB_HOST_BASE
#define CFG_USB_OHCI_SLOT_NAME "at91rm9200"
+#define CFG_USB_OHCI_MAX_ROOT_PORTS 15
#undef CONFIG_HARD_I2C
diff --git a/include/configs/trab.h b/include/configs/trab.h
index ae979475b9..acf86d08ad 100644
--- a/include/configs/trab.h
+++ b/include/configs/trab.h
@@ -80,7 +80,7 @@
#define CFG_EEPROM_PAGE_WRITE_DELAY_MS 10
/* USB stuff */
-#define CONFIG_USB_OHCI 1
+#define CONFIG_USB_OHCI_NEW 1
#define CONFIG_USB_STORAGE 1
#define CONFIG_DOS_PARTITION 1
@@ -88,6 +88,7 @@
#define CFG_USB_OHCI_CPU_INIT 1
#define CFG_USB_OHCI_REGS_BASE S3C24X0_USB_HOST_BASE
#define CFG_USB_OHCI_SLOT_NAME "s3c2400"
+#define CFG_USB_OHCI_MAX_ROOT_PORTS 15
/*
* Size of malloc() pool
diff --git a/include/configs/yosemite.h b/include/configs/yosemite.h
index 3d7b4a2f4b..9f98500a6d 100644
--- a/include/configs/yosemite.h
+++ b/include/configs/yosemite.h
@@ -214,9 +214,15 @@
#ifdef CONFIG_440EP
/* USB */
-#define CONFIG_USB_OHCI
+#define CONFIG_USB_OHCI_NEW
#define CONFIG_USB_STORAGE
+#undef CFG_USB_OHCI_BOARD_INIT
+#define CFG_USB_OHCI_CPU_INIT 1
+#define CFG_USB_OHCI_REGS_BASE (CFG_PERIPHERAL_BASE | 0x1000)
+#define CFG_USB_OHCI_SLOT_NAME "ppc440"
+#define CFG_USB_OHCI_MAX_ROOT_PORTS 15
+
/*Comment this out to enable USB 1.1 device*/
#define USB_2_0_DEVICE
#endif /*CONFIG_440EP*/
diff --git a/include/usb.h b/include/usb.h
index bf71554041..419a7e364a 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -169,7 +169,7 @@ struct usb_device {
* this is how the lowlevel part communicate with the outer world
*/
-#if defined(CONFIG_USB_UHCI) || defined(CONFIG_USB_OHCI) || defined (CONFIG_USB_SL811HS)
+#if defined(CONFIG_USB_UHCI) || defined(CONFIG_USB_OHCI) || defined (CONFIG_USB_SL811HS) || defined(CONFIG_USB_OHCI_NEW)
int usb_lowlevel_init(void);
int usb_lowlevel_stop(void);
int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer,int transfer_len);
@@ -230,16 +230,12 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate);
/* big endian -> little endian conversion */
/* some CPUs are already little endian e.g. the ARM920T */
-#ifdef LITTLEENDIAN
-#define swap_16(x) ((unsigned short)(x))
-#define swap_32(x) ((unsigned long)(x))
-#else
-#define swap_16(x) \
+#define __swap_16(x) \
({ unsigned short x_ = (unsigned short)x; \
(unsigned short)( \
((x_ & 0x00FFU) << 8) | ((x_ & 0xFF00U) >> 8) ); \
})
-#define swap_32(x) \
+#define __swap_32(x) \
({ unsigned long x_ = (unsigned long)x; \
(unsigned long)( \
((x_ & 0x000000FFUL) << 24) | \
@@ -247,6 +243,13 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate);
((x_ & 0x00FF0000UL) >> 8) | \
((x_ & 0xFF000000UL) >> 24) ); \
})
+
+#ifdef LITTLEENDIAN
+# define swap_16(x) (x)
+# define swap_32(x) (x)
+#else
+# define swap_16(x) __swap_16(x)
+# define swap_32(x) __swap_32(x)
#endif /* LITTLEENDIAN */
/*