uart_dev_ns8250.c (267992) | uart_dev_ns8250.c (279724) |
---|---|
1/*- 2 * Copyright (c) 2003 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 13 unchanged lines hidden (view full) --- 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include "opt_platform.h" 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 13 unchanged lines hidden (view full) --- 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include "opt_platform.h" 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/uart/uart_dev_ns8250.c 267992 2014-06-28 03:56:17Z hselasky $"); | 30__FBSDID("$FreeBSD: head/sys/dev/uart/uart_dev_ns8250.c 279724 2015-03-07 15:24:15Z ian $"); |
31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/bus.h> 35#include <sys/conf.h> 36#include <sys/kernel.h> 37#include <sys/sysctl.h> 38#include <machine/bus.h> 39 40#ifdef FDT 41#include <dev/fdt/fdt_common.h> 42#include <dev/ofw/ofw_bus.h> 43#include <dev/ofw/ofw_bus_subr.h> 44#endif 45 46#include <dev/uart/uart.h> 47#include <dev/uart/uart_cpu.h> | 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/bus.h> 35#include <sys/conf.h> 36#include <sys/kernel.h> 37#include <sys/sysctl.h> 38#include <machine/bus.h> 39 40#ifdef FDT 41#include <dev/fdt/fdt_common.h> 42#include <dev/ofw/ofw_bus.h> 43#include <dev/ofw/ofw_bus_subr.h> 44#endif 45 46#include <dev/uart/uart.h> 47#include <dev/uart/uart_cpu.h> |
48#ifdef FDT 49#include <dev/uart/uart_cpu_fdt.h> 50#endif |
|
48#include <dev/uart/uart_bus.h> 49#include <dev/uart/uart_dev_ns8250.h> 50 51#include <dev/ic/ns16550.h> 52 53#include "uart_if.h" 54 55#define DEFAULT_RCLK 1843200 --- 317 unchanged lines hidden (view full) --- 373 "ns8250", 374 ns8250_methods, 375 sizeof(struct ns8250_softc), 376 .uc_ops = &uart_ns8250_ops, 377 .uc_range = 8, 378 .uc_rclk = DEFAULT_RCLK 379}; 380 | 51#include <dev/uart/uart_bus.h> 52#include <dev/uart/uart_dev_ns8250.h> 53 54#include <dev/ic/ns16550.h> 55 56#include "uart_if.h" 57 58#define DEFAULT_RCLK 1843200 --- 317 unchanged lines hidden (view full) --- 376 "ns8250", 377 ns8250_methods, 378 sizeof(struct ns8250_softc), 379 .uc_ops = &uart_ns8250_ops, 380 .uc_range = 8, 381 .uc_rclk = DEFAULT_RCLK 382}; 383 |
384#ifdef FDT 385static struct ofw_compat_data compat_data[] = { 386 {"ns16550", (uintptr_t)&uart_ns8250_class}, 387 {NULL, (uintptr_t)NULL}, 388}; 389UART_FDT_CLASS_AND_DEVICE(compat_data); 390#endif 391 |
|
381#define SIGCHG(c, i, s, d) \ 382 if (c) { \ 383 i |= (i & s) ? s : s | d; \ 384 } else { \ 385 i = (i & s) ? (i & ~s) | d : i; \ 386 } 387 388int --- 571 unchanged lines hidden --- | 392#define SIGCHG(c, i, s, d) \ 393 if (c) { \ 394 i |= (i & s) ? s : s | d; \ 395 } else { \ 396 i = (i & s) ? (i & ~s) | d : i; \ 397 } 398 399int --- 571 unchanged lines hidden --- |