9
0
Fork 0
Commit Graph

10 Commits

Author SHA1 Message Date
Sascha Hauer 51885a7d73 Change byte order detection mechanism to kernel style
The Linux Kernel defines only one of __LITTLE_ENDIAN and
__BIG_ENDIAN. Endianess can then be tested with #ifdef __xx_ENDIAN. Userspace
always defined both __LITTLE_ENDIAN and __BIG_ENDIAN and byteorder can then
be tested with #if __BYTE_ORDER == __xx_ENDIAN.

As we tend to use a lot of Kernel code in barebox we switch to use the kernel
way of determing the byte order.

As this always causes a lot of confusion add a check to include/common.h to
make sure only one of __LITTLE_ENDIAN and __BIG_ENDIAN is defined.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-28 13:49:16 +02:00
Jean-Christophe PLAGNIOL-VILLARD be4146161b import swab.h arch implementation form linux v2.3.37
this will avoid __bswapsi2 issue see with gcc 4.5.1

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-17 09:39:16 +01:00
Baruch Siach 9ad1fe64ab byteorder: add missing {BIG,LITTLE}_ENDIAN defines
This fixes build warnings when testing __BYTE_ORDER of the other kind.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-30 09:06:11 +02:00
Wolfgang Denk 77ddac9480 Cleanup for GCC-4.x 2005-10-13 16:45:02 +02:00
wdenk da93ed8147 * Patch by Shlomo Kut, 29 Mar 2004:
Add support for MKS Instruments "Quantum" board

* Fix build problem with Cogent boards;
  avoid using <asm/byteorder.h> when using the host compiler
2004-09-29 11:02:56 +00:00
wdenk f4863a7aec * Patch by liang a lei, 9 Jan 2004:
Fix Intel 28F128J3 ID in include/flash.h

* Patch by Masami Komiya, 09 Jan 2004:
  add support for TB0229 board (NEC VR4131 MIPS processor)

* Patch by Leon Kukovec, 12 Dec 2003:
  changed extern __inline__ into static __inline__ in
  include/linux/byteorder/swab.h
2004-02-07 01:27:10 +00:00
wdenk 8bde7f776c * Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
  - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
  - major rework of command structure
    (work done mostly by Michal Cendrowski and Joakim Kristiansen)
2003-06-27 21:31:46 +00:00
wdenk c609719b8d Initial revision 2002-11-03 00:24:07 +00:00
wdenk a33982a51b Initial revision 2002-08-14 18:57:58 +00:00
wdenk b15cbc0be0 Initial revision 2000-08-21 15:05:47 +00:00