From: Alan Cox Date: Thu, 4 Jun 2015 18:23:07 +0000 (+0100) Subject: 6809: define cpu_to_le32/reverse X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f16f0d4f3468350bcf256dbb222c7d87bafff507;p=FUZIX.git 6809: define cpu_to_le32/reverse --- diff --git a/Kernel/cpu-6809/cpu.h b/Kernel/cpu-6809/cpu.h index fe68c4bd..ab2bab08 100644 --- a/Kernel/cpu-6809/cpu.h +++ b/Kernel/cpu-6809/cpu.h @@ -55,6 +55,9 @@ typedef union { /* this structure is endian dependent */ #define cpu_to_le16(x) swab(x) #define le16_to_cpu(x) swab(x) +#define cpu_to_le32(x) ((((uint32_t)cpu_to_le16((x) & 0xFFFF)) << 16) | \ + (uint32_t)cpu_to_le16((x) >> 16)) +#define le32_to_cpu(x) cpu_to_le32(x) /* Sane behaviour for unused parameters */ #define used(x)