diff options
author | Michal Simek <monstr@monstr.eu> | 2010-09-28 02:04:14 -0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2010-10-21 01:51:59 -0400 |
commit | 02b08045a0306c38131c6d7155c4034a775d40b1 (patch) | |
tree | e146f1811ec3c93ff4877a895e42b71a91932d2b /arch/microblaze/kernel/timer.c | |
parent | e4f29092272ee91a34d3660c31f15ed103057aa0 (diff) |
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/timer.c')
-rw-r--r-- | arch/microblaze/kernel/timer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c index 64ca14dbac6e..fcb97e86003d 100644 --- a/arch/microblaze/kernel/timer.c +++ b/arch/microblaze/kernel/timer.c | |||
@@ -270,11 +270,11 @@ void __init time_init(void) | |||
270 | } | 270 | } |
271 | BUG_ON(!timer); | 271 | BUG_ON(!timer); |
272 | 272 | ||
273 | timer_baseaddr = *(int *) of_get_property(timer, "reg", NULL); | 273 | timer_baseaddr = be32_to_cpup(of_get_property(timer, "reg", NULL)); |
274 | timer_baseaddr = (unsigned long) ioremap(timer_baseaddr, PAGE_SIZE); | 274 | timer_baseaddr = (unsigned long) ioremap(timer_baseaddr, PAGE_SIZE); |
275 | irq = *(int *) of_get_property(timer, "interrupts", NULL); | 275 | irq = be32_to_cpup(of_get_property(timer, "interrupts", NULL)); |
276 | timer_num = | 276 | timer_num = be32_to_cpup(of_get_property(timer, |
277 | *(int *) of_get_property(timer, "xlnx,one-timer-only", NULL); | 277 | "xlnx,one-timer-only", NULL)); |
278 | if (timer_num) { | 278 | if (timer_num) { |
279 | eprintk(KERN_EMERG "Please enable two timers in HW\n"); | 279 | eprintk(KERN_EMERG "Please enable two timers in HW\n"); |
280 | BUG(); | 280 | BUG(); |