Date: Mon, 22 Jun 2009 22:46:37 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r194668 - in head/sys/arm: conf xscale/ixp425 Message-ID: <200906222246.n5MMkban055108@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Mon Jun 22 22:46:37 2009 New Revision: 194668 URL: http://svn.freebsd.org/changeset/base/194668 Log: o remove hack to write UUE+RTOIE in the uart's IER; force them with hints o honor hints for the rclk Modified: head/sys/arm/conf/AVILA.hints head/sys/arm/conf/CAMBRIA.hints head/sys/arm/xscale/ixp425/uart_bus_ixp425.c Modified: head/sys/arm/conf/AVILA.hints ============================================================================== --- head/sys/arm/conf/AVILA.hints Mon Jun 22 22:20:38 2009 (r194667) +++ head/sys/arm/conf/AVILA.hints Mon Jun 22 22:46:37 2009 (r194668) @@ -9,10 +9,12 @@ hint.uart.0.at="ixp0" hint.uart.0.addr=0xc8000000 hint.uart.0.irq=15 hint.uart.0.flags=0x10 +hint.uart.0.ier_rxbits=0x5d # NB: need UUE+RTOIE # USART0 is unit 1 hint.uart.1.at="ixp0" hint.uart.1.addr=0xc8001000 hint.uart.1.irq=13 +hint.uart.1.ier_rxbits=0x5d # NB: need UUE+RTOIE # NPE Hardware Queue Manager hint.ixpqmgr.0.at="ixp0" Modified: head/sys/arm/conf/CAMBRIA.hints ============================================================================== --- head/sys/arm/conf/CAMBRIA.hints Mon Jun 22 22:20:38 2009 (r194667) +++ head/sys/arm/conf/CAMBRIA.hints Mon Jun 22 22:46:37 2009 (r194668) @@ -9,6 +9,7 @@ hint.uart.0.at="ixp0" hint.uart.0.addr=0xc8000000 hint.uart.0.irq=15 hint.uart.0.flags=0x10 +hint.uart.0.ier_rxbits=0x5d # NB: need UUE+RTOIE # NB: no UART1 on ixp436 Modified: head/sys/arm/xscale/ixp425/uart_bus_ixp425.c ============================================================================== --- head/sys/arm/xscale/ixp425/uart_bus_ixp425.c Mon Jun 22 22:20:38 2009 (r194667) +++ head/sys/arm/xscale/ixp425/uart_bus_ixp425.c Mon Jun 22 22:46:37 2009 (r194668) @@ -68,29 +68,15 @@ static int uart_ixp425_probe(device_t dev) { struct uart_softc *sc; + int unit = device_get_unit(dev); + u_int rclk; sc = device_get_softc(dev); sc->sc_class = &uart_ns8250_class; - sc->sc_rrid = 0; - sc->sc_rtype = SYS_RES_MEMORY; - sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, &sc->sc_rrid, - 0, ~0, uart_getrange(sc->sc_class), RF_ACTIVE); - if (sc->sc_rres == NULL) { - return (ENXIO); - } - sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); - sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); - /* - * 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(sc->sc_bas.bst, sc->sc_bas.bsh, IXP425_UART_IER, - IXP425_UART_IER_UUE | IXP425_UART_IER_RTOIE); - bus_release_resource(dev, sc->sc_rtype, sc->sc_rrid, sc->sc_rres); + if (resource_int_value("uart", unit, "rclk", &rclk)) + rclk = IXP425_UART_FREQ; + if (bootverbose) + device_printf(dev, "rclk %u\n", rclk); - return uart_bus_probe(dev, 0, IXP425_UART_FREQ, 0, 0); + return uart_bus_probe(dev, 0, rclk, 0, 0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906222246.n5MMkban055108>