diff options
Diffstat (limited to 'arch/microblaze/include/asm')
-rw-r--r-- | arch/microblaze/include/asm/byteorder.h | 4 | ||||
-rw-r--r-- | arch/microblaze/include/asm/checksum.h | 9 | ||||
-rw-r--r-- | arch/microblaze/include/asm/cpuinfo.h | 3 | ||||
-rw-r--r-- | arch/microblaze/include/asm/elf.h | 2 | ||||
-rw-r--r-- | arch/microblaze/include/asm/unaligned.h | 12 |
5 files changed, 23 insertions, 7 deletions
diff --git a/arch/microblaze/include/asm/byteorder.h b/arch/microblaze/include/asm/byteorder.h index ce9c58732ffc..31902762a426 100644 --- a/arch/microblaze/include/asm/byteorder.h +++ b/arch/microblaze/include/asm/byteorder.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef _ASM_MICROBLAZE_BYTEORDER_H | 1 | #ifndef _ASM_MICROBLAZE_BYTEORDER_H |
2 | #define _ASM_MICROBLAZE_BYTEORDER_H | 2 | #define _ASM_MICROBLAZE_BYTEORDER_H |
3 | 3 | ||
4 | #ifdef __MICROBLAZEEL__ | ||
5 | #include <linux/byteorder/little_endian.h> | ||
6 | #else | ||
4 | #include <linux/byteorder/big_endian.h> | 7 | #include <linux/byteorder/big_endian.h> |
8 | #endif | ||
5 | 9 | ||
6 | #endif /* _ASM_MICROBLAZE_BYTEORDER_H */ | 10 | #endif /* _ASM_MICROBLAZE_BYTEORDER_H */ |
diff --git a/arch/microblaze/include/asm/checksum.h b/arch/microblaze/include/asm/checksum.h index 128bf03b54b7..0185cbefdda4 100644 --- a/arch/microblaze/include/asm/checksum.h +++ b/arch/microblaze/include/asm/checksum.h | |||
@@ -24,8 +24,13 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, | |||
24 | "addc %0, %0, %3\n\t" | 24 | "addc %0, %0, %3\n\t" |
25 | "addc %0, %0, r0\n\t" | 25 | "addc %0, %0, r0\n\t" |
26 | : "+&d" (sum) | 26 | : "+&d" (sum) |
27 | : "d" (saddr), "d" (daddr), "d" (len + proto)); | 27 | : "d" (saddr), "d" (daddr), |
28 | 28 | #ifdef __MICROBLAZEEL__ | |
29 | "d" ((len + proto) << 8) | ||
30 | #else | ||
31 | "d" (len + proto) | ||
32 | #endif | ||
33 | ); | ||
29 | return sum; | 34 | return sum; |
30 | } | 35 | } |
31 | 36 | ||
diff --git a/arch/microblaze/include/asm/cpuinfo.h b/arch/microblaze/include/asm/cpuinfo.h index 0d4f0ce3ff7c..7fab800496ae 100644 --- a/arch/microblaze/include/asm/cpuinfo.h +++ b/arch/microblaze/include/asm/cpuinfo.h | |||
@@ -98,7 +98,8 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu); | |||
98 | static inline unsigned int fcpu(struct device_node *cpu, char *n) | 98 | static inline unsigned int fcpu(struct device_node *cpu, char *n) |
99 | { | 99 | { |
100 | int *val; | 100 | int *val; |
101 | return (val = (int *) of_get_property(cpu, n, NULL)) ? *val : 0; | 101 | return (val = (int *) of_get_property(cpu, n, NULL)) ? |
102 | be32_to_cpup(val) : 0; | ||
102 | } | 103 | } |
103 | 104 | ||
104 | #endif /* _ASM_MICROBLAZE_CPUINFO_H */ | 105 | #endif /* _ASM_MICROBLAZE_CPUINFO_H */ |
diff --git a/arch/microblaze/include/asm/elf.h b/arch/microblaze/include/asm/elf.h index 732caf1be741..098dfdde4b06 100644 --- a/arch/microblaze/include/asm/elf.h +++ b/arch/microblaze/include/asm/elf.h | |||
@@ -71,7 +71,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
71 | 71 | ||
72 | #define ELF_ET_DYN_BASE (0x08000000) | 72 | #define ELF_ET_DYN_BASE (0x08000000) |
73 | 73 | ||
74 | #ifdef __LITTLE_ENDIAN__ | 74 | #ifdef __MICROBLAZEEL__ |
75 | #define ELF_DATA ELFDATA2LSB | 75 | #define ELF_DATA ELFDATA2LSB |
76 | #else | 76 | #else |
77 | #define ELF_DATA ELFDATA2MSB | 77 | #define ELF_DATA ELFDATA2MSB |
diff --git a/arch/microblaze/include/asm/unaligned.h b/arch/microblaze/include/asm/unaligned.h index 3658d91ac0fb..2b97cbe500e9 100644 --- a/arch/microblaze/include/asm/unaligned.h +++ b/arch/microblaze/include/asm/unaligned.h | |||
@@ -12,12 +12,18 @@ | |||
12 | 12 | ||
13 | # ifdef __KERNEL__ | 13 | # ifdef __KERNEL__ |
14 | 14 | ||
15 | # include <linux/unaligned/be_struct.h> | 15 | # include <linux/unaligned/be_byteshift.h> |
16 | # include <linux/unaligned/le_byteshift.h> | 16 | # include <linux/unaligned/le_byteshift.h> |
17 | # include <linux/unaligned/generic.h> | 17 | # include <linux/unaligned/generic.h> |
18 | 18 | ||
19 | # define get_unaligned __get_unaligned_be | 19 | |
20 | # define put_unaligned __put_unaligned_be | 20 | # ifdef __MICROBLAZEEL__ |
21 | # define get_unaligned __get_unaligned_le | ||
22 | # define put_unaligned __put_unaligned_le | ||
23 | # else | ||
24 | # define get_unaligned __get_unaligned_be | ||
25 | # define put_unaligned __put_unaligned_be | ||
26 | # endif | ||
21 | 27 | ||
22 | # endif /* __KERNEL__ */ | 28 | # endif /* __KERNEL__ */ |
23 | #endif /* _ASM_MICROBLAZE_UNALIGNED_H */ | 29 | #endif /* _ASM_MICROBLAZE_UNALIGNED_H */ |