1 Index: linux-2.6.22-rc6/include/asm-mips/byteorder.h
2 ===================================================================
3 --- linux-2.6.22-rc6.orig/include/asm-mips/byteorder.h
4 +++ linux-2.6.22-rc6/include/asm-mips/byteorder.h
5 @@ -58,6 +58,35 @@ static __inline__ __attribute_const__ __
7 #endif /* CONFIG_CPU_MIPSR2 */
9 +#ifdef CONFIG_ADM5120_HARDWARE_SWAB
11 +static __inline__ __attribute_const__ __u16 ___adm5120__swab16(__u16 x)
14 + " sh %2, 0xCA(%1) \n"
15 + " lhu %0, 0xCC(%1) \n"
17 + : "r" (0xB2000000), "r" (x));
22 +static __inline__ __attribute_const__ __u32 ___adm5120__swab32(__u32 x)
25 + " sw %2, 0xC8(%1) \n"
26 + " lw %0, 0xCC(%1) \n"
28 + : "r" (0xB2000000), "r" (x));
33 +#define __arch__swab16(x) ___adm5120__swab16(x)
34 +#define __arch__swab32(x) ___adm5120__swab32(x)
36 +#endif /* CONFIG_ADM5120_HARDWARE_SWAB */
38 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
39 # define __BYTEORDER_HAS_U64__
40 # define __SWAB_64_THRU_32__