uart_dev_at91usart.c (185265) | uart_dev_at91usart.c (187602) |
---|---|
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 185265 2008-11-25 00:13:26Z imp $"); | 30__FBSDID("$FreeBSD: head/sys/arm/at91/uart_dev_at91usart.c 187602 2009-01-22 21:56:41Z imp $"); |
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 42#include <dev/uart/uart.h> 43#include <dev/uart/uart_cpu.h> 44#include <dev/uart/uart_bus.h> 45#include <arm/at91/at91rm92reg.h> 46#include <arm/at91/at91_usartreg.h> 47#include <arm/at91/at91_pdcreg.h> | 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 42#include <dev/uart/uart.h> 43#include <dev/uart/uart_cpu.h> 44#include <dev/uart/uart_bus.h> 45#include <arm/at91/at91rm92reg.h> 46#include <arm/at91/at91_usartreg.h> 47#include <arm/at91/at91_pdcreg.h> |
48#include <arm/at91/at91var.h> |
|
48 49#include "uart_if.h" 50 | 49 50#include "uart_if.h" 51 |
51#define DEFAULT_RCLK AT91C_MASTER_CLOCK | 52#define DEFAULT_RCLK at91_master_clock |
52#define USART_BUFFER_SIZE 128 53 54/* 55 * High-level UART interface. 56 */ 57struct at91_usart_rx { 58 bus_addr_t pa; 59 uint8_t buffer[USART_BUFFER_SIZE]; --- 619 unchanged lines hidden (view full) --- 679 return (EINVAL); 680} 681 682struct uart_class at91_usart_class = { 683 "at91_usart", 684 at91_usart_methods, 685 sizeof(struct at91_usart_softc), 686 .uc_ops = &at91_usart_ops, | 53#define USART_BUFFER_SIZE 128 54 55/* 56 * High-level UART interface. 57 */ 58struct at91_usart_rx { 59 bus_addr_t pa; 60 uint8_t buffer[USART_BUFFER_SIZE]; --- 619 unchanged lines hidden (view full) --- 680 return (EINVAL); 681} 682 683struct uart_class at91_usart_class = { 684 "at91_usart", 685 at91_usart_methods, 686 sizeof(struct at91_usart_softc), 687 .uc_ops = &at91_usart_ops, |
687 .uc_range = 8, 688 .uc_rclk = DEFAULT_RCLK | 688 .uc_range = 8 |
689}; | 689}; |