svn commit: r196246 - head/sys/arm/at91
Stanislav Sedov
stas at FreeBSD.org
Sat Aug 15 15:15:21 UTC 2009
Author: stas
Date: Sat Aug 15 15:15:20 2009
New Revision: 196246
URL: http://svn.freebsd.org/changeset/base/196246
Log:
- 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.
Approved by: re (kib)
MFC after: 1 week
Modified:
head/sys/arm/at91/uart_dev_at91usart.c
Modified: head/sys/arm/at91/uart_dev_at91usart.c
==============================================================================
--- head/sys/arm/at91/uart_dev_at91usart.c Sat Aug 15 15:12:46 2009 (r196245)
+++ head/sys/arm/at91/uart_dev_at91usart.c Sat Aug 15 15:15:20 2009 (r196246)
@@ -307,6 +307,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);
}
@@ -344,10 +348,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
More information about the svn-src-head
mailing list