diff options
author | David Hendricks <dhendricks@fb.com> | 2018-03-09 14:30:38 -0800 |
---|---|---|
committer | Philipp Deppenwiese <zaolin.daisuki@gmail.com> | 2018-07-03 15:53:32 +0000 |
commit | 7d48ac5c7dfb52fc470bbad1013b4d460bc6a1e0 (patch) | |
tree | 42002ba1e86627339ff4a6cf38efb4b3f00033bb /src/vendorcode/cavium/include/bdk/libbdk-arch/bdk-arch.h | |
parent | d837e660074e0621d63f59515f933c209441b653 (diff) |
soc/cavium: Integrate BDK files into coreboot
* Make it compile.
* Fix whitespace errors.
* Fix printf formats.
* Add missing headers includes
* Guard headers with ifdefs
Compile DRAM init code in romstage.
Compile QLM, PCIe, RNG, PHY, GPIO, MDIO init code in ramstage.
Change-Id: I0a93219a14bfb6ebe41103a825d5032b11e7f2c6
Signed-off-by: David Hendricks <dhendricks@fb.com>
Reviewed-on: https://review.coreboot.org/25089
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/vendorcode/cavium/include/bdk/libbdk-arch/bdk-arch.h')
-rw-r--r-- | src/vendorcode/cavium/include/bdk/libbdk-arch/bdk-arch.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-arch/bdk-arch.h b/src/vendorcode/cavium/include/bdk/libbdk-arch/bdk-arch.h index e2434a72d8..660f3e83d6 100644 --- a/src/vendorcode/cavium/include/bdk/libbdk-arch/bdk-arch.h +++ b/src/vendorcode/cavium/include/bdk/libbdk-arch/bdk-arch.h @@ -48,24 +48,24 @@ * <hr>$Revision: 49448 $<hr> */ +#include <arch/byteorder.h> + #ifndef __BYTE_ORDER - #if !defined(__ORDER_BIG_ENDIAN__) || !defined(__ORDER_LITTLE_ENDIAN__) || !defined(__BYTE_ORDER__) - #error Unable to determine Endian mode - #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ - #define __BYTE_ORDER __ORDER_BIG_ENDIAN__ - #define BDK_LITTLE_ENDIAN_STRUCT __attribute__ ((scalar_storage_order("little-endian"))) - #elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - #define __BYTE_ORDER __ORDER_LITTLE_ENDIAN__ - #define BDK_LITTLE_ENDIAN_STRUCT - #else - #error Unable to determine Endian mode - #endif - #define __BIG_ENDIAN __ORDER_BIG_ENDIAN__ - #define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ + #if (__LITTLE_ENDIAN) + #define __BYTE_ORDER __LITTLE_ENDIAN + #elif defined(__BIG_ENDIAN) + #define __BYTE_ORDER __BIG_ENDIAN + #endif +#endif + +#ifndef __LITTLE_ENDIAN + #define __LITTLE_ENDIAN 1234 +#endif +#ifndef __BIG_ENDIAN + #define __BIG_ENDIAN 4321 #endif #include "bdk-require.h" -#include "bdk-swap.h" #ifndef BDK_BUILD_HOST #include "bdk-asm.h" #endif @@ -76,10 +76,8 @@ #include "bdk-lmt.h" #endif #include "bdk-warn.h" -#include "bdk-version.h" #ifndef BDK_BUILD_HOST #include "bdk-fuse.h" -#include "bdk-platform.h" #endif #endif |