jornada 568 port
Olivier Houchard
mlfbsd at ci0.org
Wed Sep 12 11:41:22 PDT 2007
On Wed, Sep 12, 2007 at 02:15:41PM +0400, Mikhael Skvortsov wrote:
> Oliver,
>
> quick tryout of the 16550 didn't give any results (nothing is transmitted
> at all). But this driver is definitely compatible with the sa11x0 usart,
> so I'll try it in detail later.
>
> However, I found some typos in uart_dev_sa1110.c which caused error:
Hi Mikhael,
Thanks a lot for investigating this. I just committed your fix.
Does that mean you go further now ?
As for the ns8250 code, I'd guess a few tweaks in uart_cpu_sa1110.c or
uart_bus_sa1110.c should be needed. Maybe the attached patch would help ?
Regards,
Olivier
-------------- next part --------------
Index: arm/sa11x0/files.sa11x0
===================================================================
RCS file: /cognet/ncvs/src/sys/arm/sa11x0/files.sa11x0,v
retrieving revision 1.2
diff -u -p -r1.2 files.sa11x0
--- arm/sa11x0/files.sa11x0 14 May 2004 13:26:52 -0000 1.2
+++ arm/sa11x0/files.sa11x0 12 Sep 2007 18:32:19 -0000
@@ -7,5 +7,5 @@ arm/sa11x0/sa11x0_io_asm.S optional sai
arm/sa11x0/sa11x0_irq.S optional saip
arm/sa11x0/sa11x0_irqhandler.c optional saip
arm/sa11x0/uart_cpu_sa1110.c optional uart saip
-arm/sa11x0/uart_dev_sa1110.c optional uart saip
arm/sa11x0/uart_bus_sa1110.c optional uart saip
+dev/uart/uart_dev_ns8250.c optional uart
Index: arm/sa11x0/uart_bus_sa1110.c
===================================================================
RCS file: /cognet/ncvs/src/sys/arm/sa11x0/uart_bus_sa1110.c,v
retrieving revision 1.3
diff -u -p -r1.3 uart_bus_sa1110.c
--- arm/sa11x0/uart_bus_sa1110.c 5 Jan 2005 21:58:48 -0000 1.3
+++ arm/sa11x0/uart_bus_sa1110.c 12 Sep 2007 18:39:28 -0000
@@ -70,9 +70,9 @@ uart_sa1110_probe(device_t dev)
sc = device_get_softc(dev);
sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs);
- sc->sc_class = &uart_sa1110_class;
+ sc->sc_class = &uart_ns8250_class;
bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas));
- return(uart_bus_probe(dev, 0, 0, 0, 0));
+ return(uart_bus_probe(dev, 2, SACOM_FREQ, 0, 0));
return (0);
}
Index: arm/sa11x0/uart_cpu_sa1110.c
===================================================================
RCS file: /cognet/ncvs/src/sys/arm/sa11x0/uart_cpu_sa1110.c,v
retrieving revision 1.7
diff -u -p -r1.7 uart_cpu_sa1110.c
--- arm/sa11x0/uart_cpu_sa1110.c 2 Apr 2007 22:00:21 -0000 1.7
+++ arm/sa11x0/uart_cpu_sa1110.c 12 Sep 2007 18:40:21 -0000
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD: src/sys/arm/sa11x0/u
#include <arm/sa11x0/sa11x0_reg.h>
#include <arm/sa11x0/sa11x0_var.h>
+#include <arm/sa11x0/uart_dev_sa1110.h>
bus_space_tag_t uart_bus_space_io;
bus_space_tag_t uart_bus_space_mem;
@@ -56,13 +57,13 @@ int
uart_cpu_getdev(int devtype, struct uart_devinfo *di)
{
- di->ops = uart_getops(&uart_sa1110_class);
+ di->ops = uart_getops(&uart_ns8250_class);
di->bas.chan = 0;
di->bas.bst = &sa11x0_bs_tag;
di->bas.bsh = sa1110_uart_vaddr;
- di->bas.regshft = 0;
- di->bas.rclk = 0;
- di->baudrate = 9600;
+ di->bas.regshft = 2;
+ di->bas.rclk = SACOM_FREQ;
+ di->baudrate = 115200;
di->databits = 8;
di->stopbits = 1;
di->parity = UART_PARITY_NONE;
More information about the freebsd-arm
mailing list