summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include/asm/cpuinfo.h
diff options
context:
space:
mode:
authorMichal Simek2010-09-28 08:04:14 +0200
committerMichal Simek2010-10-21 07:51:59 +0200
commit02b08045a0306c38131c6d7155c4034a775d40b1 (patch)
treee146f1811ec3c93ff4877a895e42b71a91932d2b /arch/microblaze/include/asm/cpuinfo.h
parentmicroblaze: KGDB little endian support (diff)
downloadkernel-qcow2-linux-02b08045a0306c38131c6d7155c4034a775d40b1.tar.gz
kernel-qcow2-linux-02b08045a0306c38131c6d7155c4034a775d40b1.tar.xz
kernel-qcow2-linux-02b08045a0306c38131c6d7155c4034a775d40b1.zip
microblaze: Add support for little-endian Microblaze
Microblaze little-endian toolchain exports __MICROBLAZEEL__ which is used in the kernel to identify little/big endian. The most of the changes are in loading values from DTB which is always big endian. Little endian platforms are based on new AXI bus which has impact to early uartlite initialization. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/include/asm/cpuinfo.h')
-rw-r--r--arch/microblaze/include/asm/cpuinfo.h3
1 files changed, 2 insertions, 1 deletions
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);
static inline unsigned int fcpu(struct device_node *cpu, char *n)
{
int *val;
- return (val = (int *) of_get_property(cpu, n, NULL)) ? *val : 0;
+ return (val = (int *) of_get_property(cpu, n, NULL)) ?
+ be32_to_cpup(val) : 0;
}
#endif /* _ASM_MICROBLAZE_CPUINFO_H */