Date: Wed, 22 Mar 2006 01:43:29 GMT From: Olivier Houchard <cognet@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 93775 for review Message-ID: <200603220143.k2M1hTiK008478@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=93775 Change 93775 by cognet@cognet on 2006/03/22 01:42:57 Handle break interrupts (DBGU doesn't seem to support them). Affected files ... .. //depot/projects/arm/src/sys/arm/at91/uart_dev_at91usart.c#12 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/uart_dev_at91usart.c#12 (text+ko) ==== @@ -177,12 +177,16 @@ at91_usart_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { + int cr; + at91_usart_param(bas, baudrate, databits, stopbits, parity); /* Turn on rx and tx */ - uart_setreg(bas, USART_CR, USART_CR_RSTRX | USART_CR_RSTTX); + cr = USART_CR_RSTSTA | USART_CR_RSTRX | USART_CR_RSTTX; + uart_setreg(bas, USART_CR, cr); uart_setreg(bas, USART_CR, USART_CR_RXEN | USART_CR_TXEN); - uart_setreg(bas, USART_IER, USART_CSR_TXRDY | USART_CSR_RXRDY); + uart_setreg(bas, USART_IER, USART_CSR_TXRDY | USART_CSR_RXRDY | + USART_CSR_RXBRK); } /* @@ -362,6 +366,8 @@ ipend |= SER_INT_TXIDLE; if (csr & USART_CSR_RXRDY) ipend |= SER_INT_RXREADY; + if (csr & USART_CSR_RXBRK) + ipend |= SER_INT_BREAK; mtx_unlock_spin(&sc->sc_hwmtx); return (ipend); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603220143.k2M1hTiK008478>