]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
usb.h: use standard __LITTLE_ENDIAN from Linux headers
authorMike Frysinger <vapier@gentoo.org>
Thu, 1 Jan 2009 23:27:27 +0000 (18:27 -0500)
committerRemy Bohmer <linux@bohmer.net>
Wed, 28 Jan 2009 18:57:29 +0000 (19:57 +0100)
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.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
16 files changed:
common/usb_storage.c
cpu/arm920t/s3c24x0/usb_ohci.c
cpu/mips/au1x00_usb_ohci.c
include/configs/VCMA9.h
include/configs/afeb9260.h
include/configs/at91cap9adk.h
include/configs/at91sam9260ek.h
include/configs/at91sam9261ek.h
include/configs/at91sam9263ek.h
include/configs/delta.h
include/configs/mp2usb.h
include/configs/sh7785lcr.h
include/configs/smdk6400.h
include/configs/trab.h
include/configs/trizepsiv.h
include/usb.h

index 9ed629708a8f233e3e2adb04ba872059e3c95812..51f078948a926f29facd681453d9f291ed7de7ab 100644 (file)
@@ -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!
  */
 
 
index 641f2704900df6fd3aad4d4a7f4fe4c9f5170ab8..9cbd4776777d1210303bf2eaad024da5c4d97e8a 100644 (file)
@@ -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!
  */
 
index 17489da8d48e210ad90f77622a9a7e916aef4f7f..ea02efbb0dd169a0093672628b43734492bf65a4 100644 (file)
@@ -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)
index 83d0d56c1eff9e594e699340bd201103f26946e4..d9bcf6b7ae6a214094cb0ff2d295e6a27f79c8f4 100644 (file)
@@ -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  */
index e996bbd327e68baf2b4767497ac209c395cc1634..9eed3423cc4cd447cc1dbfeed1819d05ca6f4a71 100644 (file)
 
 /* 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 */
index f1c5526d67392fd95c625be245a87f19aa41eb76..01da99b82c83cde73e1aff73d0029e0acecf98b6 100644 (file)
 
 /* 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 */
index 4501cae3c84d53805cb0b08442b00ae50e2a982e..2f1a41f646fdca1898851179d2326b84d959523d 100644 (file)
 
 /* 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 */
index 668fe3b08bac7bd1e50a81e2737a6c4a5c1f2c70..ebecfa4099e2313ac110e2626ee607a12f3f36e6 100644 (file)
 
 /* 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 */
index c6603ff1f807c34f8aadc51f93bf2b3aff3f691f..09b871a5e95f1a6c5f874ed31809b216f1f3193a 100644 (file)
 
 /* 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 */
index fd97b746f34c29816e6d03a4dcbe608745eeb978..abb2676bcc2ea4d234243ab0ea3535b222b6b33d 100644 (file)
 #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
index fb10616c30893a27f60f27a1e63ed8572a7cc918..9ac7e9afb736b8a45b8c5ea172284dc960bee6e1 100644 (file)
 #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 */
index 1b59059451a6126a821f2ad28ffe27d631692cc4..ebca448eafddd4dee35abd7d5be730df8ce680f6 100644 (file)
 #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 */
index 57c82d1a1652b890905c99f902f6ff99f846b5cd..c61667fd0c190a0876f5896064ac4eacffcbe75d 100644 (file)
 #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
index 562cd6093f25b5c42ea7a8c1d9c20d6508a96321..0a7a73d30c471acd44d4571fc8a3d10219d70e8c 100644 (file)
@@ -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
index b2065ee48b168e6d168ba6e6578a10837e3d7c62..0a8e9941232cd75dbe8eb3374e9f61ae38913a1e 100644 (file)
@@ -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
 
index b8f2fa256ada4759ef55e5125e53c69dc8eb9f77..d20efb1b04ada24ccbc379fea3eb9a50f369b577 100644 (file)
@@ -265,13 +265,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