svn commit: r187516 - projects/mips/sys/mips/atheros
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Tue Jan 20 22:20:57 PST 2009
Author: gonzo
Date: Wed Jan 21 06:20:56 2009
New Revision: 187516
URL: http://svn.freebsd.org/changeset/base/187516
Log:
- Use new register naming convention
- Properly initialize bus_space tags for uart
Modified:
projects/mips/sys/mips/atheros/uart_cpu_ar71xx.c
Modified: projects/mips/sys/mips/atheros/uart_cpu_ar71xx.c
==============================================================================
--- projects/mips/sys/mips/atheros/uart_cpu_ar71xx.c Wed Jan 21 06:17:01 2009 (r187515)
+++ projects/mips/sys/mips/atheros/uart_cpu_ar71xx.c Wed Jan 21 06:20:56 2009 (r187516)
@@ -54,7 +54,7 @@ uart_cpu_getdev(int devtype, struct uart
{
di->ops = uart_getops(&uart_ns8250_class);
di->bas.chan = 0;
- di->bas.bst = 0;
+ di->bas.bst = MIPS_BUS_SPACE_MEM;
di->bas.regshft = 2;
/* TODO: calculate proper AHB freq using PLL registers */
di->bas.rclk = 85000000;
@@ -63,9 +63,16 @@ uart_cpu_getdev(int devtype, struct uart
di->stopbits = 1;
di->parity = UART_PARITY_NONE;
- /* Bad MIPS, no IO for MIPS */
- uart_bus_space_io = 0;
- uart_bus_space_mem = MIPS_PHYS_TO_KSEG1(ATH_UART_ADDR) + 3;
- di->bas.bsh = MIPS_PHYS_TO_KSEG1(ATH_UART_ADDR) + 3;
+ /* TODO: check if uart_bus_space_io mandatory to set */
+ uart_bus_space_io = MIPS_BUS_SPACE_IO;
+ uart_bus_space_mem = MIPS_BUS_SPACE_MEM;
+ /*
+ * FIXME:
+ * 3 is to compensate big endian, uart operates
+ * with bus_space_read_1/bus_space_write_1 and hence gets
+ * highest byte instead of lowest one. Actual fix will involve
+ * MIPS bus_space fixing.
+ */
+ di->bas.bsh = MIPS_PHYS_TO_KSEG1(AR71XX_UART_ADDR) + 3;
return (0);
}
More information about the svn-src-projects
mailing list