Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Nov 2006 19:55:15 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 109295 for review
Message-ID:  <200611051955.kA5JtFQQ056357@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=109295

Change 109295 by sam@sam_ebb on 2006/11/05 19:54:18

	Fix uart input: enable IX_IER_RTOIE so we get rx interrupts
	when data is received but the FIFO is not full.  The ns8250
	uart class code does not handle this for us.

Affected files ...

.. //depot/projects/arm/src/sys/arm/xscale/ixp425/uart_bus_ixp425.c#4 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/xscale/ixp425/uart_bus_ixp425.c#4 (text+ko) ====

@@ -73,8 +73,16 @@
 	sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs);
 	sc->sc_class = &uart_ns8250_class;
 	bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas));
+	/*
+	 * XXX set UART Unit Enable (0x40) AND
+	 *     receiver timeout int enable (0x10).
+	 * The first turns on the UART.  The second is necessary to get
+	 * interrupts when the FIFO has data but is not full.  Note that
+	 * uart_ns8250 carefully avoids touching these bits so we can
+	 * just set them here and proceed.  But this is fragile...
+	 */
 	bus_space_write_4(&ixp425_a4x_bs_tag, device_get_unit(dev) == 0 ?
-	    IXP425_UART0_VBASE : IXP425_UART1_VBASE, REG_IER, 0x40);
+	    IXP425_UART0_VBASE : IXP425_UART1_VBASE, REG_IER, 0x50);
 	return(uart_bus_probe(dev, 0, IXP425_UART_FREQ, 0, 0));
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611051955.kA5JtFQQ056357>