Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Aug 2009 09:17:49 +0000 (UTC)
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r196431 - in stable/7/sys: . arm/at91 contrib/pf
Message-ID:  <200908220917.n7M9HnSJ049586@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: stas
Date: Sat Aug 22 09:17:49 2009
New Revision: 196431
URL: http://svn.freebsd.org/changeset/base/196431

Log:
  - MFC r196246:
    - Proprely intialize UART parameters at probe stage, so uart(4)
      will initialize the FIFO memory correctly on attach.  Before
      that this values was intialized in only in at91_usart_bus_attach
      which is called after the uart(4) memory allocation happens.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/arm/at91/uart_dev_at91usart.c
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/arm/at91/uart_dev_at91usart.c
==============================================================================
--- stable/7/sys/arm/at91/uart_dev_at91usart.c	Sat Aug 22 09:09:44 2009	(r196430)
+++ stable/7/sys/arm/at91/uart_dev_at91usart.c	Sat Aug 22 09:17:49 2009	(r196431)
@@ -305,6 +305,10 @@ static kobj_method_t at91_usart_methods[
 int
 at91_usart_bus_probe(struct uart_softc *sc)
 {
+
+	sc->sc_txfifosz = USART_BUFFER_SIZE;
+	sc->sc_rxfifosz = USART_BUFFER_SIZE;
+	sc->sc_hwiflow = 0;
 	return (0);
 }
 
@@ -342,10 +346,6 @@ at91_usart_bus_attach(struct uart_softc 
 		atsc->flags |= HAS_TIMEOUT;
 	WR4(&sc->sc_bas, USART_IDR, 0xffffffff);
 
-	sc->sc_txfifosz = USART_BUFFER_SIZE;
-	sc->sc_rxfifosz = USART_BUFFER_SIZE;
-	sc->sc_hwiflow = 0;
-
 #ifndef SKYEYE_WORKAROUNDS
 	/*
 	 * Allocate DMA tags and maps



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