uart_dev_at91usart.c (217036) | uart_dev_at91usart.c (225214) |
---|---|
1/*- 2 * Copyright (c) 2005 M. Warner Losh 3 * Copyright (c) 2005 Olivier Houchard 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005 M. Warner Losh 3 * Copyright (c) 2005 Olivier Houchard 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/arm/at91/uart_dev_at91usart.c 217036 2011-01-05 23:45:07Z imp $"); | 30__FBSDID("$FreeBSD: head/sys/arm/at91/uart_dev_at91usart.c 225214 2011-08-27 14:24:27Z rwatson $"); |
31 | 31 |
32#include "opt_comconsole.h" 33 | |
34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/bus.h> 37#include <sys/conf.h> 38#include <sys/cons.h> 39#include <sys/tty.h> 40#include <machine/bus.h> 41 --- 438 unchanged lines hidden (view full) --- 480 481 return (at91_usart_param(&sc->sc_bas, baudrate, databits, stopbits, 482 parity)); 483} 484 485static __inline void 486at91_rx_put(struct uart_softc *sc, int key) 487{ | 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/bus.h> 35#include <sys/conf.h> 36#include <sys/cons.h> 37#include <sys/tty.h> 38#include <machine/bus.h> 39 --- 438 unchanged lines hidden (view full) --- 478 479 return (at91_usart_param(&sc->sc_bas, baudrate, databits, stopbits, 480 parity)); 481} 482 483static __inline void 484at91_rx_put(struct uart_softc *sc, int key) 485{ |
488#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) 489 int kdb_brk; | |
490 | 486 |
491 if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE) { 492 if ((kdb_brk = kdb_alt_break(key, &sc->sc_altbrk)) != 0) { 493 switch (kdb_brk) { 494 case KDB_REQ_DEBUGGER: 495 kdb_enter(KDB_WHY_BREAK, 496 "Break sequence on console"); 497 break; 498 case KDB_REQ_PANIC: 499 kdb_panic("Panic sequence on console"); 500 break; 501 case KDB_REQ_REBOOT: 502 kdb_reboot(); 503 break; 504 } 505 } 506 } | 487#if defined(KDB) 488 if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE) 489 kdb_alt_break(key, &sc->sc_altbrk); |
507#endif 508 uart_rx_put(sc, key); 509} 510 511static int 512at91_usart_bus_ipend(struct uart_softc *sc) 513{ 514 int csr = RD4(&sc->sc_bas, USART_CSR); --- 155 unchanged lines hidden --- | 490#endif 491 uart_rx_put(sc, key); 492} 493 494static int 495at91_usart_bus_ipend(struct uart_softc *sc) 496{ 497 int csr = RD4(&sc->sc_bas, USART_CSR); --- 155 unchanged lines hidden --- |