flashrom/flashrom-0005-Use-endiannes-determined-at-the-configure-stage.patch
Peter Lemenkov 68abf3998f flashrom svn ver. 1850
- Add support for Winbond W25Q40.V chips
- Add support for Macronix MX23L1654, MX23L6454 and MX23L12854 mask
ROMs
- Add support for Intel Wildcat Point PCH
- Add support for Intel Silvermont: Bay Trail, Rangeley and Avoton
- Add support for S25FL128P, S25FL129P chips
- Add support for a bunch of 29GL parallel flash chips
- Add support for Atmel AT49LH004 and AT49LH00B4
- Add new programmer for SPI EEPROMs attached to Intel 82580 NICs
- Add support for AMD Bolton chipset
- Add Board Enable for ASUS Vintage 2 PH1 (P5LD2-MQ)
- Add support for Macronix MX29F022(N)B and MX29F022(N)T
- Add support for Macronix MX25U12835F
- Add support for Sanyo LE25FW106
- Add IT8212F PCI ATA controller as programmer
- Add support for Atmel (now Adesto) AT25DL081 and AT25DL161
- Add VIA VT6421A LPC programmer driver
- Add support for ESMT F25L32PA
- Add support for Sanyo LE25FW406A
- Add support for new AMD SPI controller (SPI 100)
- Add support for Sanyo LE25FU406B
- Add support for SST25LF020A
- Add support for Spansion S25FL132K and S25FL164K
- Add support for SST25WF08
- Add support for Macronix MX23L3254 mask ROM
- Add support for TUMPA Lite
- Add support for Intel 82574L
- Add board enable for ASUS A7V8X-MX
- Add board enable for ASUS P5LD2-VM DH
- Add board enable for abit BF6
- Add support for SST25VF512A, ST25VF020, SST25VF020B chips
- Add pinout for Wiggler LPT
- Add pinout for Atmel STK200/300
- Add pinout for Altera ByteBlasterMV
- Add support for ST M50LPW080 chip
- Add an internal DMI decoder
- Add board enable for Bcom WinNET P680
- Add support for AT45CS1282 chip
- Add support for AT45DB321C
- Add support for Atmel AT45DB* chips
- Add support for Fujitsu MBM29LV160BE/TE
- Add ability to select between chips on GIGABYTE DualBIOS boards
- Temporarily disable ftdi support

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2014-09-11 22:48:57 +04:00

92 lines
2.6 KiB
Diff

From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 26 Sep 2010 18:25:31 +0400
Subject: [PATCH] Use endiannes determined at the configure stage
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/hwaccess.h b/hwaccess.h
index 83f349e..1fa7815 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -47,58 +47,6 @@
#undef index
#endif
-#if defined (__i386__) || defined (__x86_64__)
-
-/* All x86 is little-endian. */
-#define __FLASHROM_LITTLE_ENDIAN__ 1
-
-#elif defined (__mips) || defined (__mips__) || defined (_mips) || defined (mips)
-
-/* MIPS can be either endian. */
-#if defined (__MIPSEL) || defined (__MIPSEL__) || defined (_MIPSEL) || defined (MIPSEL)
-#define __FLASHROM_LITTLE_ENDIAN__ 1
-#elif defined (__MIPSEB) || defined (__MIPSEB__) || defined (_MIPSEB) || defined (MIPSEB)
-#define __FLASHROM_BIG_ENDIAN__ 1
-#endif
-
-#elif defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || defined(__ppc64__)
-
-/* PowerPC can be either endian. */
-#if defined (_BIG_ENDIAN) || defined (__BIG_ENDIAN__)
-#define __FLASHROM_BIG_ENDIAN__ 1
-/* Error checking in case some weird header has #defines for LE as well. */
-#if defined (_LITTLE_ENDIAN) || defined (__LITTLE_ENDIAN__)
-#error Conflicting endianness #define
-#endif
-#else
-#error Little-endian PowerPC #defines are unknown
-#endif
-
-#elif defined (__arm__)
-#if defined (__ARMEL__)
-#define __FLASHROM_LITTLE_ENDIAN__ 1
-#else
-#error Big-endian ARM #defines are unknown
-#endif
-
-#endif
-
-#if !defined (__FLASHROM_BIG_ENDIAN__) && !defined (__FLASHROM_LITTLE_ENDIAN__)
-/* Nonstandard libc-specific macros for determining endianness. */
-#if defined(__GLIBC__)
-#include <endian.h>
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define __FLASHROM_LITTLE_ENDIAN__ 1
-#elif BYTE_ORDER == BIG_ENDIAN
-#define __FLASHROM_BIG_ENDIAN__ 1
-#endif
-#endif
-#endif
-
-#if !defined (__FLASHROM_BIG_ENDIAN__) && !defined (__FLASHROM_LITTLE_ENDIAN__)
-#error Unable to determine endianness. Please add support for your arch or libc.
-#endif
-
#define ___constant_swab8(x) ((uint8_t) ( \
(((uint8_t)(x) & (uint8_t)0xffU))))
@@ -140,7 +88,7 @@ cpu_to_le(64)
#define cpu_to_be32
#define cpu_to_be64
-#elif defined (__FLASHROM_LITTLE_ENDIAN__)
+#else /* defined (__FLASHROM_BIG_ENDIAN__) */
#define cpu_to_be(bits) \
static inline uint##bits##_t cpu_to_be##bits(uint##bits##_t val) \
@@ -158,11 +106,7 @@ cpu_to_be(64)
#define cpu_to_le32
#define cpu_to_le64
-#else
-
-#error Could not determine endianness.
-
-#endif
+#endif /* defined (__FLASHROM_BIG_ENDIAN__) */
#define be_to_cpu8 cpu_to_be8
#define be_to_cpu16 cpu_to_be16