diff options
author | Tom Rini <trini@konsulko.com> | 2018-09-16 10:32:33 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-09-16 10:32:33 -0400 |
commit | 40e44c8bf516e7071c9b80113473be5757e8c3f3 (patch) | |
tree | f8d432fd3f9cbb3472906600dd7c4e1109a858d5 /arch/m68k/include | |
parent | 9e45008b39ac64f1a01251bb72e3e0d9edb4579f (diff) | |
parent | 2c92e4fbc69841170939a48e887c8fbbcb23d05c (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-coldfire
Diffstat (limited to 'arch/m68k/include')
-rw-r--r-- | arch/m68k/include/asm/byteorder.h | 34 | ||||
-rw-r--r-- | arch/m68k/include/asm/global_data.h | 3 | ||||
-rw-r--r-- | arch/m68k/include/asm/immap.h | 2 |
3 files changed, 24 insertions, 15 deletions
diff --git a/arch/m68k/include/asm/byteorder.h b/arch/m68k/include/asm/byteorder.h index eb03b6a053..9179622250 100644 --- a/arch/m68k/include/asm/byteorder.h +++ b/arch/m68k/include/asm/byteorder.h @@ -10,21 +10,28 @@ #include <asm/types.h> #ifdef __GNUC__ -#define __sw16(x) \ - ((__u16)( \ - (((__u16)(x) & (__u16)0x00ffU) << 8) | \ - (((__u16)(x) & (__u16)0xff00U) >> 8) )) -#define __sw32(x) \ - ((__u32)( \ - (((__u32)(x)) << 24) | \ - (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ - (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ - (((__u32)(x)) >> 24) )) + +static inline __u32 __sw32(__u32 x) +{ + __u32 v = x; + + return v << 24 | + (v & (__u32)0x0000ff00UL) << 8 | + (v & (__u32)0x00ff0000UL) >> 8 | + v >> 24; +} + +static inline __u16 __sw16(__u16 x) +{ + __u16 v = x; + + return (v & (__u16)0x00ffU) << 8 | + (v & (__u16)0xff00U) >> 8; +} static __inline__ unsigned ld_le16(const volatile unsigned short *addr) { - unsigned result = *addr; - return __sw16(result); + return __sw16(*addr); } static __inline__ void st_le16(volatile unsigned short *addr, @@ -35,8 +42,7 @@ static __inline__ void st_le16(volatile unsigned short *addr, static __inline__ unsigned ld_le32(const volatile unsigned *addr) { - unsigned result = *addr; - return __sw32(result); + return __sw32(*addr); } static __inline__ void st_le32(volatile unsigned *addr, const unsigned val) diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h index aa0be8191a..188055e9d3 100644 --- a/arch/m68k/include/asm/global_data.h +++ b/arch/m68k/include/asm/global_data.h @@ -18,6 +18,9 @@ struct arch_global_data { unsigned long vco_clk; unsigned long flb_clk; #endif +#ifdef CONFIG_MCF5441x + unsigned long sdhc_clk; +#endif }; #include <asm-generic/global_data.h> diff --git a/arch/m68k/include/asm/immap.h b/arch/m68k/include/asm/immap.h index 06bc2a0a58..80fa25769b 100644 --- a/arch/m68k/include/asm/immap.h +++ b/arch/m68k/include/asm/immap.h @@ -362,7 +362,7 @@ #endif #define CONFIG_SYS_INTR_BASE (MMAP_INTC0) -#define CONFIG_SYS_NUM_IRQS (128) +#define CONFIG_SYS_NUM_IRQS (192) #endif /* CONFIG_M54418 */ |