Skip to contentSkip to conversation

usb.h: use standard __LITTLE_ENDIAN from Linux headers

PATCH New Mike Frysinger 2 participants 5 messages Jan 1, 2009 – Jan 4, 2009 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb.h: use standard __LITTLE_ENDIAN from Linux headers

Rather than forcing people to define a custom "LITTLEENDIAN", just use the __LITTLE_ENDIAN one from the Linux byteorder headers that every arch is already setting up.

---
 common/usb_storage.c |    2 --
 include/usb.h        |    4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)
common/usb_storage.c +0 -2
index 94f659f..bb468aa 100644
@@ -45,8 +45,6 @@
  * New Note:
  * Support for USB Mass Storage Devices (BBB) has been added. It has
  * only been tested with USB memory sticks.
- * Nota bene: if you are using the BBB support with a little-endian
- * CPU then you MUST define LITTLEENDIAN in the configuration file!
  */
 
 
include/usb.h +2 -2
index 510df95..e7ede32 100644
@@ -263,13 +263,13 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate);
 		((x_ & 0xFF000000UL) >> 24)); \
 	})
 
-#ifdef LITTLEENDIAN
+#if __LITTLE_ENDIAN
 # 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 */
+#endif
 
 /*
  * Calling this entity a "pipe" is glorifying it. A USB pipe
Signature · 1 line
1.6.0.6
#1 lore raw

PATCH 1/1 usb.h: use standard __LITTLE_ENDIAN from Linux headers

Hello Mike,

2009/1/1 Mike Frysinger <[email protected]>:

Quoted 12 lines

Rather than forcing people to define a custom "LITTLEENDIAN", just use the __LITTLE_ENDIAN one from the Linux byteorder headers that every arch is already setting up.

 common/usb_storage.c |    2 --
 include/usb.h        |    4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)
common/usb_storage.c +0 -0
index 94f659f..bb468aa 100644

common/usb_storage.c line 48

Quoted 6 lines
common/usb_storage.c +0 -2
@@ -45,8 +45,6 @@
 * New Note:
 * Support for USB Mass Storage Devices (BBB) has been added. It has
 * only been tested with USB memory sticks.
- * Nota bene: if you are using the BBB support with a little-endian
- * CPU then you MUST define LITTLEENDIAN in the configuration file!
 */

There are a few more C-files (*usb_ohci.c) that has this comment, please remove them all.
Also clean up the config files that has this flag set. This flag seem to be set only for this reason.

include/usb.h int usb_set_interface(struct usb_device *dev, int interface, int alternate); · line 266

Quoted 11 lines
include/usb.h +1 -1
index 510df95..e7ede32 100644
@@ -263,13 +263,13 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate);
               ((x_ & 0xFF000000UL) >> 24)); \
       })
 
-#ifdef LITTLEENDIAN
+#if __LITTLE_ENDIAN

I would prefer '#if defined(__LITTLE_ENDIAN)'

Kind Regards,

Remy

Quoted 14 lines
include/usb.h +1 -2
 # 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 */
+#endif
 
 /*
 * Calling this entity a "pipe" is glorifying it. A USB pipe
--

1.6.0.6

#2 lore raw

PATCH 1/1 usb.h: use standard __LITTLE_ENDIAN from Linux headers

Quoted 8 lines · On Thursday 01 January 2009 05:22:46 Remy Bohmer wrote:

2009/1/1 Mike Frysinger <[email protected]>:

Quoted 7 lines

Rather than forcing people to define a custom "LITTLEENDIAN", just use the __LITTLE_ENDIAN one from the Linux byteorder headers that every arch is already setting up.

 common/usb_storage.c |    2 --
 include/usb.h        |    4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)
Quoted 16 lines

common/usb_storage.c line 48

Quoted 11 lines
common/usb_storage.c +0 -2
index 94f659f..bb468aa 100644
@@ -45,8 +45,6 @@
 * New Note:
 * Support for USB Mass Storage Devices (BBB) has been added. It has
 * only been tested with USB memory sticks.
- * Nota bene: if you are using the BBB support with a little-endian
- * CPU then you MUST define LITTLEENDIAN in the configuration file!
 */

There are a few more C-files (*usb_ohci.c) that has this comment, please remove them all.
Also clean up the config files that has this flag set. This flag seem to be set only for this reason.

i was avoiding touching non-common code as i dont have the hardware to test. but easy enough to change.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090101/8a077fae/attachment.pgp

#3 lore raw

PATCH v2 1/1 usb.h: use standard __LITTLE_ENDIAN from Linux headers

In reply to Remy Bohmer

Rather than forcing people to define a custom "LITTLEENDIAN", just use the __LITTLE_ENDIAN one from the Linux byteorder headers that every arch is already setting up.

---
v1
- convert more usb LITTLEENDIAN users

 common/usb_storage.c            |    2 --
 cpu/arm920t/s3c24x0/usb_ohci.c  |    4 +---
 cpu/mips/au1x00_usb_ohci.c      |    6 ++----
 include/configs/VCMA9.h         |    1 -
 include/configs/afeb9260.h      |    1 -
 include/configs/at91cap9adk.h   |    1 -
 include/configs/at91sam9260ek.h |    1 -
 include/configs/at91sam9261ek.h |    1 -
 include/configs/at91sam9263ek.h |    1 -
 include/configs/delta.h         |    2 --
 include/configs/mp2usb.h        |    1 -
 include/configs/sh7785lcr.h     |    1 -
 include/configs/smdk6400.h      |    1 -
 include/configs/trab.h          |    1 -
 include/configs/trizepsiv.h     |    2 --
 include/usb.h                   |    4 ++--
 16 files changed, 5 insertions(+), 25 deletions(-)
common/usb_storage.c +0 -2
index 94f659f..bb468aa 100644
@@ -45,8 +45,6 @@
  * New Note:
  * Support for USB Mass Storage Devices (BBB) has been added. It has
  * only been tested with USB memory sticks.
- * Nota bene: if you are using the BBB support with a little-endian
- * CPU then you MUST define LITTLEENDIAN in the configuration file!
  */
 
 
cpu/arm920t/s3c24x0/usb_ohci.c +1 -3
index 641f270..9cbd477 100644
@@ -29,9 +29,7 @@
  */
 /*
  * IMPORTANT NOTES
- * 1 - you MUST define LITTLEENDIAN in the configuration file for the
- *     board or this driver will NOT work!
- * 2 - this driver is intended for use with USB Mass Storage Devices
+ * 1 - this driver is intended for use with USB Mass Storage Devices
  *     (BBB) ONLY. There is NO support for Interrupt or Isochronous pipes!
  */
 
cpu/mips/au1x00_usb_ohci.c +2 -4
index 17489da..ea02efb 100644
@@ -27,9 +27,7 @@
  */
 /*
  * IMPORTANT NOTES
- * 1 - you MUST define LITTLEENDIAN in the configuration file for the
- *     board or this driver will NOT work!
- * 2 - this driver is intended for use with USB Mass Storage Devices
+ * 1 - this driver is intended for use with USB Mass Storage Devices
  *     (BBB) ONLY. There is NO support for Interrupt or Isochronous pipes!
  */
 
@@ -56,7 +54,7 @@
 #define USBH_ENABLE_CE (1<<3)
 #define USBH_ENABLE_RD (1<<4)
 
-#ifdef LITTLEENDIAN
+#ifdef __LITTLE_ENDIAN
 #define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C)
 #else
 #define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C | USBH_ENABLE_BE)
include/configs/VCMA9.h +0 -1
index 0bc2f68..a65013c 100644
@@ -36,7 +36,6 @@
 #define CONFIG_ARM920T		1	/* This is an ARM920T Core	*/
 #define	CONFIG_S3C2410		1	/* in a SAMSUNG S3C2410 SoC     */
 #define CONFIG_VCMA9		1	/* on a MPL VCMA9 Board  */
-#define LITTLEENDIAN		1	/* used by usb_ohci.c		*/
 
 /* input clock of PLL */
 #define CONFIG_SYS_CLK_FREQ	12000000/* VCMA9 has 12MHz input clock	*/
include/configs/afeb9260.h +0 -1
index d63a1a0..33ad66b 100644
@@ -115,7 +115,6 @@
 
 /* USB */
 #define CONFIG_USB_OHCI_NEW		1
-#define LITTLEENDIAN			1
 #define CONFIG_DOS_PARTITION		1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT		1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE		0x00500000	/* AT91SAM9260_UHP_BASE */
include/configs/at91cap9adk.h +0 -1
index b2baf1b..c232f61 100644
@@ -132,7 +132,6 @@
 
 /* USB */
 #define CONFIG_USB_OHCI_NEW		1
-#define LITTLEENDIAN			1
 #define CONFIG_DOS_PARTITION		1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT		1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE		0x00700000	/* AT91_BASE_UHP */
include/configs/at91sam9260ek.h +0 -1
index 1538929..c59cf39 100644
@@ -117,7 +117,6 @@
 
 /* USB */
 #define CONFIG_USB_OHCI_NEW		1
-#define LITTLEENDIAN			1
 #define CONFIG_DOS_PARTITION		1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT		1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE		0x00500000	/* AT91SAM9260_UHP_BASE */
include/configs/at91sam9261ek.h +0 -1
index 0016b4f..082fd45 100644
@@ -130,7 +130,6 @@
 
 /* USB */
 #define CONFIG_USB_OHCI_NEW		1
-#define LITTLEENDIAN			1
 #define CONFIG_DOS_PARTITION		1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT		1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE		0x00500000	/* AT91SAM9261_UHP_BASE */
include/configs/at91sam9263ek.h +0 -1
index d9ebc87..b478acf 100644
@@ -137,7 +137,6 @@
 
 /* USB */
 #define CONFIG_USB_OHCI_NEW		1
-#define LITTLEENDIAN			1
 #define CONFIG_DOS_PARTITION		1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT		1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE		0x00a00000	/* AT91SAM9263_UHP_BASE */
include/configs/delta.h +0 -2
index 08b28ca..e63dca3 100644
@@ -131,8 +131,6 @@
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME	"delta"
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	3
 
-#define LITTLEENDIAN            1       /* used by usb_ohci.c  */
-
 #define CONFIG_BOOTDELAY	-1
 #define CONFIG_ETHADDR		08:00:3e:26:0a:5b
 #define CONFIG_NETMASK		255.255.0.0
include/configs/mp2usb.h +0 -1
index cbbdb0c..d8b6414 100644
@@ -216,7 +216,6 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
 
 #define CONFIG_SYS_DEVICE_DEREGISTER           /* needs device_deregister */
-#define LITTLEENDIAN            1       /* used by usb_ohci.c  */
 
 #define CONFIG_SYS_HZ 1000
 #define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK/2)	/* AT91C_TC0_CMR is implicitly set to */
include/configs/sh7785lcr.h +0 -1
index 1b59059..ebca448 100644
@@ -123,7 +123,6 @@
 #undef	CONFIG_SYS_DIRECT_FLASH_TFTP
 
 /* R8A66597 */
-#define LITTLEENDIAN			/* for include/usb.h */
 #define CONFIG_USB_R8A66597_HCD
 #define CONFIG_R8A66597_BASE_ADDR	SH7785LCR_USB_BASE
 #define CONFIG_R8A66597_XTAL		0x0000	/* 12MHz */
include/configs/smdk6400.h +0 -1
index 1784cc6..d7ecbf6 100644
@@ -294,7 +294,6 @@
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME		"s3c6400"
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	3
 #define CONFIG_SYS_USB_OHCI_CPU_INIT		1
-#define LITTLEENDIAN			1	/* used by usb_ohci.c	*/
 
 #define CONFIG_USB_STORAGE	1
 #endif
include/configs/trab.h +0 -1
index 562cd60..0a7a73d 100644
@@ -44,7 +44,6 @@
 #define CONFIG_S3C2400		1	/* in a SAMSUNG S3C2400 SoC	*/
 #define CONFIG_TRAB		1	/* on a TRAB Board		*/
 #undef CONFIG_TRAB_50MHZ		/* run the CPU@50 MHz	*/
-#define LITTLEENDIAN		1	/* used by usb_ohci.c		*/
 
 /* automatic software updates (see board/trab/auto_update.c) */
 #define CONFIG_AUTO_UPDATE	1
include/configs/trizepsiv.h +0 -2
index b2065ee..0a8e994 100644
@@ -42,8 +42,6 @@
  */
 #define CONFIG_PXA27X		1	/* This is an PXA27x CPU    */
 
-#define LITTLEENDIAN		1	/* used by usb_ohci.c		*/
-
 #define CONFIG_MMC		1
 #define BOARD_LATE_INIT		1
 
include/usb.h +2 -2
index 510df95..befb201 100644
@@ -263,13 +263,13 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate);
 		((x_ & 0xFF000000UL) >> 24)); \
 	})
 
-#ifdef LITTLEENDIAN
+#ifdef __LITTLE_ENDIAN
 # 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 */
+#endif
 
 /*
  * Calling this entity a "pipe" is glorifying it. A USB pipe
Signature · 1 line
1.6.0.6
#4 lore raw

PATCH v2 1/1 usb.h: use standard __LITTLE_ENDIAN from Linux headers

Hello Mike,

2009/1/2 Mike Frysinger <[email protected]>:

Quoted 8 lines

Rather than forcing people to define a custom "LITTLEENDIAN", just use the __LITTLE_ENDIAN one from the Linux byteorder headers that every arch is already setting up.

---
v1
- convert more usb LITTLEENDIAN users

I applied this patch to the u-boot-usb 'testing' branch. When it compiles properly and no regressions are being detected, I move it to the 'next' branch for the next U-boot release.

Thanks.

Remy

Quoted 245 lines
 common/usb_storage.c            |    2 --
 cpu/arm920t/s3c24x0/usb_ohci.c  |    4 +---
 cpu/mips/au1x00_usb_ohci.c      |    6 ++----
 include/configs/VCMA9.h         |    1 -
 include/configs/afeb9260.h      |    1 -
 include/configs/at91cap9adk.h   |    1 -
 include/configs/at91sam9260ek.h |    1 -
 include/configs/at91sam9261ek.h |    1 -
 include/configs/at91sam9263ek.h |    1 -
 include/configs/delta.h         |    2 --
 include/configs/mp2usb.h        |    1 -
 include/configs/sh7785lcr.h     |    1 -
 include/configs/smdk6400.h      |    1 -
 include/configs/trab.h          |    1 -
 include/configs/trizepsiv.h     |    2 --
 include/usb.h                   |    4 ++--
 16 files changed, 5 insertions(+), 25 deletions(-)
common/usb_storage.c +0 -2
index 94f659f..bb468aa 100644
@@ -45,8 +45,6 @@
 * New Note:
 * Support for USB Mass Storage Devices (BBB) has been added. It has
 * only been tested with USB memory sticks.
- * Nota bene: if you are using the BBB support with a little-endian
- * CPU then you MUST define LITTLEENDIAN in the configuration file!
 */
 
 
cpu/arm920t/s3c24x0/usb_ohci.c +1 -3
index 641f270..9cbd477 100644
@@ -29,9 +29,7 @@
 */
 /*
 * IMPORTANT NOTES
- * 1 - you MUST define LITTLEENDIAN in the configuration file for the
- *     board or this driver will NOT work!
- * 2 - this driver is intended for use with USB Mass Storage Devices
+ * 1 - this driver is intended for use with USB Mass Storage Devices
 *     (BBB) ONLY. There is NO support for Interrupt or Isochronous pipes!
 */
 
cpu/mips/au1x00_usb_ohci.c +2 -4
index 17489da..ea02efb 100644
@@ -27,9 +27,7 @@
 */
 /*
 * IMPORTANT NOTES
- * 1 - you MUST define LITTLEENDIAN in the configuration file for the
- *     board or this driver will NOT work!
- * 2 - this driver is intended for use with USB Mass Storage Devices
+ * 1 - this driver is intended for use with USB Mass Storage Devices
 *     (BBB) ONLY. There is NO support for Interrupt or Isochronous pipes!
 */
 
@@ -56,7 +54,7 @@
 #define USBH_ENABLE_CE (1<<3)
 #define USBH_ENABLE_RD (1<<4)
 
-#ifdef LITTLEENDIAN
+#ifdef __LITTLE_ENDIAN
 #define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C)
 #else
 #define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C | USBH_ENABLE_BE)
include/configs/VCMA9.h +0 -1
index 0bc2f68..a65013c 100644
@@ -36,7 +36,6 @@
 #define CONFIG_ARM920T         1       /* This is an ARM920T Core      */
 #define        CONFIG_S3C2410          1       /* in a SAMSUNG S3C2410 SoC     */
 #define CONFIG_VCMA9           1       /* on a MPL VCMA9 Board  */
-#define LITTLEENDIAN           1       /* used by usb_ohci.c           */
 
 /* input clock of PLL */
 #define CONFIG_SYS_CLK_FREQ    12000000/* VCMA9 has 12MHz input clock  */
include/configs/afeb9260.h +0 -1
index d63a1a0..33ad66b 100644
@@ -115,7 +115,6 @@
 
 /* USB */
 #define CONFIG_USB_OHCI_NEW            1
-#define LITTLEENDIAN                   1
 #define CONFIG_DOS_PARTITION           1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT           1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE          0x00500000      /* AT91SAM9260_UHP_BASE */
include/configs/at91cap9adk.h +0 -1
index b2baf1b..c232f61 100644
@@ -132,7 +132,6 @@
 
 /* USB */
 #define CONFIG_USB_OHCI_NEW            1
-#define LITTLEENDIAN                   1
 #define CONFIG_DOS_PARTITION           1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT           1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE          0x00700000      /* AT91_BASE_UHP */
include/configs/at91sam9260ek.h +0 -1
index 1538929..c59cf39 100644
@@ -117,7 +117,6 @@
 
 /* USB */
 #define CONFIG_USB_OHCI_NEW            1
-#define LITTLEENDIAN                   1
 #define CONFIG_DOS_PARTITION           1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT           1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE          0x00500000      /* AT91SAM9260_UHP_BASE */
include/configs/at91sam9261ek.h +0 -1
index 0016b4f..082fd45 100644
@@ -130,7 +130,6 @@
 
 /* USB */
 #define CONFIG_USB_OHCI_NEW            1
-#define LITTLEENDIAN                   1
 #define CONFIG_DOS_PARTITION           1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT           1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE          0x00500000      /* AT91SAM9261_UHP_BASE */
include/configs/at91sam9263ek.h +0 -1
index d9ebc87..b478acf 100644
@@ -137,7 +137,6 @@
 
 /* USB */
 #define CONFIG_USB_OHCI_NEW            1
-#define LITTLEENDIAN                   1
 #define CONFIG_DOS_PARTITION           1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT           1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE          0x00a00000      /* AT91SAM9263_UHP_BASE */
include/configs/delta.h +0 -2
index 08b28ca..e63dca3 100644
@@ -131,8 +131,6 @@
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME  "delta"
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     3
 
-#define LITTLEENDIAN            1       /* used by usb_ohci.c  */
-
 #define CONFIG_BOOTDELAY       -1
 #define CONFIG_ETHADDR         08:00:3e:26:0a:5b
 #define CONFIG_NETMASK         255.255.0.0
include/configs/mp2usb.h +0 -1
index cbbdb0c..d8b6414 100644
@@ -216,7 +216,6 @@
 #define CONFIG_SYS_PBSIZE              (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
 
 #define CONFIG_SYS_DEVICE_DEREGISTER           /* needs device_deregister */
-#define LITTLEENDIAN            1       /* used by usb_ohci.c  */
 
 #define CONFIG_SYS_HZ 1000
 #define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK/2)     /* AT91C_TC0_CMR is implicitly set to */
include/configs/sh7785lcr.h +0 -1
index 1b59059..ebca448 100644
@@ -123,7 +123,6 @@
 #undef CONFIG_SYS_DIRECT_FLASH_TFTP
 
 /* R8A66597 */
-#define LITTLEENDIAN                   /* for include/usb.h */
 #define CONFIG_USB_R8A66597_HCD
 #define CONFIG_R8A66597_BASE_ADDR      SH7785LCR_USB_BASE
 #define CONFIG_R8A66597_XTAL           0x0000  /* 12MHz */
include/configs/smdk6400.h +0 -1
index 1784cc6..d7ecbf6 100644
@@ -294,7 +294,6 @@
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME          "s3c6400"
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     3
 #define CONFIG_SYS_USB_OHCI_CPU_INIT           1
-#define LITTLEENDIAN                   1       /* used by usb_ohci.c   */
 
 #define CONFIG_USB_STORAGE     1
 #endif
include/configs/trab.h +0 -1
index 562cd60..0a7a73d 100644
@@ -44,7 +44,6 @@
 #define CONFIG_S3C2400         1       /* in a SAMSUNG S3C2400 SoC     */
 #define CONFIG_TRAB            1       /* on a TRAB Board              */
 #undef CONFIG_TRAB_50MHZ               /* run the CPU at 50 MHz        */
-#define LITTLEENDIAN           1       /* used by usb_ohci.c           */
 
 /* automatic software updates (see board/trab/auto_update.c) */
 #define CONFIG_AUTO_UPDATE     1
include/configs/trizepsiv.h +0 -2
index b2065ee..0a8e994 100644
@@ -42,8 +42,6 @@
 */
 #define CONFIG_PXA27X          1       /* This is an PXA27x CPU    */
 
-#define LITTLEENDIAN           1       /* used by usb_ohci.c           */
-
 #define CONFIG_MMC             1
 #define BOARD_LATE_INIT                1
 
include/usb.h +2 -3
index 510df95..befb201 100644
@@ -263,13 +263,13 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate);
               ((x_ & 0xFF000000UL) >> 24)); \
       })
 
-#ifdef LITTLEENDIAN
+#ifdef __LITTLE_ENDIAN
 # 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 */
+#endif
 
 /*
 * Calling this entity a "pipe" is glorifying it. A USB pipe
--

1.6.0.6

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot