summaryrefslogtreecommitdiff
path: root/board/cogent
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-09-29 11:02:56 +0000
committerwdenk <wdenk>2004-09-29 11:02:56 +0000
commitda93ed8147a000505ac7b7ed4e2fb50532596a3c (patch)
treef375a3f5d82d1f519f77d9446ccf147f2091548f /board/cogent
parenta5725fabc0c6378f583df6fc6491ec07eab154ab (diff)
downloadu-boot-imx-da93ed8147a000505ac7b7ed4e2fb50532596a3c.zip
u-boot-imx-da93ed8147a000505ac7b7ed4e2fb50532596a3c.tar.gz
u-boot-imx-da93ed8147a000505ac7b7ed4e2fb50532596a3c.tar.bz2
* 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
Diffstat (limited to 'board/cogent')
-rw-r--r--board/cogent/mb.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/board/cogent/mb.h b/board/cogent/mb.h
index e37a39c..f6eaf0a 100644
--- a/board/cogent/mb.h
+++ b/board/cogent/mb.h
@@ -54,7 +54,7 @@
* i.e. they are 8 bytes apart. For big endian addressing, the 8 bit register
* will be at byte 7 (the address + 7). For little endian addressing, the
* register will be at byte 0 (the address + 0). To learn the endianess
- * we must include <asm/byteorder.h>
+ * we must include <endian.h>
*
* Take the CMA102 and CMA111 motherboards as examples...
*
@@ -230,16 +230,20 @@
#ifndef __ASSEMBLY__
-#include <asm/byteorder.h>
+#ifdef USE_HOSTCC
+#include <endian.h> /* avoid using private kernel header files */
+#else
+#include <asm/byteorder.h> /* use U-Boot provided headers */
+#endif
/* a single CMA10x motherboard i/o register */
typedef
struct {
-#if defined(__LITTLE_ENDIAN)
+#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned char value;
#endif
unsigned char filler[7];
-#if defined(__BIG_ENDIAN)
+#if __BYTE_ORDER == __BIG_ENDIAN
unsigned char value;
#endif
}
@@ -357,7 +361,7 @@ cma_mb_dipsw;
/* V360EPC PCI Bridge */
typedef
struct {
-#if defined(__LITTLE_ENDIAN)
+#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned short v3_pci_vendor; /* 0x00 */
unsigned short v3_pci_device;
unsigned short v3_pci_cmd; /* 0x04 */
@@ -436,7 +440,7 @@ typedef
unsigned long reserved8:24;
unsigned long reserved9[7]; /* 0xe4 */
#endif
-#if defined(__BIG_ENDIAN)
+#if __BYTE_ORDER == __BIG_ENDIAN
unsigned short v3_pci_device; /* 0x00 */
unsigned short v3_pci_vendor;
unsigned short v3_pci_stat; /* 0x04 */