summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRahul Pathak <rpathak@ventanamicro.com>2023-02-02 07:44:27 +0300
committerAnup Patel <anup@brainfault.org>2023-02-08 15:54:13 +0300
commitb224ddb41fe1f9cbdfb246ebf22036ae1fe3f40f (patch)
treec875280283578fcfab7922de495633075d066b89 /lib
parent680bea02bf47e04594ed8810bfee7e9088cd1ca7 (diff)
downloadopensbi-b224ddb41fe1f9cbdfb246ebf22036ae1fe3f40f.tar.xz
include: types: Add typedefs for endianness
If any variable/memory-location follows certain endianness then its important to annotate it properly so that proper conversion can be done before read/write from that variable/memory. Also, use these new typedefs in libfdt_env.h for deriving its own custom fdtX_t types Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/utils/libfdt/libfdt_env.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/utils/libfdt/libfdt_env.h b/lib/utils/libfdt/libfdt_env.h
index e5ad769..6ebbae0 100644
--- a/lib/utils/libfdt/libfdt_env.h
+++ b/lib/utils/libfdt/libfdt_env.h
@@ -38,9 +38,9 @@
#define strlen sbi_strlen
#define strnlen sbi_strnlen
-typedef uint16_t FDT_BITWISE fdt16_t;
-typedef uint32_t FDT_BITWISE fdt32_t;
-typedef uint64_t FDT_BITWISE fdt64_t;
+typedef be16_t FDT_BITWISE fdt16_t;
+typedef be32_t FDT_BITWISE fdt32_t;
+typedef be64_t FDT_BITWISE fdt64_t;
static inline uint16_t fdt16_to_cpu(fdt16_t x)
{