From owner-p4-projects@FreeBSD.ORG Thu Jun 26 08:58:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7A47F10656CD; Thu, 26 Jun 2008 08:58:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2422C106566B for ; Thu, 26 Jun 2008 08:58:38 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE118FC13 for ; Thu, 26 Jun 2008 08:58:38 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m5Q8wbU5067821 for ; Thu, 26 Jun 2008 08:58:37 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m5Q8wbmb067819 for perforce@freebsd.org; Thu, 26 Jun 2008 08:58:37 GMT (envelope-from andrew@freebsd.org) Date: Thu, 26 Jun 2008 08:58:37 GMT Message-Id: <200806260858.m5Q8wbmb067819@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 144132 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2008 08:58:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=144132 Change 144132 by andrew@andrew_bender on 2008/06/26 08:58:02 Implement the transmit side of uart's uart_ipend and uart_transmit With this (and some other workarounds) I'm able to get init writing out to the uart on the NEO 1973 emulator Affected files ... .. //depot/projects/arm/src/sys/arm/s3c2xx0/uart_dev_s3c2410.c#4 edit Differences ... ==== //depot/projects/arm/src/sys/arm/s3c2xx0/uart_dev_s3c2410.c#4 (text+ko) ==== @@ -190,6 +190,11 @@ static int s3c2410_bus_transmit(struct uart_softc *sc) { + sc->sc_txbusy = 1; + for (int i = 0; i < sc->sc_txdatasz; i++) { + s3c2410_putc(&sc->sc_bas, sc->sc_txbuf[i]); + uart_barrier(&sc->sc_bas); + } return (0); } @@ -214,7 +219,16 @@ static int s3c2410_bus_ipend(struct uart_softc *sc) { - return (0); + int ipend = 0; + int sr; + + sr = uart_getreg(&sc->sc_bas, SSCOM_UTRSTAT); + + if (sr & UTRSTAT_TXEMPTY && sc->sc_txbusy) { + ipend |= SER_INT_TXIDLE; + } + + return (ipend); } static int s3c2410_bus_flush(struct uart_softc *sc, int what)