summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorstas <stas@FreeBSD.org>2009-08-15 15:15:20 +0000
committerstas <stas@FreeBSD.org>2009-08-15 15:15:20 +0000
commit6e2c2e42f00b0432adf7a545a09f9aa81d19e7d0 (patch)
treed0f070cfcfd3cc63724576f09068a39f0550ea6c /sys/arm
parente69f9c07d3e5812c91bab7ade24283b199e40acd (diff)
downloadFreeBSD-src-6e2c2e42f00b0432adf7a545a09f9aa81d19e7d0.zip
FreeBSD-src-6e2c2e42f00b0432adf7a545a09f9aa81d19e7d0.tar.gz
- 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
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/at91/uart_dev_at91usart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arm/at91/uart_dev_at91usart.c b/sys/arm/at91/uart_dev_at91usart.c
index 0f50fb4..77ab0ca 100644
--- a/sys/arm/at91/uart_dev_at91usart.c
+++ b/sys/arm/at91/uart_dev_at91usart.c
@@ -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 *sc)
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
OpenPOWER on IntegriCloud