summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/intc.c
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-09-28 16:04:14 +1000
committerMichal Simek <monstr@monstr.eu>2010-10-21 15:51:59 +1000
commit02b08045a0306c38131c6d7155c4034a775d40b1 (patch)
treee146f1811ec3c93ff4877a895e42b71a91932d2b /arch/microblaze/kernel/intc.c
parente4f29092272ee91a34d3660c31f15ed103057aa0 (diff)
downloadlinux-02b08045a0306c38131c6d7155c4034a775d40b1.tar.bz2
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/kernel/intc.c')
-rw-r--r--arch/microblaze/kernel/intc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c
index e85bbea1c62b..d61ea33aff7c 100644
--- a/arch/microblaze/kernel/intc.c
+++ b/arch/microblaze/kernel/intc.c
@@ -138,12 +138,15 @@ void __init init_IRQ(void)
}
BUG_ON(!intc);
- intc_baseaddr = *(int *) of_get_property(intc, "reg", NULL);
+ intc_baseaddr = be32_to_cpup(of_get_property(intc,
+ "reg", NULL));
intc_baseaddr = (unsigned long) ioremap(intc_baseaddr, PAGE_SIZE);
- nr_irq = *(int *) of_get_property(intc, "xlnx,num-intr-inputs", NULL);
+ nr_irq = be32_to_cpup(of_get_property(intc,
+ "xlnx,num-intr-inputs", NULL));
intr_type =
- *(int *) of_get_property(intc, "xlnx,kind-of-intr", NULL);
+ be32_to_cpup(of_get_property(intc,
+ "xlnx,kind-of-intr", NULL));
if (intr_type >= (1 << (nr_irq + 1)))
printk(KERN_INFO " ERROR: Mismatch in kind-of-intr param\n");