From owner-svn-src-head@FreeBSD.ORG Mon Jun 22 22:46:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72C441065676; Mon, 22 Jun 2009 22:46:37 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56ECE8FC14; Mon, 22 Jun 2009 22:46:37 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5MMkb1V055112; Mon, 22 Jun 2009 22:46:37 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5MMkban055108; Mon, 22 Jun 2009 22:46:37 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200906222246.n5MMkban055108@svn.freebsd.org> From: Sam Leffler Date: Mon, 22 Jun 2009 22:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194668 - in head/sys/arm: conf xscale/ixp425 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2009 22:46:38 -0000 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); }