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>
This commit is contained in:
Michal Simek
2010-09-28 16:04:14 +10:00
parent e4f2909227
commit 02b08045a0
10 changed files with 42 additions and 18 deletions

View File

@@ -77,11 +77,12 @@ static int __init early_init_dt_scan_serial(unsigned long node,
/* find compatible node with uartlite */
p = of_get_flat_dt_prop(node, "compatible", &l);
if ((strncmp(p, "xlnx,xps-uartlite", 17) != 0) &&
(strncmp(p, "xlnx,opb-uartlite", 17) != 0))
(strncmp(p, "xlnx,opb-uartlite", 17) != 0) &&
(strncmp(p, "xlnx,axi-uartlite", 17) != 0))
return 0;
addr = of_get_flat_dt_prop(node, "reg", &l);
return *addr; /* return address */
return be32_to_cpup(addr); /* return address */
}
/* this function is looking for early uartlite console - Microblaze specific */
@@ -115,7 +116,7 @@ static int __init early_init_dt_scan_serial_full(unsigned long node,
addr = *(u32 *)of_get_flat_dt_prop(node, "reg", &l);
addr += *(u32 *)of_get_flat_dt_prop(node, "reg-offset", &l);
return addr; /* return address */
return be32_to_cpu(addr); /* return address */
}
/* this function is looking for early uartlite console - Microblaze specific */